source: git/Makefile.in @ a90dc0

spielwiese
Last change on this file since a90dc0 was a3705ae, checked in by Hans Schönemann <hannes@…>, 23 years ago
*hannes: feVersionId git-svn-id: file:///usr/local/Singular/svn/trunk@5300 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 8.4 KB
Line 
1#################################################################
2###
3### Top-level Makefile for Singular
4###
5### The main purpose of this Makefile is to call `make'
6### recursively in the subdirectories determined at configuration
7### time.
8###
9#################################################################
10
11@SET_MAKE@
12SHELL           = /bin/sh
13
14SINGULAR        = @SINGULAR@
15
16BUILD_SUBDIRS   = @BUILD_SUBDIRS@
17SUBDIRS         = @SUBDIRS@
18
19PERL            = @PERL@
20TMP_DIR         = @TMP_DIR@
21MYGZIP          = @MYGZIP@
22GUNZIP          = @GUNZIP@
23
24##############################################################
25# default target
26${SINGULAR}:
27        ${MAKE} install
28
29##############################################################
30# general targets
31# simply descend for these targets
32.PHONY: all install uninstall
33
34TEXINFO_TEX_FILES = epsf.tex texinfo.tex txi-cs.tex txi-de.tex txi-no.tex
35TEXINFO_TEX_DIR = Texinfo/doc
36all install uninstall:
37        @ for SUBDIR in ${BUILD_SUBDIRS}; \
38        do \
39          echo ${MAKE} $@ in $${SUBDIR}; \
40          ( cd $${SUBDIR} && ${MAKE} $@;); \
41          (if test "$${SUBDIR}" = Texinfo && test -d doc; then \
42                for FILE in ${TEXINFO_TEX_FILES}; \
43                do \
44                  if test "$@" = uninstall; then\
45                    echo rm -f doc/$${FILE};\
46                    rm -f doc/$${FILE}; \
47                  else \
48                    echo cp ${TEXINFO_TEX_DIR}/$${FILE} doc; \
49                    cp ${TEXINFO_TEX_DIR}/$${FILE} doc; \
50                  fi; \
51                done;\
52          fi;); \
53        done
54
55install-doc:
56        cd doc; make install
57
58##############################################################
59# cleaning up
60.PHONY: local-clean local-distclean local-maintainer-clean \
61        clean distclean mostlyclean maintainer-clean
62
63# we use a canned sequence to avoid code redundancy
64define recurse
65@ for SUBDIR in ${SUBDIRS}; \
66do \
67  echo ${MAKE} $@ in $${SUBDIR}; \
68  ( cd $${SUBDIR} && ${MAKE} $@; ) \
69done
70endef
71
72local-clean:
73        rm -rf *~ a.out core *.o *.log
74
75local-distclean: local-clean
76        rm -rf Makefile config.cache config.log config.status TAGS* *.gz *.tar
77
78local-maintainer-clean: local-distclean
79        @ echo "This command is intended for maintainer use, only"
80        rm -rf configure
81
82clean mostlyclean: local-clean
83        $(recurse)
84
85distclean: local-distclean
86        $(recurse)
87
88maintainer-clean: uninstall local-maintainer-clean
89        $(recurse)
90
91##############################################################
92# some extra targets for the specific packages
93.PHONY: factory libfac MP gmp smallgmp
94Singular factory libfac MP gmp smallgmp:
95        cd $@; ${MAKE} all
96
97##############################################################
98# documentation
99.PHONY: info dvi ps doc doc/singular.hlp html
100
101info dvi ps doc/singular.hlp html: ${SINGULAR}
102        cd doc; ${MAKE} $@
103
104doc info/singular.hlp:
105        cd doc; ${MAKE} install
106
107##############################################################
108# Tst targets
109.PHONY: Tst-All Tst Tst-Old Tst-Short Tst-Long
110Tst-All: Tst-Old Tst-Short Tst-Long
111
112Tst: Tst-Old Tst-Short
113
114Tst-Old: ${SINGULAR} Tst/Old/universal.lst Tst/regress.cmd
115        ${PERL} Tst/regress.cmd -r -s ${SINGULAR} Tst/Old/universal.lst
116
117Tst-Short: ${SINGULAR} Tst/Short/ok_s.lst Tst/regress.cmd
118        ${PERL} Tst/regress.cmd -r -s ${SINGULAR} Tst/Short/ok_s.lst
119
120Tst-Long:  ${SINGULAR} Tst/Long/ok_l.lst Tst/regress.cmd
121        ${PERL} Tst/regress.cmd -r -s ${SINGULAR} Tst/Long/ok_l.lst
122
123##############################################################
124# distribution targets
125#
126S_VERSION       = $${SINGULAR_VERSION-@SINGULAR_VERSION@}
127SINGUNAME       = @SINGUNAME@
128localdir        = /usr/local
129install_prefix  = ${localdir}/Singular/${S_VERSION}
130
131BINDIST_DIRS    = Singular doc IntegerProgramming
132SHAREDIST_DIRS  = Singular doc emacs
133TMPDIR          = ${TMP_DIR}/singdist
134
135LN_S            = @LN_S@
136MKINSTALLDIRS   = ./mkinstalldirs
137BINDIST_NAME    = Singular-${S_VERSION}-${SINGUNAME}
138SHAREDIST_NAME  = Singular-${S_VERSION}-share
139
140
141install-dist install-local: install-bindist install-sharedist
142
143install-bindist:
144        for DIR in ${BINDIST_DIRS}; \
145        do \
146          if test -d $${DIR}; then \
147            (cd $${DIR}; ${MAKE} install-bindist install_prefix=${install_prefix});\
148          fi \
149        done
150
151install-sharedist: ${SINGULAR}
152        for DIR in ${SHAREDIST_DIRS}; \
153        do \
154          (cd $${DIR}; ${MAKE} install-sharedist install_prefix=${install_prefix}); \
155        done
156
157dist: ${SHAREDIST_NAME}.tgz  ${BINDIST_NAME}.tgz
158
159sharedist ${SHAREDIST_NAME}.tar.gz:
160        if test -d ${TMPDIR}; then rm -rf ${TMPDIR}; fi
161        ${MAKE} install-sharedist localdir=${TMPDIR}
162        chmod -R a+rX ${TMPDIR}
163        cd ${TMPDIR}; tar cf ${SHAREDIST_NAME}.tar Singular; ${MYGZIP} ${SHAREDIST_NAME}.tar
164        mv ${TMPDIR}/${SHAREDIST_NAME}.tar.gz .
165        rm -rf ${TMPDIR}
166
167bindist ${BINDIST_NAME}.tar.gz:
168        if test -d ${TMPDIR}; then rm -fr ${TMPDIR}; fi
169        ${MAKE} install-bindist localdir=${TMPDIR}
170        chmod -R a+rX ${TMPDIR}
171        cd ${TMPDIR}; tar cf ${BINDIST_NAME}.tar Singular; ${MYGZIP} ${BINDIST_NAME}.tar
172        mv ${TMPDIR}/${BINDIST_NAME}.tar.gz .
173        rm -rf ${TMPDIR}
174
175static-bindist ${BINDIST_NAME}-static.tar.gz:
176        if test -d ${TMPDIR}; then rm -fr ${TMPDIR}; fi
177        ${MAKE} install-bindist localdir=${TMPDIR} LD_STATIC=1
178        chmod -R a+rX ${TMPDIR}
179        cd ${TMPDIR}; tar cf ${BINDIST_NAME}-static.tar Singular; ${MYGZIP} ${BINDIST_NAME}-static.tar
180        mv ${TMPDIR}/${BINDIST_NAME}-static.tar.gz .
181        rm -rf ${TMPDIR}
182
183install-root:
184        ${MKINSTALLDIRS} ${localdir}/bin
185        ${LN_S} ${localdir}/Singular/${S_VERSION}/${SINGUNAME}/Singular ${localdir}/bin/Singular-${S_VERSION}
186        ${LN_S} ${localdir}/Singular/${S_VERSION}/${SINGUNAME}/ESingular ${localdir}/bin/ESingular-${S_VERSION}
187
188
189
190##
191## old targets -- need to be updated
192##
193
194BINDIR_NAME     = Singular/${S_VERSION}/${SINGUNAME}
195LIBDIR_NAME     = Singular/${S_VERSION}/LIB
196GFTABLESDIR_NAME= Singular/${S_VERSION}/LIB/gftables
197DOCDIR_NAME     = Singular/${S_VERSION}/doc
198HTMLDIR_NAME    = Singular/${S_VERSION}/html
199INFODIR_NAME    = Singular/${S_VERSION}/info
200EMACSDIR_NAME   = Singular/${S_VERSION}/emacs
201
202ZIP             = zip
203
204test_t:
205        echo ${S_VERSION}
206
207.PHONY: sharedist bindist static-bindist infodist win-sharedist
208_static-bindist: ${SINGULAR}
209        cd Singular; ${MAKE} Singular-$@ libparse
210        rm -rf ${TMPDIR}
211        ${MKINSTALLDIRS} ${TMPDIR}/${BINDIR_NAME}
212        cp Singular/Singular-$@ ${TMPDIR}/${BINDIR_NAME}/Singular-static
213        cp Singular/libparse ${TMPDIR}/${BINDIR_NAME}
214        -strip ${TMPDIR}/${BINDIR_NAME}/*
215        cat INSTALL.unix | sed -e "s/<x-y-z>/${S_VERSION}/g" > \
216                      ${TMPDIR}/Singular/INSTALL
217        cd ${TMPDIR}; chmod -R a+rX *;\
218           tar cf ${BINDIST_NAME}-static.tar Singular; \
219           ${MYGZIP} ${BINDIST_NAME}-static.tar
220        mv ${TMPDIR}/${BINDIST_NAME}-static.tar.gz .
221        rm -rf ${TMPDIR}
222
223_infodist:
224        rm -rf ${TMPDIR}
225        ${MKINSTALLDIRS} ${TMPDIR}/${SINGUNAME}/bin/
226        cp `which info` ${TMPDIR}/${SINGUNAME}/bin/
227        -strip ${TMPDIR}/${SINGUNAME}/bin/info
228        cd ${TMPDIR}; tar cf info-${SINGUNAME}.tar ${SINGUNAME}; \
229                      ${MYGZIP} info-${SINGUNAME}.tar
230        mv ${TMPDIR}/info-${SINGUNAME}.tar.gz .
231        rm -rf ${TMPDIR}
232
233INSTALL         = ./Singular/install-sh -c
234SH_PROGRAM      = /bin/sh
235INFO_PROGRAM    = /bin/info
236CYGWIN_DLL      = /bin/cygwin1.dll
237
238windist: ${SINGULAR}
239        cd Singular; ${MAKE} install-bindist
240        rm -rf ${TMPDIR}
241        ${MKINSTALLDIRS} ${TMPDIR}/${BINDIR_NAME}
242        ${INSTALL} Singular/Singular-bindist \
243                   ${TMPDIR}/${BINDIR_NAME}/Singular.exe
244        ${INSTALL} Singular/libparse ${TMPDIR}/${BINDIR_NAME}
245        ${INSTALL} ${SH_PROGRAM} ${TMPDIR}/${BINDIR_NAME}
246        ${INSTALL} ${INFO_PROGRAM} ${TMPDIR}/${BINDIR_NAME}
247        ${INSTALL} ${CYGWIN_DLL} ${TMPDIR}/${BINDIR_NAME}
248        cat INSTALL.win | sed -e "s/<x-y-z>/${S_VERSION}/g" > \
249                         ${TMPDIR}/Singular/INSTALL
250        cd ${TMPDIR}; chmod -R a+rX *;\
251           ${ZIP} -r sing Singular
252        mv ${TMPDIR}/sing.zip Singular-${S_VERSION}-${SINGUNAME}.zip
253        rm -rf ${TMPDIR}
254srcdist:
255        rm -rf ${TMPDIR}
256        ${MKINSTALLDIRS} ${TMPDIR}/Singular-${S_VERSION}
257        cd ${TMPDIR}/Singular-${S_VERSION}; cvs co All
258        cd  ${TMPDIR}; \
259        tar cf Singular-${S_VERSION}.tar Singular-${S_VERSION}; \
260        ${MYGZIP} Singular-${S_VERSION}.tar
261        cp ${TMPDIR}/Singular-${S_VERSION}.tar.gz .
262        rm -rf ${TMPDIR}
263
264# You can remeber the password with "iwd" == "ich war dabei"
265CRYPT   = enigma # it does not seem to decrypt correctly with the HP crypt
266cryptdist: srcdist
267        ${CRYPT} S-${S_VERSION}-iwd < Singular-${S_VERSION}.tar.gz > Singular-${S_VERSION}.tar.gz.crypt
268
269
270##############################################################
271# stuff for configure
272Makefile : Makefile.in config.status
273        CONFIG_FILES=Makefile ./config.status
274
275doc/Makefile: doc/Makefile.in config.status
276        CONFIG_FILES=doc/Makefile ./config.status
277
278config.status: configure
279        ./config.status --recheck
280
281configure: configure.in
282        @echo "You need to rerun autoconf. I am proceeding, for now."
283        @touch configure
284#       autoconf
285#
Note: See TracBrowser for help on using the repository browser.