Debian Codegraph @

pcl/makefile

raw
1 # makefile for making pcl -- W. Schelter.
2
3 -include ../makedefs
4
5 FILES:=$(shell ls -1 gcl_*.lisp | sed 's,\.lisp,,1') gcl_pcl_impl_low
6
7 GFILES1:= 0 1 2 3 4 5 6 7
8 GFILES:=$(addprefix gcl_pcl_gazonk,$(GFILES1))
9
10 AFILES:=$(FILES) $(GFILES)
11
12 SETUP='(load "defsys.lisp")' \
13 '(setq pcl::*default-pathname-extensions* (cons "lisp" "o"))' \
14 '(setq pcl::*pathname-extensions* (cons "lisp" "o"))' \
15 '(load "sys-proclaim.lisp")' \
16 '(setq compiler::*default-h-file* t)'\
17 '(setq compiler::*default-c-file* t)'\
18 '(setq compiler::*default-data-file* t)'\
19 '(setq compiler::*default-system-p* t)' \
20 '(setq si::*code-block-reserve* (make-array 10000000 :element-type (quote character) :static t) a nil)' \
21 '(setq compiler::*keep-gaz* t compiler::*tmp-dir* "")'
22
23 all: $(addsuffix .c,$(AFILES)) $(addsuffix .o,$(AFILES))
24
25 saved_gcl_pcl: ../unixport/saved_gcl$(EXE)
26 cp ../h/cmpinclude.h .
27 echo $(SETUP) '(pcl::compile-pcl)' | $<
28 echo $(SETUP) '(pcl::load-pcl)(si::save-system "$@")' | $<
29
30 $(addsuffix .c,$(AFILES)) $(addsuffix .data,$(AFILES))\
31 $(addsuffix .h,$(AFILES)) $(addsuffix .lsp,$(GFILES)): \
32 $(addsuffix .lisp,$(subst gcl_pcl_impl_low,impl/gcl/gcl_pcl_impl_low,$(FILES)))
33 rm -f *.o *gazonk*
34 cp ../h/cmpinclude.h .
35 echo ${SETUP} '(pcl::compile-pcl)' | ../unixport/saved_gcl$(EXE)
36 for i in gazonk* ; do \
37 j=$$(echo $$i | sed 's,\..*$$,,1');k="gazonk$$(echo $$j | cut -f3 -d\_)";\
38 l=$$(echo $$i | sed 's,^.*\.,,1');\
39 if test "$$l" = "data" ; then\
40 cp $$i gcl_pcl_$$k.$$l;\
41 else\
42 cat $$i | sed -e "s,$$j\.h,gcl_pcl_$$k.h,1"\
43 -e "s,init_.*$$j,init_gcl_pcl_$$k,g" >gcl_pcl_$$k.$$l && rm $$i;\
44 fi; done
45
46 %.o: %.c %.h %.data
47 $(CC) $(CFLAGS) -c $< -o $@
48 ../xbin/append $*.data $@
49
50 clean:
51 rm -f *.o *.fn *.exe *.dll saved_gcl_pcl$(EXE) cmpinclude.h *.c *.h *.data *gazonk*
52
53
54 # remake the sys-package.lisp and sys-proclaim.lisp files
55 # Those files may be empty on a first build.
56 remake-sys-files:
57 rm -f *.o *gazonk*
58 cp ../h/cmpinclude.h .
59 echo ${SETUP} '(load "../cmpnew/gcl_collectfn.lsp")(compiler::emit-fn t)' \
60 '(pcl::compile-pcl)' | ../unixport/saved_gcl$(EXE) ../unixport/
61 echo ${SETUP} '(load "../cmpnew/gcl_collectfn.lsp") '\
62 '(pcl::load-pcl)(in-package "PCL")(renew-sys-files)' | \
63 ../unixport/saved_gcl$(EXE) ../unixport/
64 cp sys-proclaim.lisp xxx
65 cat xxx | sed -e "s/COMPILER::CMP-ANON//g" > sys-proclaim.lisp
66 rm xxx
67
68
69 tar:
70 $(MAKE) -f makefile.gcl tar1 DIR=`pwd`
71
72 tar1:
73 (cd .. ; tar cvf - `basename ${DIR}` | gzip -c > `basename ${DIR}`.tgz)