File: Makefile.in

package info (click to toggle)
gap 4r4p12-2
  • links: PTS
  • area: main
  • in suites: squeeze, wheezy
  • size: 29,584 kB
  • ctags: 7,113
  • sloc: ansic: 98,786; sh: 3,299; perl: 2,263; makefile: 498; asm: 63; awk: 6
file content (238 lines) | stat: -rw-r--r-- 9,347 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
#############################################################################
##
#W  Makefile                    GAP source                       Frank Celler
##
#H  @(#)$Id: Makefile.in,v 4.17.2.12 2008/11/13 16:51:07 gapchron Exp $
##
#Y  Copyright (C)  1997,  Lehrstuhl D fuer Mathematik,  RWTH Aachen,  Germany
##
##  This file is the top level make file.  It is generated from `Makefile.in'
##  by the `configure' script.  After unpacking GAP you simply type
##
##    ./configure
##
##  to create a make file and then
##
##    make
##
##  to compile and link GAP.
##
##  The "default" traget:
##    - creates a subdirectory CPU-VENDOR-OS in the directory `bin',
##    - copies the configuration script into this directory,
##    - it switches into this directory and executes the configure script,
##    - it makes GAP in this directory.
##
##  The "clean" target:
##    - removes the subdirectory CPU-VENDOR-OS in the directory `bin'
##    - removes any files created by `configure'
##
##  The "testinstall" target:
##    - starts GAP and reads `tst/testall.g'
##
##  The "teststandard" target:
##    - starts GAP and reads all files `tst/*.tst'
##
##  The "teststandardrenormalize" target:
##    - starts GAP, reads all files `tst/*.tst', and replaces the scaling
##      factors  in the `STOP_TEST' statements
##
##  The "testall.g" target:
##    - creates `tst/testall.g' based on the existing version and the
##      available `tst/*.tst' files
##
##  The "testpackages" target:
##    - runs the tests provided by the available packages
##
##  The "testmanuals" target:
##    - runs the examples in the main GAP documentation
##

SHELL=/bin/sh
CC=@CC@
BASECC=@BASECC@
@SET_MAKE@

TESTGAP = ./bin/gap.sh -b -m 100m -o 500m -A -N -q -x 80 -r
TESTGAPauto = ./bin/gap.sh -b -m 100m -o 500m -N -q -x 80 -r

default: strip

config: bin/@target@-@BASECC@/configure bin/@target@-@BASECC@/Makefile 

bin/@target@-@BASECC@/configure: cnf/configure.out
	if test ! -d bin;  then mkdir bin;  fi
	if test ! -d bin/@target@-@BASECC@;  then mkdir bin/@target@-@BASECC@;  fi
	@rm -f bin/@target@-@BASECC@/configure
	cp cnf/configure.out bin/@target@-@BASECC@/configure

bin/@target@-@BASECC@/Makefile: bin/@target@-@BASECC@/configure cnf/config.hin cnf/gac.in
	( cd bin/@target@-@BASECC@ ; CC='$(CC)' ./configure --target=@target@ @gp_configure_options@ )

compile: config
	( cd bin/@target@-@BASECC@ ; $(MAKE) CC='$(CC)' )
	chmod +x bin/gap.sh

static: config
	( cd bin/@target@-@BASECC@ ; $(MAKE) static CC='$(CC)' )
	chmod +x bin/gap.sh
	( cd bin/@target@-@BASECC@ ; strip gap@EXEEXT@)

strip: compile
	if ! grep darwin sysinfo.gap ; then ( cd bin/@target@-@BASECC@ ; strip gap@EXEEXT@) ; fi
       
removewin: strip
	( rm -f bin/*.exe bin/*.dll bin/*.bat bin/*.pif "bin/GAP 4 PPC")

rebuild:
	rm -f config.cache config.log config.status
	touch src/*

clean: rebuild
	rm Makefile
	rm -rf bin/@target@-@BASECC@
	rm -f bin/gap.sh

testinstall:
	( if ! test -d dev/log; then mkdir -p dev/log; fi )
	( echo 'ReadGapRoot( "tst/testutil.g" ); \
            ReadGapRoot( "tst/testall.g" );' | $(TESTGAP) > \
            `date -u +dev/log/testinstall1_%Y-%m-%d-%H-%M` )
	( echo 'ReadGapRoot( "tst/testutil.g" ); LoadAllPackages(); \
            ReadGapRoot( "tst/testall.g" );' | $(TESTGAP) > \
            `date -u +dev/log/testinstall2_%Y-%m-%d-%H-%M` )

teststandard:
	( if ! test -d dev/log; then mkdir -p dev/log; fi )
	( echo 'RunStandardTests( [' > test.tmp; \
          grep -h "STOP_TEST" tst/*.tst | \
            sed -e 's/^gap> STOP_TEST(/[/;s/);/],/' >> test.tmp; \
          echo '] ); GAPInfo.SystemInformation( true, true );' >> test.tmp )
	( echo 'ReadGapRoot( "tst/testutil.g" ); \
            Read( "test.tmp" ); Runtime();' | $(TESTGAP) > \
            `date -u +dev/log/teststandard1_%Y-%m-%d-%H-%M` )
	( echo 'ReadGapRoot( "tst/testutil.g" ); LoadAllPackages(); \
            Read( "test.tmp" ); Runtime();' | $(TESTGAP) > \
            `date -u +dev/log/teststandard2_%Y-%m-%d-%H-%M` )
	( rm test.tmp )

teststandardrenormalize:
	( if ! test -d dev/log; then mkdir -p dev/log; fi )
	( echo 'RunStandardTests( [' > test.tmp; \
          grep -h "STOP_TEST" tst/*.tst | \
            sed -e 's/^gap> STOP_TEST(/[/;s/);/],/' >> test.tmp; \
          echo '], true ); GAPInfo.SystemInformation( true, true );' \
          >> test.tmp; \
          echo 'ReadGapRoot( "tst/testutil.g" ); Read( "test.tmp" ); \
            CreateTestallFile(); Runtime();' | $(TESTGAP) > \
            `date -u +dev/log/teststandardrenormalize_%Y-%m-%d-%H-%M` )
	( rm test.tmp )

testall.g:
	( echo 'ReadGapRoot( "tst/testutil.g" ); \
            CreateTestallFile();' | $(TESTGAP) )

testpackages:
	( if ! test -d dev/log; then mkdir -p dev/log; fi )
	( echo 'ReadGapRoot( "tst/testutil.g" ); \
            SaveWorkspace( "wsp.g" );' | $(TESTGAP) )
	( echo -e "CreatePackageTestsInput( \042testpackages.in\042, \
            [ \042`date -u +dev/log/testpackages1_%Y-%m-%d-%H-%M`\042, \
              \042`date -u +dev/log/testpackages2_%Y-%m-%d-%H-%M`\042 ], \
            \042$(TESTGAP) -L wsp.g\042 );"\
            | $(TESTGAP) -L wsp.g > /dev/null )
	( chmod 777 testpackages.in; ./testpackages.in; rm testpackages.in )
	( rm wsp.g )

testmanuals:
	( if ! test -d dev/log; then mkdir -p dev/log; fi )
	( if ! test -d doc/test/tut; then mkdir -p doc/test/tut; fi )
	( if ! test -d doc/test/prg; then mkdir -p doc/test/prg; fi )
	( if ! test -d doc/test/ref; then mkdir -p doc/test/ref; fi )
	( if ! test -d doc/test/ext; then mkdir -p doc/test/ext; fi )
	( if ! test -d doc/test/new; then mkdir -p doc/test/new; fi )
	( echo 'SaveWorkspace( "doc/test/wsp.g" );' \
            | $(TESTGAP) )
	( cd doc/test/tut; \
          ../mktest.sh -p ../../tut/ -L ../wsp.g; ../mkdiff.sh -p ../../tut/ )
	( cd doc/test/prg; \
          ../mktest.sh -p ../../prg/ -L ../wsp.g; ../mkdiff.sh -p ../../prg/ )
	( cd doc/test/ref; \
          ../mktest.sh -p ../../ref/ -L ../wsp.g; ../mkdiff.sh -p ../../ref/ )
	( cd doc/test/ext; \
          ../mktest.sh -p ../../ext/ -L ../wsp.g; ../mkdiff.sh -p ../../ext/ )
	( cd doc/test/new; \
          ../mktest.sh -p ../../new/ -L ../wsp.g; ../mkdiff.sh -p ../../new/ )
	( cd doc/test; \
          cat tut/diffs prg/diffs ref/diffs ext/diffs new/diffs \
          > `date -u +../../dev/log/testmanuals1_%Y-%m-%d-%H-%M` )
	( rm doc/test/wsp.g )
	( echo 'SaveWorkspace( "doc/test/wsp.g" );' | $(TESTGAPauto) )
	( cd doc/test/tut; \
          ../mktest.sh -p ../../tut/ -L ../wsp.g; ../mkdiff.sh -p ../../tut/ )
	( cd doc/test/prg; \
          ../mktest.sh -p ../../prg/ -L ../wsp.g; ../mkdiff.sh -p ../../prg/ )
	( cd doc/test/ref; \
          ../mktest.sh -p ../../ref/ -L ../wsp.g; ../mkdiff.sh -p ../../ref/ )
	( cd doc/test/ext; \
          ../mktest.sh -p ../../ext/ -L ../wsp.g; ../mkdiff.sh -p ../../ext/ )
	( cd doc/test/new; \
          ../mktest.sh -p ../../new/ -L ../wsp.g; ../mkdiff.sh -p ../../new/ )
	( cd doc/test; \
          cat tut/diffs prg/diffs ref/diffs ext/diffs new/diffs \
          > `date -u +../../dev/log/testmanualsA_%Y-%m-%d-%H-%M` )
	( rm doc/test/wsp.g )
	( echo 'LoadAllPackages(); \
            SaveWorkspace( "doc/test/wsp.g" );' | $(TESTGAP) )
	( cd doc/test/tut; \
          ../mktest.sh -p ../../tut/ -L ../wsp.g; ../mkdiff.sh -p ../../tut/ )
	( cd doc/test/prg; \
          ../mktest.sh -p ../../prg/ -L ../wsp.g; ../mkdiff.sh -p ../../prg/ )
	( cd doc/test/ref; \
          ../mktest.sh -p ../../ref/ -L ../wsp.g; ../mkdiff.sh -p ../../ref/ )
	( cd doc/test/ext; \
          ../mktest.sh -p ../../ext/ -L ../wsp.g; ../mkdiff.sh -p ../../ext/ )
	( cd doc/test/new; \
          ../mktest.sh -p ../../new/ -L ../wsp.g; ../mkdiff.sh -p ../../new/ )
	( cd doc/test; \
          cat tut/diffs prg/diffs ref/diffs ext/diffs new/diffs \
          > `date -u +../../dev/log/testmanuals2_%Y-%m-%d-%H-%M` )
	( rm doc/test/wsp.g )

compilecygwindll:	config
	( cd bin/@target@-@BASECC@ ; $(MAKE) CC='$(CC)' ; \
	  ./gac -o gapw95 -p "-DIOSTATIC -DEDIVSTATIC -DNCURSESSTATIC" \
	        -P "-lpanel -lncurses" ../../pkg/io/src/io.c \
	        ../../pkg/edim/src/ediv.c ../../pkg/Browse/src/ncurses.c ; \
	  strip gapw95.exe ; \
	  cp gapw95.exe .. ; \
          gcc -c -o gap.o ../../src/gap.c -I. -I../.. -DCONFIG_H \
              -DCOMPILECYGWINDLL ; \
	  gcc -o gap.dll -shared *.o ; \
          rm -f gap.o ; \
	  gcc -o gapw95p ../../src/gapw95.c gap.dll ; \
	  strip gapw95p.exe ; \
	  cp gapw95p.exe gap.dll .. ; \
	  cp /bin/cygncurses-8.dll /bin/cygpanel-8.dll /bin/cygwin1.dll \
	     /bin/libW11.dll /usr/bin/rxvt.exe /usr/bin/regtool.exe .. )
	( cd pkg/io ; ./configure ; $(MAKE) CC='$(CC)' )
	( cd pkg/edim ; ./configure ; $(MAKE) CC='$(CC)' )
	( cd pkg/Browse ; ./configure ; $(MAKE) CC='$(CC)' )
	( rm -rf terminfo )
	( mkdir terminfo ; mkdir terminfo/c ; mkdir terminfo/r ; \
	  mkdir terminfo/x )
	( cp /usr/share/terminfo/c/cygwin terminfo/c )
	( cp /usr/share/terminfo/r/rxvt terminfo/r )
	( cp /usr/share/terminfo/x/xterm terminfo/x )
	
winbinp:
	( tar cfz ../winbin.tgz bin/cyg*dll bin/gap.dll \
	  bin/gapw95.exe \
	  bin/gapw95p.exe bin/@target@-@BASECC@/gac \
	  bin/@target@-@BASECC@/config.h \
	  bin/@target@-@BASECC@/gap.dll \
	  pkg/io/bin/@target@-@BASECC@/io.so \
	  pkg/edim/bin/@target@-@BASECC@/ediv.so \
	  pkg/Browse/bin/@target@-@BASECC@/ncurses.so \
	  terminfo )