File: Makefile

package info (click to toggle)
axiom 20170501-4
  • links: PTS
  • area: main
  • in suites: buster, sid
  • size: 1,048,504 kB
  • sloc: lisp: 3,600; makefile: 505; cpp: 223; ansic: 138; sh: 96
file content (344 lines) | stat: -rw-r--r-- 9,390 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
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
VERSION:="Axiom (May 2016)"

##### special paths
SPD:=$(shell pwd)
SRC:=${SPD}/src
LSP:=${SPD}/lsp
INT:=${SPD}/int
OBJ:=${SPD}/obj
MNT:=${SPD}/mnt
TMP:=${OBJ}/tmp
ZIPS:=${SPD}/zips
BOOKS:=${SPD}/books
SRCDIRS:="interpdir sharedir algebradir etcdir docdir \
          graphdir smandir hyperdir browserdir inputdir"

SYS:=$(notdir $(AXIOM))
DAASE:=${SRC}/share
PROOFS:=${OBJ}/${SYS}/proofs
SPAD:=${SPD}/mnt/${SYS}

SPADBIN:=${MNT}/${SYS}/bin
DOCUMENT:=${SPADBIN}/document
EXTRACT:=${BOOKS}/extract

##### installation paths
DESTDIR:=/usr/local/axiom
COMMAND:=${DESTDIR}/mnt/${SYS}/bin/axiom

##### functions we need
AWK:=gawk 
PATCH:=patch
RANLIB:=ranlib
TAR:=tar
TOUCH:=touch
UNCOMPRESS:=gunzip

####K C Related variables
PLF=${SYS}platform
CCF="-O2 -fno-strength-reduce -D_GNU_SOURCE -D${PLF} \
     -I/usr/X11/include \
     -Wno-absolute-value -std=gnu89 -w" 
INC:=${SPD}/src/include
CC:=gcc
XLIB:=/usr/X11R6/lib
LDF="-L/usr/X11/lib -L/usr/X11R6/lib64 -L/usr/local/lib64 -L/usr/openwin/lib64 -L/usr/lib64 "
O:=o

##### lisp related variables
BYE:=bye
#GCLVERSION=gcl-2.4.1
#GCLVERSION=gcl-2.5
#GCLVERSION=gcl-2.5.2
#GCLVERSION=gcl-2.6.1
#GCLVERSION=gcl-2.6.2
#GCLVERSION=gcl-2.6.2a
#GCLVERSION=gcl-2.6.3
#GCLVERSION=gcl-2.6.5
#GCLVERSION=gcl-2.6.6
#GCLVERSION=gcl-2.6.7pre
#GCLVERSION=gcl-2.6.7
#GCLVERSION=gcl-2.6.8pre
#GCLVERSION=gcl-2.6.8pre2
#GCLVERSION=gcl-2.6.8pre3 
#GCLVERSION=gcl-2.6.8pre4
#GCLVERSION=gcl-2.6.8pre7
#GCLVERSION=gcl-cygwin
#GCLVERSION=gcl-2.6.9
#GCLVERSION=gcl-2.6.10
#GCLVERSION=gcl-2.6.11
#GCLVERSION=gcl-2.6.12
GCLVERSION=gcl-2.6.13pre
GCLDIR:=${LSP}/${GCLVERSION}
GCLOPTS="--enable-vssize=65536*2 --disable-xgcl --disable-tkconfig"
LISP:=lsp

##### command line control
NOISE:="-o ${TMP}/trace"
PART:=	cprogs
SUBPART:= everything
RUNTYPE:=serial
# can be richtests, catstests, regresstests (see src/input/Makefile)
# alltests, notests
TESTSET:=notests
BUILD:=full
ACL2:=
COQ:=


ENV:= \
ACL2=${ACL2} \
AWK=${AWK} \
BOOKS=${BOOKS} \
BUILD=${BUILD} \
BYE=${BYE} \
CC=${CC} \
CCF=${CCF} \
COMMAND=${COMMAND} \
COQ=${COQ} \
DAASE=${DAASE} \
DESTDIR=${DESTDIR} \
DOCUMENT=${DOCUMENT} \
EXTRACT=${EXTRACT} \
GCLDIR=${GCLDIR} \
GCLOPTS=${GCLOPTS} \
GCLVERSION=${GCLVERSION} \
INC=${INC} \
INT=${INT} \
LDF=${LDF} \
LISP=${LISP} \
LSP=${LSP} \
MNT=${MNT} \
NOISE=${NOISE} \
O=${O} \
OBJ=${OBJ} \
PART=${PART} \
PATCH=${PATCH} \
PLF=${PLF} \
PROOFS=${PROOFS} \
RANLIB=${RANLIB} \
RUNTYPE=${RUNTYPE} \
SPAD=${SPAD} \
SPADBIN=${SPADBIN} \
SPD=${SPD} \
SRC=${SRC} \
SRCDIRS=${SRCDIRS} \
SUBPART=${SUBPART} \
SYS=${SYS} \
TANGLE=${TANGLE} \
TAR=${TAR} \
TESTSET=${TESTSET} \
TMP=${TMP} \
TOUCH=${TOUCH} \
UNCOMPRESS=${UNCOMPRESS} \
VERSION=${VERSION} \
WEAVE=${WEAVE} \
XLIB=${XLIB} \
ZIPS=${ZIPS} 

all: rootdirs axiom.sty tanglec libspad
	@ echo 1 making a ${SYS} system, PART=${PART} SUBPART=${SUBPART}
	@ echo 2 Environment ${ENV}
	@ ${BOOKS}/tanglec Makefile.pamphlet "Makefile.${SYS}" >Makefile.${SYS}
	@ cp ${BOOKS}/dvipdfm.def ${MNT}/${SYS}/doc
	@ cp ${BOOKS}/changepage.sty ${MNT}/${SYS}/doc
	@ ${EXTRACT} Makefile.pamphlet
	@ cp Makefile.pdf ${MNT}/${SYS}/doc/src/root.Makefile.pdf
	@ if [ "${RUNTYPE}" = "parallel" ] ; then \
	   ( echo p4 starting parallel make of input files ; \
	     ${ENV} ${MAKE} input ${NOISE} & ) ; \
	  else \
           if [ "${BUILD}" = "full" ] ; then \
	   ( echo s4 starting serial make of input files ; \
             cd ${MNT}/${SYS}/doc/src/input ; \
	     cp ${BOOKS}/axiom.sty . ; \
             cp ${SRC}/input/*.eps . ; \
	     for i in `ls ${SRC}/input/*.input.pamphlet` ; do \
	      if [ .${NOISE} = . ] ; \
	      then \
               latex $$i ; \
	      else \
	       ( echo p4a making $$i ; \
	         latex $$i >${TMP}/trace ) ; \
	      fi ; \
             done ; \
	     rm -f *~ ; \
	     rm -f *.pamphlet~ ; \
	     rm -f *.log ; \
	     rm -f *.tex ; \
	     rm -f *.toc ; \
	     rm -f *.aux ) ; fi ; \
	  fi
	@ if [ "${RUNTYPE}" = "parallel" ] ; then \
	    ( echo s2 starting parallel make of books ; \
	      echo s3 ${SPD}/books/Makefile from \
                   ${SPD}/books/Makefile.pamphlet ; \
	      cd ${SPD}/books ; \
              ${EXTRACT} Makefile ; \
              cp Makefile.pdf ${MNT}/${SYS}/doc/src/books.Makefile.pdf ; \
	      ${ENV} ${MAKE} & ) ; \
	  else \
	    ( echo s2 starting serial make of books ; \
	      echo s3 ${SPD}/books/Makefile from \
                   ${SPD}/books/Makefile.pamphlet ; \
	      cd ${SPD}/books ; \
              ${EXTRACT} Makefile ; \
              cp Makefile.pdf ${MNT}/${SYS}/doc/src/books.Makefile.pdf ; \
              if [ "${BUILD}" = "full" ] ; then \
	      ${ENV} ${MAKE} ; fi ) ; \
	  fi
	@ echo p7 starting make of src
	@ ${ENV} $(MAKE) -f Makefile.${SYS} 
	@ echo 3 finished system build on `date` | tee >lastBuildDate

libspad: 
	@ echo 11a making libspad
	@ ( cd ${OBJ}/${SYS}/lib ; \
	    ${BOOKS}/tanglec ${BOOKS}/bookvol8.pamphlet Makefile >Makefile ; \
            ${ENV} ${MAKE} libspad.a )

axiom.sty:
	@ echo 11c copying books/axiom.sty
	@ cp ${BOOKS}/axiom.sty .

rootdirs:
	@ echo 11 checking directory structure
	 mkdir -p ${TMP}
	 mkdir -p ${INT}/algebra
	 mkdir -p ${INT}/hyper
	 mkdir -p ${INT}/input
	 mkdir -p ${INT}/interp
	 mkdir -p ${INT}/sman
	 mkdir -p ${OBJ}/${SYS}/bin
	 mkdir -p ${OBJ}/${SYS}/etc
	 mkdir -p ${OBJ}/${SYS}/graph
	 mkdir -p ${OBJ}/${SYS}/hyper/pages
	 mkdir -p ${OBJ}/${SYS}/interp
	 mkdir -p ${OBJ}/${SYS}/lib
	 mkdir -p ${OBJ}/${SYS}/sman
	 mkdir -p ${OBJ}/${SYS}/proofs
	 mkdir -p ${MNT}/doc
	 mkdir -p ${MNT}/${SYS}/algebra
	 mkdir -p ${MNT}/${SYS}/src/algebra
	 mkdir -p ${MNT}/${SYS}/autoload
	 mkdir -p ${MNT}/${SYS}/bin
	 mkdir -p ${MNT}/${SYS}/doc/axbook
	 mkdir -p ${MNT}/${SYS}/doc/bitmaps
	 mkdir -p ${MNT}/${SYS}/doc/hypertex/bitmaps
	 mkdir -p ${MNT}/${SYS}/doc/msgs
	 mkdir -p ${MNT}/${SYS}/doc/ps
	 mkdir -p ${MNT}/${SYS}/doc/cookbook
	 mkdir -p ${MNT}/${SYS}/doc/spadhelp
	 mkdir -p ${MNT}/${SYS}/doc/src/input
	 mkdir -p ${MNT}/${SYS}/graph/parabola.view
	 mkdir -p ${MNT}/${SYS}/input
	 mkdir -p ${MNT}/${SYS}/lib/graph
	 mkdir -p ${MNT}/${SYS}/lib/scripts

input:
	@ echo p9 making input documents
	@ if [ "${BUILD}" = "full" ] ; then \
	  ( cd ${MNT}/${SYS}/doc/src/input ; \
	    cp ${BOOKS}/axiom.sty . ; \
	    for i in `ls ${SRC}/input/*.input.pamphlet` ; \
              do latex $$i ; \
              done ; \
	     rm -f *~ ; \
	     rm -f *.pamphlet~ ; \
	     rm -f *.log ; \
	     rm -f *.tex ; \
	     rm -f *.toc ; \
	     rm -f *.aux ) ; fi

book:
	@ echo 79 building the book as ${MNT}/${SYS}/doc/book.dvi 
	@ cp ${SRC}/doc/book.pamphlet ${MNT}/${SYS}/doc
	@ cp -pr ${SRC}/doc/ps ${MNT}/${SYS}/doc
	@ (cd ${MNT}/${SYS}/doc ; \
          if [ .${NOISE} = . ] ; then \
	    ( latex book.pamphlet --interaction nonstopmode ; \
	      latex book.pamphlet --interaction nonstopmode ) ; \
	   else \
	    ( latex book.pamphlet --interaction nonstopmode >${TMP}/trace ; \
	      latex book.pamphlet --interaction nonstopmode >${TMP}/trace ) ; \
	  fi ; \
	  rm book.pamphlet ; \
	  rm book.toc ; \
	  rm book.log ; \
	  rm book.aux )
	@ echo 80 The book is at ${MNT}/${SYS}/doc/book.dvi 


tanglec: books/tanglec.c
	@echo t01 making tanglec from books/tanglec.c
	@( cd books ; gcc -o tanglec tanglec.c )

install:
	@echo 78 installing Axiom in ${DESTDIR}
	@mkdir -p ${DESTDIR}
	@cp -pr ${MNT} ${DESTDIR}
	@echo '#!/bin/sh -' >${COMMAND}
	@echo AXIOM=${DESTDIR}/mnt/${SYS} >>${COMMAND}
	@echo export AXIOM >>${COMMAND}
	@echo PATH='$${AXIOM}/bin':'$${PATH}' >>${COMMAND}
	@echo export PATH >>${COMMAND}
	@cat ${INT}/sman/axiom >>${COMMAND}
	@chmod +x ${COMMAND}
	@echo 79 Axiom installation finished.
	@echo
	@echo Please add $(shell dirname ${COMMAND}) to your PATH variable
	@echo Start Axiom with the command $(shell basename ${COMMAND})
	@echo 


document: 
	@ echo 4 making a ${SYS} system, PART=${PART} SUBPART=${SUBPART}
	@ echo 5 Environment ${ENV}
	@ ${BOOKS}/tanglec Makefile.pamphlet "Makefile.${SYS}" >Makefile.${SYS}
	@ ${ENV} $(MAKE) -f Makefile.${SYS} document
	@echo 6 finished system build on `date` | tee >lastBuildDate

clean: 
	@ echo 7 making a ${SYS} system, PART=${PART} SUBPART=${SUBPART}
	@ echo 8 Environment ${ENV}
	@ rm -f axiom.sty
	@ rm -f Makefile.pdf
	@ rm -f Makefile.dvi
	@ rm -f Makefile.${SYS}
	@ rm -f books/Makefile
	@ rm -f books/Makefile.dvi
	@ rm -f books/Makefile.pdf
	@ rm -f books/axiom.bib
	@ rm -f lsp/axiom.sty
	@ rm -f lsp/Makefile lsp/Makefile.dvi lsp/Makefile.pdf
	@ rm -rf lsp/gcl*
	@ rm -f src/axiom.sty
	@ rm -f src/Makefile
	@ rm -f src/Makefile.dvi
	@ rm -f src/Makefile.pdf
	@ rm -f src/algebra/book*pamphlet
	@ rm -f src/algebra/*.spad
	@ rm -f src/algebra/Makefile
	@ rm -f src/etc/axiom.sty
	@ rm -f src/etc/Makefile src/etc/Makefile.dvi src/etc/Makefile.pdf
	@ rm -f src/interp/book*pamphlet
	@ rm -f src/interp/axiom.sty
	@ rm -f src/input/axiom.sty
	@ rm -f src/share/axiom.sty
	@ rm -f src/share/Makefile src/share/Makefile.dvi 
	@ rm -f src/share/Makefile.pdf
	@ rm -rf int
	@ rm -rf obj
	@ rm -rf mnt
	@ for i in `find . -name "*~"` ; do rm -f $$i ; done
	@ rm -f lastBuildDate
	@ rm -f books/tanglec
	@ rm -f src/input/Makefile src/input/Makefile.dvi
	@ rm -f src/input/Makefile.pdf 
	@ rm -f src/interp/Makefile src/interp/Makefile.dvi
	@ rm -f src/interp/Makefile.pdf 
	@ rm -f src/share/Makefile src/share/Makefile.dvi
	@ rm -f src/share/Makefile.pdf 
	@ rm -f Makefile.aux
	@ rm -f Makefile.log