File: Makefile.unx

package info (click to toggle)
tetex-french 4.02-1
  • links: PTS
  • area: non-free
  • in suites: hamm
  • size: 3,572 kB
  • ctags: 137
  • sloc: ansic: 1,455; makefile: 74; csh: 43; sh: 31
file content (324 lines) | stat: -rw-r--r-- 10,651 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
#   Automatic french style files installation for Unix & LaTeX
#
# QUI VEUT BIEN GENERALISER CE MAKEFILE AUX AUTRES PLATEFORMES ? Merci.
#                                               (email: gaulle@idris.fr)
# ma derniere revision date du 98/01/28
#
########################################################################
#   Start of customization section
########################################################################
# Defaults : hyconfig and kbconfig configurators are used.
#            ISO-Latin-1 is the default encoding
#                        (or nearly that, in fact "decmulti" which is better) 
# 1) Chose your input encoding for kbconfig:
IENCODING=decmulti
#IENCODING=ansinew
#IENCODING=ascii
#IENCODING=cp850
#IENCODING=next
#IENCODING=applemac
#IENCODING=latin1

# 2) Set the PATH to the root directory
#ALLTEXPATH=/usr/local/texmf# the usual pointer with TDS
ALLTEXPATH=$$TEXMF# set the root directory if necessary 
                  # if empty we should probably take "."
#ALLTEXPATH=$(shell kpsewich -v '$$TEXMF')# for teTeX

# 3) Set where we are
# This file is usualy at the following place:
THISFILE=${ALLTEXPATH}/source/french/Makefile.unx# we call it again
# Never delete the stuff in ${ALLTEXPATH}/source/french otherwise
# various files will be missing.

# 4) Chose the shell
SHELL=/bin/sh

# 5) Chose your installation pgm and attributes
# Either cp, install BSD or install SYSTEM V:
# On SYSTEM V you could have to give also your usersname and group id.
#INSTALLCMD=cp
#INTERACTIVE=-i# for the "cp" commands
INSTALLCMD=/usr/bin/install -c #
#INSTALLCMD=/usr/ucb/install -c # on AIX!
#INSTALLCMD=/usr/bin/installbsd -c # on AIX 4.1! needs probably also -g and -o
#INSTALLCMD=/etc/install # on HP-UX

MODBIN=-m 755# chmod for binaries
MODTXT=-m 644# chmod for textual files
INTERACTIVE=

# 6) Chose conpilation flags and libs
#Coptions=-lfl 
Coptions=-ll 
CC=cc

# 7) Few other standard Unix commands
RM=rm -f # to remove files without any confirmation
CAT=cat # neutral copy of files
LEX=lex
#LEX=flex -8 # use flex if you have any pb with lex (specially with solaris)
MKDIRS=mkdirhier # prefered
#MKDIRS=mkdirs # for NextStep especially

# 8) the unix command to run latex recursively with makeindex
LATEXCMD=rlatex2e# mine 
#LATEXCMD=latex# normally you should have at least this!

# 9) command to print dvi files
PRINTDVI=dvips # 
NUMPAGES=-n50 # the first 50 pages of a the reference & test dvi files
 
# 10) Where initex resides for your system (in the machine depend dir of TDS)
#INIDIR=${ALLTEXPATH}/bin
INIDIR=${ALLTEXPATH}/ds3100
#TETEXDIR=$(shell kpsewich -v '$$SELFAUTODIR')# for teTeX first
#INITDIR=$(TETEXDIR)/bin# for teTeX second

# 11) Where to move the binaries of kb8to7 and kb7to8
BINDIR=${ALLTEXPATH}/bin

# 12) The directory where all runtime files reside and new ones will be copied
DESTDIR=${ALLTEXPATH}/tex/generic/french

# 13) The directory where the format file will reside (depends of engine)
FORMATS=${ALLTEXPATH}/web2c

# 14) The directory where the documentation (dvi) will reside
TEXDOCS=${ALLTEXPATH}/doc/generic/french

# 5) The directory where other (english) hyphen files reside
HYPHDIR=${ALLTEXPATH}/tex/plain/base

# 16) Usual environnement
######### Set your environnement variables if necessary (eg TEXINPUTS and co)
######### SO THAT TeX WILL FIND at least THE FRENCH FILES IN THIS DIRECTORY.
######### (Edit the latexenv file for example and load it)

######### Edit the following only if you want to move *.fd or *.ist
######### to a different place.

# 17) The directory where the .fd files reside:
FDDIR=${ALLTEXPATH}/tex/latex/fd

# 18) The directory where class and package files reside:
INPUTDIR=$(DESTDIR)

# 19) The directory where the makeindex style files reside
ISTDIR=$(DESTDIR)

# 20) Modify other configuration files
######### Edit the following files only if...
######### hyphen.cfg  ... you don't use MlTeX, then chose T1 encoding 
######### language.dat ... you use other languages than French and English
######### french.cfg (to create) ... you wish to change french defaults 

########################################################################
#   End of customization section
########################################################################


# "the" thing we are making
FORMAT=latex

default:	$(IENCODING) french

french:	
#	@echo "$(DESTDIR) $(FORMATS)"
	@if test ! "${DESTDIR}" -o ! "$(FORMATS)" ; then \
	  echo "*** Destination directories not set." ; \
	  echo "*** Please edit the Makefile first!" ; \
	  exit 1 ; \
	else \
	  make -f ${THISFILE} formats kb2lex ; \
	echo "*** Generation is done, do you want to make \"installall\"?"; \
	fi

formats: initex/plain.fmt initex/$(FORMAT).fmt

$(FORMAT).ltx:	# see your favorite LaTeX distrib

initex/plain.fmt:	
	cd initex ; ${INIDIR}/initex plain.tex "\dump"
	@echo "*** You can test this format now ****"

initex/$(FORMAT).fmt:	$(FORMAT).ltx
	cd initex ; ${INIDIR}/initex $(FORMAT).ltx
	@echo "*** You can test this format now ****"

# option to avoid using LEX:
kb2decmulti:	
	${CC} -o kb7to8 kb7to8.c ${Coptions}
	${CC} -o kb8to7 kb8to7.c ${Coptions}

# Options for keyboard encoding
decmulti: 	
	cd inputs ; cp keyboard.org keyboard.dat

latin1: 	
	cd inputs ; sed s/kbencoding{decmulti}/kbencoding{latin1}/ <keyboard.org >keyboard.dat

next: 	
	cd inputs ; sed s/kbencoding{decmulti}/kbencoding{next}/ <keyboard.org >keyboard.dat

ansinew: 	
	cd inputs ; sed s/kbencoding{decmulti}/kbencoding{ansinew}/ <keyboard.org >keyboard.dat

applemac: 	
	cd inputs ; sed s/kbencoding{decmulti}/kbencoding{applemac}/ <keyboard.org >keyboard.dat

ascii: 	
	cd inputs ; sed s/kbencoding{decmulti}/kbencoding{ascii}/ <keyboard.org >keyboard.dat

cp850: 	
	cd inputs ; sed s/kbencoding{decmulti}/kbencoding{cp850}/ <keyboard.org >keyboard.dat


kb2lex: kb8to7 kb7to8 tst/french.tst

kb8to7:	kb8to7.lex kb7to8.lex 
	${LEX} -v kb8to7.lex ; ${CAT} main.patchlex >> lex.yy.c ; ${CC} -o kb8to7 lex.yy.c ${Coptions}
	@echo "*** kb8to7 generated"
	@./kb8to7 < tst/french.tst > tst/f7ench.tst
	@${RM} tst/french.tst	

kb7to8:	kb8to7.lex kb7to8.lex 
	${LEX} -v kb7to8.lex ; ${CAT} main.patchlex >> lex.yy.c ; ${CC} -o kb7to8 lex.yy.c ${Coptions}
	@echo "*** kb7to8 generated"
	@./kb7to8 < tst/f7ench.tst > tst/f8ench.tst
	@echo "*** Torture-test converted to 8-bit"

tst/french.tst:	
	@${RM} tst/f7ench.tst ; mv tst/f8ench.tst tst/french.tst

kb8to7.lex kb7to8.lex:
	${LATEXCMD} kb2lex

CP=${INSTALLCMD} 
installmin: #initex/$(FORMAT).fmt
	$(MKDIRS) ${FORMATS}
	cd initex ; ${CP}  ${INTERACTIVE} ${MODTXT} plain.fmt $(FORMATS)
	cd initex ; ${CP}  ${INTERACTIVE} ${MODTXT} $(FORMAT).fmt $(FORMATS)
	$(MKDIRS) ${DESTDIR}
	@echo "*** Formats plain and ${FORMAT} just installed."

install: installall

installall: installmin kb2lex 
	$(MKDIRS) ${BINDIR}
	-cp /dev/null  ${BINDIR}/kb7to8 # clean for HP
	-${CP} ${INTERACTIVE} ${MODBIN} kb7to8 ${BINDIR}
	-cp /dev/null  ${BINDIR}/kb8to7 # clean for HP
	-${CP} ${INTERACTIVE} ${MODBIN} kb8to7 ${BINDIR}
	@echo "*** kb7to8 and kb8to7 installed"
	touch ALIRE.dvi
	cp ALIRE.dvi docfrench.dvi
	$(MKDIRS) ${TEXDOCS}
	cp  /dev/null  ${TEXDOCS}/docfrench.dvi 
	${CP} ${MODTXT} docfrench.dvi ${TEXDOCS}/docfrench.dvi
	${RM} docfrench.dvi 
	cp  /dev/null  ${TEXDOCS}/frguide.dvi
	${CP} ${MODTXT} ./doc/frguide.dvi ${TEXDOCS}/frguide.dvi
	$(MKDIRS) ${DESTDIR}
	@echo "*** Documentation installed"
	cd inputs ; for f in *.tex ; \
	do \
	echo ${CP} ${MODTXT} $$f ${DESTDIR} ; \
	cp  /dev/null  ${DESTDIR}/$$f ; \
	${CP} ${MODTXT} $$f ${DESTDIR} ; \
	done
	cd inputs ; for f in *.all ; \
	do \
	cp  /dev/null  ${DESTDIR}/$$f ; \
	echo ${CP} ${MODTXT} $$f ${DESTDIR} ; \
	${CP} ${MODTXT} $$f ${DESTDIR} ; \
	done
	cd inputs ; for f in *.chk ; \
	do \
	cp  /dev/null  ${DESTDIR}/$$f ; \
	echo ${CP} ${MODTXT} $$f ${DESTDIR} ; \
	${CP} ${MODTXT} $$f ${DESTDIR} ; \
	done
	cd inputs ; for f in *.dmy ; \
	do \
	cp  /dev/null  ${DESTDIR}/$$f ; \
	echo ${CP} ${MODTXT} $$f ${DESTDIR} ; \
	${CP} ${MODTXT} $$f ${DESTDIR} ; \
	done
	cd inputs ; for f in *.sty ; \
	do \
	echo ${CP} ${MODTXT} $$f ${DESTDIR} ; \
	cp  /dev/null  ${DESTDIR}/$$f ; \
	${CP} ${MODTXT} $$f ${DESTDIR} ; \
	done
	cd inputs ; for f in *.mlp ; \
	do \
	echo ${CP} ${MODTXT} $$f ${DESTDIR} ; \
	cp  /dev/null  ${DESTDIR}/$$f ; \
	${CP} ${MODTXT} $$f ${DESTDIR} ; \
	done
	cd inputs ; for f in *.doc ; \
	do \
	echo ${CP} ${MODTXT} $$f ${DESTDIR} ; \
	cp  /dev/null  ${DESTDIR}/$$f ; \
	${CP} ${MODTXT} $$f ${DESTDIR} ; \
	done
	cd inputs ; for f in *.dat ; \
	do \
	echo ${CP} ${MODTXT} $$f ${DESTDIR} ; \
	cp  /dev/null  ${DESTDIR}/$$f ; \
	${CP} ${MODTXT} $$f ${DESTDIR} ; \
	done
	cd inputs ; for f in *.kbc ; \
	do \
	cp  /dev/null  ${DESTDIR}/$$f ; \
	echo ${CP} ${MODTXT} $$f ${DESTDIR} ; \
	${CP} ${MODTXT} $$f ${DESTDIR} ; \
	done
	@echo "*** French inputs installed" 
	$(MKDIRS) ${ISTDIR}
	cd inputs ; for f in *.ist ; \
	do \
	echo ${CP} ${MODTXT} $$f ${ISTDIR} ; \
	cp  /dev/null  ${DESTDIR}/$$f ; \
	${CP} ${MODTXT} $$f ${ISTDIR} ; \
	done
	@echo "*** Makeindex styles installed"
# for future use:
#	${CP}  *.fd $(FDDIR)
#	${CP}  *.cls *.clo  *.def $(INPUTDIR)
	@echo "*** All is installed (except contribs and tests files)" 
	@echo "*** DON'T DELETE the source files! "
	@echo "*** I suggest you make the \"reftest\" now"
	@echo "*** and send a registration message to B.Gaulle"
	@echo "*** (fill in frmsgOK file and mail it to gaulle@idris.fr)"

reftest:	
	cd tst ; ${LATEXCMD} frenchlb ; ${RM} *.glo *.idx *.lof *.lot *.toc *.aux
	@echo "*** Torture test done"
	@echo "*** do you want to make the files \"printed\" (first 50pages*2)?"
	@echo "*** and send a registration message to B.Gaulle"
	@echo "*** (fill in frmsgOK file and mail it to gaulle@idris.fr)"

printed:	
	cd tst ; if [ "$$PRINTER" != "" ] ;\
	then ${PRINTDVI}-P $$PRINTER ${NUMPAGES} frenchrf ;\
	else ${PRINTDVI} frenchrf ${NUMPAGES} ; fi ;
	cd tst ; if [ "$$PRINTER" != "" ] ;\
	then ${PRINTDVI}-P $$PRINTER ${NUMPAGES} frenchlb ;\
	else ${PRINTDVI} ${NUMPAGES} frenchlb ; fi ;
	@echo "*** Please compare the printed outputs and then"
	@echo "*** (fill in frmsgOK file and mail it to gaulle@idris.fr)"
#	@echo "Are you ready to \"sendmessage\" now?"

clean:
	-${RM} tst/f7ench.tst ; ${RM} tst/f8ench.tst
	-${RM} initex/plain.fmt initex/*~
	-${RM} initex/$(FORMAT).fmt initex/*.log  initex/*.aux
	-${RM} *.lex kb7to8 kb8to7 *.log *.aux lex.yy.c *.tmp *~
	-cd tst ; ${RM} frenchlb.dvi *.log *.aux *.lof *.lot *.toc *.idx *.glo *~
	-cd initex/tests ; ${RM} *.dvi *.log *.aux *~
	-cd doc ; ${RM} *~
	-cd contrib ; ${RM} *~
	-cd MlTeX ; ${RM} *~
#############################################################################