source: git/Makefile.in @ 1f03735

fieker-DuValspielwiese
Last change on this file since 1f03735 was 1f03735, checked in by Frank Seelisch <seelisch@…>, 15 years ago
Windows shortcuts changed due to cygwin changes and problems with running Singular in (X)Emacs git-svn-id: file:///usr/local/Singular/svn/trunk@11404 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 34.9 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@
17BUILD1_SUBDIRS  = @BUILD1_SUBDIRS@
18SUBDIRS         = @SUBDIRS@
19
20PERL            = @PERL@
21TMP_DIR         = @TMP_DIR@
22MYGZIP          = @MYGZIP@
23GUNZIP          = @GUNZIP@
24
25##############################################################
26# default target
27${SINGULAR}:
28        ${MAKE} install
29
30##############################################################
31# general targets
32# simply descend for these targets
33.PHONY: all install uninstall
34
35TEXINFO_TEX_FILES = epsf.tex texinfo.tex txi-cs.tex txi-de.tex txi-no.tex
36TEXINFO_TEX_DIR = Texinfo/doc
37all install:
38        @ for SUBDIR in ${BUILD1_SUBDIRS}; \
39        do \
40          echo ${MAKE} $@ in $${SUBDIR}; \
41          (cd $${SUBDIR} && ${MAKE} $@ ) || exit 1;\
42          (if test "$${SUBDIR}" = Texinfo && test -d doc; then \
43                for FILE in ${TEXINFO_TEX_FILES}; \
44                do \
45                  if test "$@" = uninstall; then\
46                    echo rm -f doc/$${FILE};\
47                    rm -f doc/$${FILE}; \
48                  else \
49                    echo cp ${TEXINFO_TEX_DIR}/$${FILE} doc; \
50                    cp ${TEXINFO_TEX_DIR}/$${FILE} doc; \
51                  fi; \
52                done;\
53           fi;); \
54        done
55        echo "* do not forget to install Singular-@SINGULAR_VERSION@-share.tar.gz"
56
57install-nolns:
58        @ for SUBDIR in ${BUILD1_SUBDIRS}; \
59        do \
60          echo ${MAKE} $@ in $${SUBDIR}; \
61          (cd $${SUBDIR} && ${MAKE} $@ )  || exit 1;\
62          (if test "$${SUBDIR}" = Texinfo && test -d doc; then \
63            for FILE in ${TEXINFO_TEX_FILES}; \
64            do \
65              if test "$@" = uninstall; then\
66                echo rm -f doc/$${FILE};\
67                rm -f doc/$${FILE}; \
68              else \
69                echo cp ${TEXINFO_TEX_DIR}/$${FILE} doc; \
70                cp ${TEXINFO_TEX_DIR}/$${FILE} doc; \
71              fi; \
72            done;\
73          fi;); \
74        done
75        echo "* do not forget to install Singular-@SINGULAR_VERSION@-share.tar.gz"
76
77libsingular:
78        cd Singular; make libsingular
79
80install-libsingular: libsingular
81        (cd Singular && make install-libsingular);
82        (cd kernel && make install-libsingular);
83        (cd omalloc && make install-libsingular);
84
85maintainer-install uninstall:
86        @ for SUBDIR in ${BUILD_SUBDIRS}; \
87        do \
88          echo ${MAKE} $@ in $${SUBDIR}; \
89          ( cd $${SUBDIR} && ${MAKE} $@;); \
90          (if test "$${SUBDIR}" = Texinfo && test -d doc; then \
91                for FILE in ${TEXINFO_TEX_FILES}; \
92                do \
93                  if test "$@" = uninstall; then\
94                    echo rm -f doc/$${FILE};\
95                    rm -f doc/$${FILE}; \
96                  else \
97                    echo cp ${TEXINFO_TEX_DIR}/$${FILE} doc; \
98                    cp ${TEXINFO_TEX_DIR}/$${FILE} doc; \
99                  fi; \
100                done;\
101           fi;); \
102        done
103
104install-doc:
105        cd doc; ${MAKE} install
106
107##############################################################
108# cleaning up
109.PHONY: local-clean local-distclean local-maintainer-clean \
110        clean distclean mostlyclean maintainer-clean
111
112# we use a canned sequence to avoid code redundancy
113define recurse
114@ for SUBDIR in ${SUBDIRS}; \
115do \
116  echo ${MAKE} $@ in $${SUBDIR}; \
117  ( cd $${SUBDIR} && ${MAKE} $@; ) \
118done
119endef
120
121local-clean:
122        rm -rf *~ a.out core *.o *.log
123
124local-distclean: local-clean
125        rm -rf Makefile config.cache config.log config.status TAGS* *.gz *.tar
126
127local-maintainer-clean: local-distclean
128        @ echo "This command is intended for maintainer use, only"
129        rm -rf configure
130
131clean mostlyclean: local-clean
132        $(recurse)
133
134distclean: local-distclean
135        $(recurse)
136
137maintainer-clean: uninstall local-maintainer-clean
138        $(recurse)
139
140##############################################################
141# some extra targets for the specific packages
142.PHONY: factory libfac MP gmp smallgmp
143Singular factory libfac MP gmp smallgmp:
144        cd $@; ${MAKE} all
145
146##############################################################
147# documentation
148.PHONY: info dvi ps doc doc/singular.hlp html
149
150info dvi ps doc/singular.hlp html: ${SINGULAR}
151        cd doc; ${MAKE} $@
152
153doc info/singular.hlp:
154        cd doc; ${MAKE} install
155
156##############################################################
157# Tst targets
158.PHONY: Tst-All Tst Tst-Old Tst-Short Tst-Long
159Tst-All: Tst-Old Tst-Short Tst-Long
160
161Tst: Tst-Old Tst-Short
162
163Tst-Old: ${SINGULAR} Tst/Old/universal.lst Tst/regress.cmd
164        ${PERL} Tst/regress.cmd -r -s ${SINGULAR} Tst/Old/universal.lst
165
166Tst-Short: ${SINGULAR} Tst/Short/ok_s.lst Tst/regress.cmd
167        ${PERL} Tst/regress.cmd -r -s ${SINGULAR} Tst/Short/ok_s.lst
168
169Tst-Long:  ${SINGULAR} Tst/Long/ok_l.lst Tst/regress.cmd
170        ${PERL} Tst/regress.cmd -r -s ${SINGULAR} Tst/Long/ok_l.lst
171
172##############################################################
173# distribution targets
174#
175S_VERSION             = $${SINGULAR_VERSION-@SINGULAR_VERSION@}
176SINGUNAME             = @SINGUNAME@
177localdir              = /usr/local
178install_prefix        = ${localdir}/Singular/${S_VERSION}
179
180##############################################################
181# cygwin related stuff
182#
183CYGWIN_SING_VER       = @SINGULAR_RPM_VERSION@
184CYGWIN_PORT_VER       = ${CYGWIN_SING_VER}-1
185CYGWIN_SETUP_VER      = 2.457.2.2
186CYGWIN_REP_DIR        = cygwin_pkg
187CYGWIN_AUX_FILES      = rpm/cygwin
188CYGWIN_PFW_DIR        = /cygdrive/c/Programme/PackageForTheWeb\ 4/
189CYGWIN_PFW_EXEC       = ./pftwwiz.exe
190CYGWIN_ORIG           = external-cygwin
191CYGWIN_SINGULAR_DIR   = Singular
192CYGWIN_SINGULAR_ROOT  = /usr/share/${CYGWIN_SINGULAR_DIR}
193CYGWIN_SINGULAR_BIN   = /usr/lib/${CYGWIN_SINGULAR_DIR}
194CYGWIN_SINGULAR_DOC   = /usr/share/doc/${CYGWIN_SINGULAR_DIR}-${CYGWIN_SING_VER}
195
196
197BINDIST_DIRS        = kernel Singular doc IntegerProgramming modules
198
199SHAREDIST_DIRS      = Singular doc emacs
200
201TMPDIR              = ${TMP_DIR}/singdist
202
203LN_S            = @LN_S@
204MKINSTALLDIRS   = ./mkinstalldirs
205
206BINDIST_NAME            = Singular-${S_VERSION}-${SINGUNAME}
207PLU_BINDIST_NAME        = SingularPlural-${S_VERSION}-${SINGUNAME}
208SHAREDIST_NAME          = Singular-${S_VERSION}-share
209PLU_SHAREDIST_NAME      = SingularPlural-${S_VERSION}-share
210
211
212install-dist install-local: install-bindist install-sharedist
213
214install-bindist:
215        for DIR in ${BINDIST_DIRS}; \
216        do \
217          if test -d $${DIR}; then \
218            (cd $${DIR}; ${MAKE} install-bindist install_prefix=${install_prefix});\
219          fi \
220        done
221
222install-bindist-plural:
223        for DIR in ${PLU_BINDIST_DIRS}; \
224        do \
225          if test -d $${DIR}; then \
226            (cd $${DIR}; ${MAKE} install-bindist-plural install_prefix=${install_prefix});\
227          fi \
228        done
229
230install-sharedist: ${SINGULAR}
231        for DIR in ${SHAREDIST_DIRS}; \
232        do \
233          (cd $${DIR}; ${MAKE} install-sharedist install_prefix=${install_prefix}); \
234        done
235
236install-sharedist-plural: ${SINGULAR}
237        for DIR in ${PLU_SHAREDIST_DIRS}; \
238        do \
239          (cd $${DIR}; ${MAKE} install-sharedist-plural install_prefix=${install_prefix}); \
240        done
241
242dist: ${SHAREDIST_NAME}.tar.gz  ${BINDIST_NAME}.tar.gz
243
244dist-plural: ${PLU_SHAREDIST_NAME}.tar.gz  ${PLU_BINDIST_NAME}.tar.gz
245
246sharedist ${SHAREDIST_NAME}.tar.gz:
247        if test -d ${TMPDIR}; then rm -rf ${TMPDIR}; fi
248        ${MAKE} install-sharedist localdir=${TMPDIR}
249        chmod -R a+rX ${TMPDIR}
250        cd ${TMPDIR}; tar cf - Singular| ${MYGZIP} > ${SHAREDIST_NAME}.tar.gz
251        mv ${TMPDIR}/${SHAREDIST_NAME}.tar.gz .
252        rm -rf ${TMPDIR}
253
254sharedist-plural ${PLU_SHAREDIST_NAME}.tar.gz:
255        if test -d ${TMPDIR}; then rm -rf ${TMPDIR}; fi
256        ${MAKE} install-sharedist-plural localdir=${TMPDIR}
257        chmod -R a+rX ${TMPDIR}
258        cd ${TMPDIR}; tar cf - Singular| ${MYGZIP} > ${SHAREDIST_NAME}.tar.gz
259        mv ${TMPDIR}/${SHAREDIST_NAME}.tar.gz .
260        rm -rf ${TMPDIR}
261
262bindist ${BINDIST_NAME}.tar.gz:
263        if test -d ${TMPDIR}; then rm -fr ${TMPDIR}; fi
264        ${MAKE} install-bindist localdir=${TMPDIR}
265        chmod -R a+rX ${TMPDIR}
266        cd ${TMPDIR}; tar cf - Singular| ${MYGZIP} > ${BINDIST_NAME}.tar.gz
267        mv ${TMPDIR}/${BINDIST_NAME}.tar.gz .
268        rm -rf ${TMPDIR}
269
270static-bindist ${BINDIST_NAME}-static.tar.gz:
271        if test -d ${TMPDIR}; then rm -fr ${TMPDIR}; fi
272        ${MAKE} install-bindist localdir=${TMPDIR} LD_STATIC=1
273        chmod -R a+rX ${TMPDIR}
274        -rm -f ${TMPDIR}/Singular/*/*/*.so
275        cd ${TMPDIR}; tar cf - Singular| ${MYGZIP} > ${BINDIST_NAME}-static.tar.gz
276        mv ${TMPDIR}/${BINDIST_NAME}-static.tar.gz .
277        rm -rf ${TMPDIR}
278
279static-bindist-plural ${PLU_BINDIST_NAME}-static.tar.gz:
280        if test -d ${TMPDIR}; then rm -fr ${TMPDIR}; fi
281        ${MAKE} install-bindist-plural localdir=${TMPDIR} LD_STATIC=1
282        chmod -R a+rX ${TMPDIR}
283        cd ${TMPDIR}; tar cf - Singular| ${MYGZIP} > ${BINDIST_NAME}-static.tar.gz
284        mv ${TMPDIR}/${BINDIST_NAME}-static.tar.gz .
285        rm -rf ${TMPDIR}
286
287install-root:
288        ${MKINSTALLDIRS} ${localdir}/bin
289        ${LN_S} ${localdir}/Singular/${S_VERSION}/${SINGUNAME}/Singular ${localdir}/bin/Singular-${S_VERSION}
290        ${LN_S} ${localdir}/Singular/${S_VERSION}/${SINGUNAME}/ESingular ${localdir}/bin/ESingular-${S_VERSION}
291
292##############################################################
293# targets for the windows distribution
294#
295
296cygwin-dist-src singular-base-${CYGWIN_PORT_VER}-src.tar.bz2:
297        -rm -rf ${TMPDIR}
298        ${MKINSTALLDIRS} ${TMPDIR}/singular-${CYGWIN_PORT_VER}
299        export CVS_RSH=ssh; export CVSROOT=:ext:monty.mathematik.uni-kl.de:/usr/local/Singular/cvsroot; \
300        cd ${TMPDIR}/singular-${CYGWIN_PORT_VER}; cvs co All;
301        cd  ${TMPDIR}; \
302        tar cjf singular-base-${CYGWIN_PORT_VER}-src.tar.bz2 singular-${CYGWIN_PORT_VER};
303        mv ${TMPDIR}/singular-base-${CYGWIN_PORT_VER}-src.tar.bz2 .
304        -rm -rf ${TMPDIR}
305
306cygwin-dist-scripts:
307        @echo -e  "Writing /etc/postinstall/singular-help.sh"
308        @echo -e  '#!/bin/sh' > /etc/postinstall/singular-help.sh
309        @echo -e  '' >> /etc/postinstall/singular-icons.sh
310        @echo -e  'install-info' >> /etc/postinstall/singular-icons.sh
311        @echo -e  'mkdir "`cygpath -u -A -P`/Singular CAS"' >> /etc/postinstall/singular-icons.sh
312        @echo -e  "Writing /etc/postinstall/singular-icons.sh"
313        @echo -e  '#!/bin/sh' > /etc/postinstall/singular-icons.sh
314        @echo -e  '' >> /etc/postinstall/singular-icons.sh
315        @echo -e  'mkdir "`cygpath -u -A -P`/Singular CAS"' >> /etc/postinstall/singular-icons.sh
316        @echo -e  'mkdir "`cygpath -u -A -P`/Singular CAS/Cygwin"' >> /etc/postinstall/singular-icons.sh
317        @echo -e  '' >> /etc/postinstall/singular-icons.sh
318        @echo -e  '##################### Singular CAS\Cygwin' >> /etc/postinstall/singular-icons.sh
319        @echo -e  '# Cygwin - Setup' >> /etc/postinstall/singular-icons.sh
320        @echo -e  'mkshortcut -A -a \047\047 \' >> /etc/postinstall/singular-icons.sh
321        @echo -e  '       -i ${CYGWIN_SINGULAR_BIN}/cygwin-setup.exe -n "Singular CAS\\Cygwin\\Setup (Cygwin)" \' >> /etc/postinstall/singular-icons.sh
322        @echo -e  '       -P ${CYGWIN_SINGULAR_BIN}/cygwin-setup.exe \' >> /etc/postinstall/singular-icons.sh
323        @echo -e  '       -d "Use this program to update, modify or remove your Singular and Cygwin installation"' >> /etc/postinstall/singular-icons.sh
324        @echo -e  '' >> /etc/postinstall/singular-icons.sh
325        @echo -e  '# Bash Shell' >> /etc/postinstall/singular-icons.sh
326        @echo -e  'mkshortcut -A -a \047\047 \' >> /etc/postinstall/singular-icons.sh
327        @echo -e  '       -P /cygwin.bat -n "Singular CAS\\Cygwin\\Bash shell" \' >> /etc/postinstall/singular-icons.sh
328        @echo -e  '       -i ${CYGWIN_SINGULAR_BIN}/cygwin-setup.exe \' >> /etc/postinstall/singular-icons.sh
329        @echo -e  '       -d "This starts a bash shell."' >> /etc/postinstall/singular-icons.sh
330        @echo -e  '' >> /etc/postinstall/singular-icons.sh
331        @echo -e  '# Rxvt Terminal' >> /etc/postinstall/singular-icons.sh
332        @echo -e  'mkshortcut -A -a \047-rv -fn "FixedSys" -e /bin/bash --login -i\047 \' >> /etc/postinstall/singular-icons.sh
333        @echo -e  '       -i /bin/rxvt.exe -n "Singular CAS\\Cygwin\\Rxvt - Terminal" \' >> /etc/postinstall/singular-icons.sh
334        @echo -e  '       -P /bin/rxvt -d "This starts an rxvt terminal."' >> /etc/postinstall/singular-icons.sh
335        @echo -e  '' >> /etc/postinstall/singular-icons.sh
336        @echo -e  '# XServer + xterm' >> /etc/postinstall/singular-icons.sh
337        @echo -e  'if test -f /bin/XWin.exe; then' >> /etc/postinstall/singular-icons.sh
338        @echo -e  'mkshortcut -A -a \047bash -l -c "/bin/startxwin.bat"\047 \' >> /etc/postinstall/singular-icons.sh
339        @echo -e  '       -i /bin/XWin.exe \' >> /etc/postinstall/singular-icons.sh
340        @echo -e  '       -P /usr/X11R6/bin/run.exe -n "Singular CAS\\Cygwin\\Start X-Server and an XTerm" \' >> /etc/postinstall/singular-icons.sh
341        @echo -e  '       -d "This starts the Cygwin X-Server and launches an XTerm."' >> /etc/postinstall/singular-icons.sh
342        @echo -e  'fi' >> /etc/postinstall/singular-icons.sh
343        @echo -e  '' >> /etc/postinstall/singular-icons.sh
344        @echo -e  '# Only XServer' >> /etc/postinstall/singular-icons.sh
345        @echo -e  'if test -f /bin/XWin.exe; then' >> /etc/postinstall/singular-icons.sh
346        @echo -e  'mkshortcut -A -a \047\047 \' >> /etc/postinstall/singular-icons.sh
347        @echo -e  '       -i /bin/XWin.exe \' >> /etc/postinstall/singular-icons.sh
348        @echo -e  '       -w /bin \' >> /etc/postinstall/singular-icons.sh
349        @echo -e  '       -P /bin/startxwin.bat -n "Singular CAS\\Start X-Server" \' >> /etc/postinstall/singular-icons.sh
350        @echo -e  '       -d "This starts the Cygwin X-Server."' >> /etc/postinstall/singular-icons.sh
351        @echo -e  'fi' >> /etc/postinstall/singular-icons.sh
352        @echo -e  '' >> /etc/postinstall/singular-icons.sh
353        @echo -e  '##################### Singular CAS' >> /etc/postinstall/singular-icons.sh
354        @echo -e  '# Singular in rxvt' >> /etc/postinstall/singular-icons.sh
355        @echo -e  'mkshortcut -A -a \047-rv -fn "FixedSys" -e /bin/bash --login -i -c Singular\047 \' >> /etc/postinstall/singular-icons.sh
356        @echo -e  '       -i ${CYGWIN_SINGULAR_BIN}/runTSingular.exe -n "Singular CAS\\Singular (rxvt)" \' >> /etc/postinstall/singular-icons.sh
357        @echo -e  '       -P /bin/rxvt -d "This starts Singular in an rxvt terminal."' >> /etc/postinstall/singular-icons.sh
358        @echo -e  '' >> /etc/postinstall/singular-icons.sh
359        @echo -e  '# Singular in DOS mode' >> /etc/postinstall/singular-icons.sh
360        @echo -e  'mkshortcut -A -a Singular \' >> /etc/postinstall/singular-icons.sh
361        @echo -e  '       -i ${CYGWIN_SINGULAR_BIN}/Singular.exe -n "Singular CAS\\Singular (Terminal)" \' >> /etc/postinstall/singular-icons.sh
362        @echo -e  '       -P /bin/bash -d "This starts Singular in a Microsoft terminal."' >> /etc/postinstall/singular-icons.sh
363        @echo -e  '' >> /etc/postinstall/singular-icons.sh
364        @echo -e  '# Emacs + Singular' >> /etc/postinstall/singular-icons.sh
365        @echo -e  'if test -f /bin/XWin.exe; then' >> /etc/postinstall/singular-icons.sh
366        @echo -e  'mkshortcut -A -a \047bash -l -c "/bin/startxwin.bat && sleep 1 && ESingular"\047 \' >> /etc/postinstall/singular-icons.sh
367        @echo -e  '       -i ${CYGWIN_SINGULAR_BIN}/runESingular.exe -n "Singular CAS\\Singular (Emacs and X-Server)" \' >> /etc/postinstall/singular-icons.sh
368        @echo -e  '       -w /bin \' >> /etc/postinstall/singular-icons.sh
369        @echo -e  '       -P /usr/X11R6/bin/run.exe -d "This starts Singular in Emacs after starting the X-Server."' >> /etc/postinstall/singular-icons.sh
370        @echo -e  'fi' >> /etc/postinstall/singular-icons.sh
371        @echo -e  '' >> /etc/postinstall/singular-icons.sh
372        @echo -e  '##################### Desktop' >> /etc/postinstall/singular-icons.sh
373        @echo -e  '# Singular in rxvt' >> /etc/postinstall/singular-icons.sh
374        @echo -e  'mkshortcut -A -a \047-rv -fn "FixedSys" -e /bin/bash --login -i -c Singular\047 \' >> /etc/postinstall/singular-icons.sh
375        @echo -e  '       -i ${CYGWIN_SINGULAR_BIN}/runTSingular.exe -n "Singular CAS\\Singular (rxvt)" \' >> /etc/postinstall/singular-icons.sh
376        @echo -e  '       -D /bin/rxvt -d "This starts Singular in an rxvt terminal."' >> /etc/postinstall/singular-icons.sh
377        @echo -e  '' >> /etc/postinstall/singular-icons.sh
378        @echo -e  '# Singular in DOS mode' >> /etc/postinstall/singular-icons.sh
379        @echo -e  'mkshortcut -A -a Singular \' >> /etc/postinstall/singular-icons.sh
380        @echo -e  '       -i ${CYGWIN_SINGULAR_BIN}/Singular.exe -n "Singular CAS\\Singular (Terminal)" \' >> /etc/postinstall/singular-icons.sh
381        @echo -e  '       -D /bin/bash -d "This starts Singular in a Microsoft terminal."' >> /etc/postinstall/singular-icons.sh
382        @echo -e  '' >> /etc/postinstall/singular-icons.sh
383        @echo -e  '# Emacs + Singular' >> /etc/postinstall/singular-icons.sh
384        @echo -e  'if test -f /bin/XWin.exe; then' >> /etc/postinstall/singular-icons.sh
385        @echo -e  'mkshortcut -A -a \047bash -l -c "/bin/startxwin.bat && sleep 1 && ESingular"\047 \' >> /etc/postinstall/singular-icons.sh
386        @echo -e  '       -i ${CYGWIN_SINGULAR_BIN}/runESingular.exe -n "Singular CAS\\Singular (Emacs and X-Server)" \' >> /etc/postinstall/singular-icons.sh
387        @echo -e  '       -w /bin \' >> /etc/postinstall/singular-icons.sh
388        @echo -e  '       -D /usr/X11R6/bin/run.exe -d "This starts Singular in Emacs after starting the X-Server."' >> /etc/postinstall/singular-icons.sh
389        @echo -e  'fi' >> /etc/postinstall/singular-icons.sh
390        @echo -e  '' >> /etc/postinstall/singular-icons.sh
391        @echo -e  Writing /usr/bin/ESingular
392        @echo -e  "#! /bin/bash" > /usr/bin/ESingular
393        @echo -e  "export SINGULAR_BIN_DIR=${CYGWIN_SINGULAR_BIN}" >> /usr/bin/ESingular
394        @echo -e  "export SINGULAR_ROOT_DIR=${CYGWIN_SINGULAR_ROOT}" >> /usr/bin/ESingular
395        @echo -e  "export SINGULAR_INFO_FILE=/usr/share/info/singular.info" >> /usr/bin/ESingular
396        @echo -e  "export SINGULAR_IDX_FILE=${CYGWIN_SINGULAR_DOC}/doc/singular.idx" >> /usr/bin/ESingular
397        @echo -e  "export SINGULAR_HTML_DIR=${CYGWIN_SINGULAR_DOC}/html" >> /usr/bin/ESingular
398        @echo -e  "export SINGULAR_CHM_FILE=${CYGWIN_SINGULAR_DOC}/doc/Manual.chm" >> /usr/bin/ESingular
399        @echo -e  "export SINGULAR_EXAMPLES_DIR=${CYGWIN_SINGULAR_DOC}/examples" >> /usr/bin/ESingular
400        @echo -e  'export PATH="${CYGWIN_SINGULAR_BIN}:/usr/X11R6/bin:$$PATH"' >> /usr/bin/ESingular
401        @echo -e  'if [ -z $$DISPLAY ]; then export DISPLAY=:0.0; fi' >> /usr/bin/ESingular
402        @echo -e  "exec ${CYGWIN_SINGULAR_BIN}/ESingular.exe \$$*" >> /usr/bin/ESingular
403        @echo -e  Writing /usr/bin/Singular
404        @echo -e  "#! /bin/bash" > /usr/bin/Singular
405        @echo -e  "export SINGULAR_BIN_DIR=${CYGWIN_SINGULAR_BIN}" >> /usr/bin/Singular
406        @echo -e  "export SINGULAR_ROOT_DIR=${CYGWIN_SINGULAR_ROOT}" >> /usr/bin/Singular
407        @echo -e  "export SINGULAR_INFO_FILE=/usr/share/info/singular.info" >> /usr/bin/Singular
408        @echo -e  "export SINGULAR_IDX_FILE=${CYGWIN_SINGULAR_DOC}/doc/singular.idx" >> /usr/bin/Singular
409        @echo -e  "export SINGULAR_HTML_DIR=${CYGWIN_SINGULAR_DOC}/html" >> /usr/bin/Singular
410        @echo -e  "export SINGULAR_CHM_FILE=${CYGWIN_SINGULAR_DOC}/doc/Manual.chm" >> /usr/bin/Singular
411        @echo -e  "export SINGULAR_EXAMPLES_DIR=${CYGWIN_SINGULAR_DOC}/examples" >> /usr/bin/Singular
412        @echo -e  'export PATH="${CYGWIN_SINGULAR_BIN}:$$PATH"' >> /usr/bin/Singular
413        @echo -e  "exec ${CYGWIN_SINGULAR_BIN}/Singular.exe \$$*" >> /usr/bin/Singular
414        @echo -e  Writing /usr/bin/surfex
415        @echo -e  "#! /bin/bash" > /usr/bin/surfex
416        @echo -e  "surfex_dir='/lib/surfex'" >> /usr/bin/surfex
417        @echo -e  "shift" >> /usr/bin/surfex
418        @echo -e  "tmp_dir=/tmp" >> /usr/bin/surfex
419        @echo -e  "std_eqn='x^3+y^3+z^3+1-0.25*(x+y+z+1)^3'" >> /usr/bin/surfex
420        @echo -e  "allargs=''" >> /usr/bin/surfex
421        @echo -e  'if [ -z $$1 ] ; then' >> /usr/bin/surfex
422        @echo -e  '    allargs="-e $$std_eqn"' >> /usr/bin/surfex
423        @echo -e  'else' >> /usr/bin/surfex
424        @echo -e  '    allargs=$$*' >> /usr/bin/surfex
425        @echo -e  'fi' >> /usr/bin/surfex
426        @echo -e  'echo "$$PWD" | sed -e "s/ /\ /g" > $$tmp_dir/tmp.$$$$.txt' >> /usr/bin/surfex
427        @echo -e  'read surfexstartdir <$$tmp_dir/tmp.$$$$.txt' >> /usr/bin/surfex
428        @echo -e  '/bin/rm -f $$tmp_dir/tmp.$$$$.txt' >> /usr/bin/surfex
429        @echo -e  'cd "$$surfex_dir"' >> /usr/bin/surfex
430        @echo -e  'java -jar surfex.jar -d "$$surfexstartdir" -t "$$tmp_dir" $$allargs' >> /usr/bin/surfex
431
432cygwin-dist-install: cygwin-dist-scripts ## ${BINDIST_NAME}.tar.gz
433        if test -d ${TMPDIR}; then rm -fr ${TMPDIR}; fi
434        ${MKINSTALLDIRS} ${TMPDIR}
435        tar  --directory=${TMPDIR} -x -z -f ${SHAREDIST_NAME}.tar.gz
436        -rm -rf ${TMPDIR}/Singular/${S_VERSION}/html
437        tar  --directory=${TMPDIR} -x -z -f ${BINDIST_NAME}.tar.gz
438        -rm -rf ${CYGWIN_SINGULAR_ROOT} ${CYGWIN_SINGULAR_DOC} ${CYGWIN_SINGULAR_BIN}
439        ${MKINSTALLDIRS} ${CYGWIN_SINGULAR_ROOT} ${CYGWIN_SINGULAR_DOC} ${CYGWIN_SINGULAR_BIN}
440## Copy documentation files
441        cp ${TMPDIR}/Singular/${S_VERSION}/README /usr/share/doc/Singular-${CYGWIN_SING_VER}/
442        cp ${TMPDIR}/Singular/${S_VERSION}/INSTALL /usr/share/doc/Singular-${CYGWIN_SING_VER}/
443        cp ${TMPDIR}/Singular/${S_VERSION}/COPYING /usr/share/doc/Singular-${CYGWIN_SING_VER}/
444        cp ${TMPDIR}/Singular/${S_VERSION}/NEWS /usr/share/doc/Singular-${CYGWIN_SING_VER}/
445        cp ${TMPDIR}/Singular/${S_VERSION}/GPL* /usr/share/doc/Singular-${CYGWIN_SING_VER}/
446## Install Cygwin specific structure
447        -rm -rf /lib/surfex
448        mv ${TMPDIR}/Singular/${S_VERSION}/LIB/surfex /lib/surfex
449        -mv -u ${TMPDIR}/Singular/${S_VERSION}/LIB/surfex.jar /lib/surfex/surfex.jar
450        mv ${TMPDIR}/Singular/${S_VERSION}/ix86-Win/* ${CYGWIN_SINGULAR_BIN}/
451        -rmdir ${TMPDIR}/Singular/${S_VERSION}/ix86-Win
452        mv ${TMPDIR}/Singular/${S_VERSION}/LIB ${CYGWIN_SINGULAR_ROOT}/
453        mv ${TMPDIR}/Singular/${S_VERSION}/emacs ${CYGWIN_SINGULAR_ROOT}/
454        mv ${TMPDIR}/Singular/${S_VERSION}/* ${CYGWIN_SINGULAR_DOC}/
455        mv ${CYGWIN_SINGULAR_DOC}/info/singular.hlp /usr/share/info/singular.info
456        -rm -f ${CYGWIN_SINGULAR_BIN}/surfex
457## Copy auxiliar files
458        cp ${CYGWIN_AUX_FILES}/surf.exe /usr/bin/
459        cp ${CYGWIN_AUX_FILES}/SURF_AUTHORS ${CYGWIN_SINGULAR_BIN}/
460        cp ${CYGWIN_AUX_FILES}/SURF_README ${CYGWIN_SINGULAR_BIN}/
461        cp ${CYGWIN_AUX_FILES}/SURF_COPYING ${CYGWIN_SINGULAR_BIN}/
462        cp ${CYGWIN_AUX_FILES}/Manual.chm ${CYGWIN_SINGULAR_DOC}/doc
463        cp ${CYGWIN_AUX_FILES}/startxserver.bat ${CYGWIN_SINGULAR_BIN}/
464        unix2dos ${CYGWIN_SINGULAR_BIN}/startxserver.bat
465##      Download setup exe
466        export http_proxy=http://positron.mathematik.uni-kl.de:3128; \
467        wget http://cygwin.com/setup.exe -O ${CYGWIN_SINGULAR_BIN}/cygwin-setup.exe
468##      or copy from local folder
469#       cp ${CYGWIN_AUX_FILES}/cygwin-setup.exe ${CYGWIN_SINGULAR_BIN}/cygwin-setup.exe
470        cp ${CYGWIN_AUX_FILES}/singular-base.README /usr/share/doc/Cygwin/singular-base-${CYGWIN_SING_VER}.README
471        cp ${CYGWIN_AUX_FILES}/singular-share.README /usr/share/doc/Cygwin/singular-share-${CYGWIN_SING_VER}.README
472        cp ${CYGWIN_AUX_FILES}/singular-help.README /usr/share/doc/Cygwin/singular-help-${CYGWIN_SING_VER}.README
473        cp ${CYGWIN_AUX_FILES}/singular-surf.README /usr/share/doc/Cygwin/singular-surf-${CYGWIN_SING_VER}.README
474        cp ${CYGWIN_AUX_FILES}/singular-icons.README /usr/share/doc/Cygwin/singular-icons-${CYGWIN_SING_VER}.README
475
476cygwin-dist-pack: ## singular-base-${CYGWIN_PORT_VER}-src.tar.bz2
477        -rm -r -f ${CYGWIN_REP_DIR}
478        mkdir ${CYGWIN_REP_DIR}
479        mkdir ${CYGWIN_REP_DIR}/release
480        mkdir ${CYGWIN_REP_DIR}/release/Singular
481        tar cjf ${CYGWIN_REP_DIR}/release/Singular/singular-base-${CYGWIN_PORT_VER}.tar.bz2 \
482              /usr/share/doc/Cygwin/singular-base-${CYGWIN_SING_VER}.README \
483              /usr/share/doc/Singular-${CYGWIN_SING_VER}/COPYING  \
484              /usr/share/doc/Singular-${CYGWIN_SING_VER}/INSTALL  \
485              /usr/share/doc/Singular-${CYGWIN_SING_VER}/NEWS     \
486              /usr/share/doc/Singular-${CYGWIN_SING_VER}/README   \
487              /usr/share/doc/Singular-${CYGWIN_SING_VER}/GPL*  \
488              /usr/bin/Singular                  \
489              /usr/bin/ESingular                 \
490              ${CYGWIN_SINGULAR_BIN}/*Singular*       \
491              ${CYGWIN_SINGULAR_BIN}/solve_IP.exe     \
492              ${CYGWIN_SINGULAR_BIN}/toric_ideal.exe  \
493              ${CYGWIN_SINGULAR_BIN}/change_cost.exe  \
494              ${CYGWIN_SINGULAR_BIN}/LLL.exe          \
495              ${CYGWIN_SINGULAR_BIN}/libparse.exe     \
496              ${CYGWIN_SINGULAR_BIN}/gen_test.exe
497        tar cjf ${CYGWIN_REP_DIR}/release/Singular/singular-surf-${CYGWIN_PORT_VER}.tar.bz2 \
498              /usr/share/doc/Cygwin/singular-surf-${CYGWIN_SING_VER}.README \
499              /usr/bin/surf.exe                     \
500              /usr/bin/surfex                       \
501              ${CYGWIN_SINGULAR_BIN}/SURF_AUTHORS   \
502              ${CYGWIN_SINGULAR_BIN}/SURF_README    \
503              ${CYGWIN_SINGULAR_BIN}/SURF_COPYING   \
504              /lib/surfex/*                         \
505              ${CYGWIN_SINGULAR_ROOT}/LIB/surf.lib  \
506              ${CYGWIN_SINGULAR_ROOT}/LIB/surfex.lib
507        tar -cj --exclude='surf*' -f \
508              ${CYGWIN_REP_DIR}/release/Singular/singular-share-${CYGWIN_PORT_VER}.tar.bz2 \
509              /usr/share/doc/Cygwin/singular-share-${CYGWIN_SING_VER}.README \
510              ${CYGWIN_SINGULAR_ROOT}/*
511        tar cjf ${CYGWIN_REP_DIR}/release/Singular/singular-help-${CYGWIN_PORT_VER}.tar.bz2 \
512              /usr/share/doc/Cygwin/singular-help-${CYGWIN_SING_VER}.README \
513              /usr/share/info/singular.info                                 \
514              ${CYGWIN_SINGULAR_DOC}/*
515        tar cjf ${CYGWIN_REP_DIR}/release/Singular/singular-icons-${CYGWIN_PORT_VER}.tar.bz2  \
516              /usr/share/doc/Cygwin/singular-icons-${CYGWIN_SING_VER}.README \
517              ${CYGWIN_SINGULAR_BIN}/cygwin-setup.exe                \
518              ${CYGWIN_SINGULAR_BIN}/startxserver.bat                \
519              /etc/postinstall/singular-icons.sh
520        cp singular-base-${CYGWIN_PORT_VER}-src.tar.bz2 ${CYGWIN_REP_DIR}/release/Singular/
521        touch ${CYGWIN_AUX_FILES}/singular-surf-${CYGWIN_PORT_VER}-src.tar.bz2
522        cp ${CYGWIN_AUX_FILES}/singular-surf-${CYGWIN_PORT_VER}-src.tar.bz2 ${CYGWIN_REP_DIR}/release/Singular/
523
524cygwin-helper: cygwin-setup-init cygwin-setup-helper
525        ${MKINSTALLDIRS} ${CYGWIN_REP_DIR}/release/Singular
526        touch ${CYGWIN_REP_DIR}/release/Singular/singular-helper-${CYGWIN_PORT_VER}.tar.bz2
527
528cygwin-dist: cygwin-dist-install cygwin-dist-pack
529
530cygwin-setup-init:
531        mkinstalldirs ${CYGWIN_REP_DIR}
532        @echo "Writing ${CYGWIN_REP_DIR}/setup.ini"
533        @echo "# This file is automatically generated by Makefile." > ${CYGWIN_REP_DIR}/setup.ini
534        @echo "# Special for Singular Distribution." >> ${CYGWIN_REP_DIR}/setup.ini
535        @echo -n "setup-timestamp: " >> ${CYGWIN_REP_DIR}/setup.ini
536        @echo `perl -e 'print time'` >> ${CYGWIN_REP_DIR}/setup.ini
537        @echo "setup-version: ${CYGWIN_SETUP_VER}" >> ${CYGWIN_REP_DIR}/setup.ini
538        @echo >> ${CYGWIN_REP_DIR}/setup.ini
539        if test -f ${CYGWIN_ORIG}/Small/setup.ini; then                             \
540                tail -n +7 ${CYGWIN_ORIG}/Small/setup.ini >> ${CYGWIN_REP_DIR}/setup.ini;  \
541        else                                                                        \
542                tail -n +7 ${CYGWIN_ORIG}/Full/setup.ini >> ${CYGWIN_REP_DIR}/setup.ini;   \
543        fi;
544        @echo >> ${CYGWIN_REP_DIR}/setup.ini
545##      Download setup exe
546        export http_proxy=http://positron.mathematik.uni-kl.de:3128; \
547        wget http://cygwin.com/setup.exe -O ${CYGWIN_REP_DIR}/setup.exe
548##      or copy from local folder
549#       cp ${CYGWIN_AUX_FILES}/cygwin-setup.exe ${CYGWIN_REP_DIR}/setup.exe
550
551cygwin-setup-beta: cygwin-setup-init cygwin-setup-helper cygwin-setup-base cygwin-setup-share cygwin-setup-icons cygwin-setup-help cygwin-setup-surf
552        cp ${CYGWIN_REP_DIR}/setup.ini ${CYGWIN_REP_DIR}/setup
553        cd ${CYGWIN_REP_DIR} && bzip2 -f setup
554        cd ${CYGWIN_REP_DIR} && md5sum setup.* | sed -e 's/*//g' > md5.sum
555        cp -r ${CYGWIN_REP_DIR}/release/* ${CYGWIN_ORIG}/Full/release
556        rm -rf ${CYGWIN_ORIG}/Full/release/Singular/singular-base-*-src.tar.bz2
557        rm -rf ${CYGWIN_ORIG}/Full/release/Singular/singular-surf-*-src.tar.bz2
558        cp -r ${CYGWIN_REP_DIR}/release/* ${CYGWIN_ORIG}/Small/release
559        rm -rf ${CYGWIN_ORIG}/Small/release/Singular/singular-base-*-src.tar.bz2
560
561cygwin-setup: cygwin-setup-init cygwin-setup-helper
562        cp ${CYGWIN_REP_DIR}/setup.ini ${CYGWIN_REP_DIR}/setup
563        cd ${CYGWIN_REP_DIR} && bzip2 -f setup
564        cd ${CYGWIN_REP_DIR} && md5sum setup.* | sed -e 's/*//g' > md5.sum
565
566cygwin-setup-%:
567        @echo "Writing ${CYGWIN_REP_DIR}/setup.ini ($*)"
568        @echo "@ singular-$*" >> ${CYGWIN_REP_DIR}/setup.ini
569        cat ${CYGWIN_AUX_FILES}/setup-$*.hint >> ${CYGWIN_REP_DIR}/setup.ini
570        @echo "version: ${CYGWIN_PORT_VER}" >> ${CYGWIN_REP_DIR}/setup.ini
571        @echo -n "install: release/Singular/singular-$*-${CYGWIN_PORT_VER}.tar.bz2 "  >> ${CYGWIN_REP_DIR}/setup.ini
572        @echo -n `du -b ${CYGWIN_REP_DIR}/release/Singular/singular-$*-${CYGWIN_PORT_VER}.tar.bz2 | sed -e 's/\([0-9]*\).*/\1/g'` >> ${CYGWIN_REP_DIR}/setup.ini
573        @echo -n " " >> ${CYGWIN_REP_DIR}/setup.ini
574        @echo `md5sum ${CYGWIN_REP_DIR}/release/Singular/singular-$*-${CYGWIN_PORT_VER}.tar.bz2 | sed -e 's/\([a-zA-Z0-9]*\).*/\1/g'` >> ${CYGWIN_REP_DIR}/setup.ini
575        @if test -e ${CYGWIN_REP_DIR}/release/Singular/singular-$*-${CYGWIN_PORT_VER}-src.tar.bz2; then \
576          echo -n "source: release/Singular/singular-$*-${CYGWIN_PORT_VER}-src.tar.bz2 "  >> ${CYGWIN_REP_DIR}/setup.ini; \
577          echo -n `du -b ${CYGWIN_REP_DIR}/release/Singular/singular-$*-${CYGWIN_PORT_VER}-src.tar.bz2 | sed -e 's/\([0-9]*\).*/\1/g'` >> ${CYGWIN_REP_DIR}/setup.ini; \
578          echo -n " " >> ${CYGWIN_REP_DIR}/setup.ini; \
579          echo `md5sum ${CYGWIN_REP_DIR}/release/Singular/singular-$*-${CYGWIN_PORT_VER}-src.tar.bz2 | sed -e 's/\([a-zA-Z0-9]*\).*/\1/g'` >> ${CYGWIN_REP_DIR}/setup.ini; \
580        fi;
581        @echo >> ${CYGWIN_REP_DIR}/setup.ini
582
583cygwin-pfw: cygwin-pfw-Small cygwin-pfw-Full
584
585cygwin-pfw-%:
586        if test -d ${TMPDIR}; then rm -rf ${TMPDIR}; fi
587        ${MKINSTALLDIRS} ${TMPDIR}/Files
588        cp -r ${CYGWIN_ORIG}/$*/* ${TMPDIR}/Files/
589        touch ${TMPDIR}/Files/release/Singular/singular-helper-${CYGWIN_PORT_VER}.tar.bz2
590        @echo "Creating $* distribution ..."
591        -rm -f  ${TMPDIR}/Files/setup.exe
592        cp ${CYGWIN_AUX_FILES}/setup-pfw.exe ${TMPDIR}/Files/setup.exe
593        cat ${CYGWIN_REP_DIR}/setup.ini | sed -e 's/setup-version:.*//' | sed -e 's/setup-timestamp:.*//' >> ${TMPDIR}/Files/setup.ini
594        @echo Writing Singular.pfw ...
595        @echo "Version=2.0" >> ${TMPDIR}/Singular.pfw
596        @echo "" >> ${TMPDIR}/Singular.pfw
597        @echo "[Options]" >> ${TMPDIR}/Singular.pfw
598        @echo "Title=Singular ${S_VERSION}: $* Distribution" >> ${TMPDIR}/Singular.pfw
599        @echo "Company=Department of Mathematics and Center for Computer Algebra, University of Kaiserslautern" >> ${TMPDIR}/Singular.pfw
600        @echo "CompanyEMail=singular@mathematik.uni-kl.de" >> ${TMPDIR}/Singular.pfw
601        @echo -n "BasePath="  >> ${TMPDIR}/Singular.pfw
602        @echo `cygpath -a -w ${TMPDIR}/Files` >> ${TMPDIR}/Singular.pfw
603        @echo "ImportPath=" >> ${TMPDIR}/Singular.pfw
604        @echo "UseRTF=1" >> ${TMPDIR}/Singular.pfw
605        @echo "SaveFiles=0" >> ${TMPDIR}/Singular.pfw
606        @echo "SubFolders=1" >> ${TMPDIR}/Singular.pfw
607        @echo "ApplicationName=Singular ${S_VERSION} Build `date -u +%D' UTC '%T`" >> ${TMPDIR}/Singular.pfw
608        @echo "Description=A Computer Algebra System For Polynomial Computations" >> ${TMPDIR}/Singular.pfw
609        @echo "Comments=Authors: G.-M. Greuel, G. Pfister, H. Schoenemann" >> ${TMPDIR}/Singular.pfw
610        @echo "Notice=Distributed under General Public License (GPL)" >> ${TMPDIR}/Singular.pfw
611        @echo "Version=@SINGULAR_VERSION@" >> ${TMPDIR}/Singular.pfw
612        @echo -n "OutputSpec=" >> ${TMPDIR}/Singular.pfw
613        @echo -n "`cygpath -a -w .`" >> ${TMPDIR}/Singular.pfw
614        @echo "\Singular-${S_VERSION}-$*.exe" >> ${TMPDIR}/Singular.pfw
615        @echo "GUIDs=0" >> ${TMPDIR}/Singular.pfw
616        @echo "Type=2" >> ${TMPDIR}/Singular.pfw
617        @echo "Compress=1" >> ${TMPDIR}/Singular.pfw
618        @echo "Sign=0" >> ${TMPDIR}/Singular.pfw
619        @echo "Transfer=0" >> ${TMPDIR}/Singular.pfw
620        @echo "" >> ${TMPDIR}/Singular.pfw
621        @echo "[Runtime]" >> ${TMPDIR}/Singular.pfw
622        @echo "Welcome=" >> ${TMPDIR}/Singular.pfw
623        @echo -n "License=" >> ${TMPDIR}/Singular.pfw
624        @echo -n "`cygpath -a -w .`" >> ${TMPDIR}/Singular.pfw
625        @echo "\GPL" >> ${TMPDIR}/Singular.pfw
626        @echo "Prompt=" >> ${TMPDIR}/Singular.pfw
627        @echo "Password=" >> ${TMPDIR}/Singular.pfw
628        @echo "DefaultPath=" >> ${TMPDIR}/Singular.pfw
629        @echo "Language=English" >> ${TMPDIR}/Singular.pfw
630        @echo "WindowStyle=0" >> ${TMPDIR}/Singular.pfw
631        @echo "Options=33" >> ${TMPDIR}/Singular.pfw
632        @echo "Execute=setup.exe" >> ${TMPDIR}/Singular.pfw
633        @echo "CmdLine=-L -q -n" >> ${TMPDIR}/Singular.pfw
634        @echo "AllowChangeTarget=0" >> ${TMPDIR}/Singular.pfw
635        @echo "AllowDelete=0" >> ${TMPDIR}/Singular.pfw
636        @echo "LaunchEXE=1" >> ${TMPDIR}/Singular.pfw
637        @echo "" >> ${TMPDIR}/Singular.pfw
638        @echo "[Extension]" >> ${TMPDIR}/Singular.pfw
639        @echo "Server=" >> ${TMPDIR}/Singular.pfw
640        @echo "Calls=0" >> ${TMPDIR}/Singular.pfw
641        cd ${CYGWIN_PFW_DIR}; \
642        ${CYGWIN_PFW_EXEC} -a -s "`cygpath -a -w ${TMPDIR}/Singular.pfw`"
643
644singular-cd-windows:
645        @echo Building cd directories and web interface
646        ${MKINSTALLDIRS} singular-cd/WINDOWS/Files/Repository
647        @echo WEBPAGE FEATURE NOT INTRODUCED
648        @echo Buidling cd autostart
649        @echo AUTOSTART FEATURE NOT INTRODUCED
650        @echo Copying PackageForTheWeb
651        cp Singular-${S_VERSION}-*.exe singular-cd/WINDOWS/Files/
652        cp Singular/singular.ico singular-cd/WINDOWS/Files/
653        @echo Building cygwin-cd-repository
654        cp -r ${CYGWIN_ORIG}/cd-repository/* singular-cd/WINDOWS/Files/Repository/
655        cp -r ${CYGWIN_REP_DIR}/release/Singular singular-cd/WINDOWS/Files/Repository/release/
656        cp ${CYGWIN_AUX_FILES}/setup-cd.exe singular-cd/WINDOWS/Files/Repository/
657        cat ${CYGWIN_REP_DIR}/setup.ini | sed -e 's/setup-version:.*//' | sed -e 's/setup-timestamp:.*//' >> singular-cd/WINDOWS/Files/Repository/setup.ini
658
659##
660## old targets -- need to be updated
661##
662
663BINDIR_NAME     = Singular/${S_VERSION}/${SINGUNAME}
664LIBDIR_NAME     = Singular/${S_VERSION}/LIB
665GFTABLESDIR_NAME= Singular/${S_VERSION}/LIB/gftables
666DOCDIR_NAME     = Singular/${S_VERSION}/doc
667HTMLDIR_NAME    = Singular/${S_VERSION}/html
668INFODIR_NAME    = Singular/${S_VERSION}/info
669EMACSDIR_NAME   = Singular/${S_VERSION}/emacs
670
671ZIP             = zip
672
673test_t:
674        echo ${S_VERSION}
675
676.PHONY: sharedist bindist static-bindist infodist win-sharedist
677_static-bindist: ${SINGULAR}
678        cd Singular; ${MAKE} Singular-$@ libparse
679        rm -rf ${TMPDIR}
680        ${MKINSTALLDIRS} ${TMPDIR}/${BINDIR_NAME}
681        cp Singular/Singular-$@ ${TMPDIR}/${BINDIR_NAME}/Singular-static
682        cp Singular/libparse ${TMPDIR}/${BINDIR_NAME}
683        -strip ${TMPDIR}/${BINDIR_NAME}/*
684        cat INSTALL.unix | sed -e "s/<x-y-z>/${S_VERSION}/g" > \
685                      ${TMPDIR}/Singular/INSTALL
686        cd ${TMPDIR}; chmod -R a+rX *;\
687           tar cf - Singular | ${MYGZIP} > ${BINDIST_NAME}-static.tar.gz
688        mv ${TMPDIR}/${BINDIST_NAME}-static.tar.gz .
689        rm -rf ${TMPDIR}
690
691_infodist:
692        rm -rf ${TMPDIR}
693        ${MKINSTALLDIRS} ${TMPDIR}/${SINGUNAME}/bin/
694        cp `which info` ${TMPDIR}/${SINGUNAME}/bin/
695        -strip ${TMPDIR}/${SINGUNAME}/bin/info
696        cd ${TMPDIR}; tar cf - ${SINGUNAME} | ${MYGZIP}  > info-${SINGUNAME}.tar.gz
697        mv ${TMPDIR}/info-${SINGUNAME}.tar.gz .
698        rm -rf ${TMPDIR}
699
700INSTALL         = ./Singular/install-sh -c
701SH_PROGRAM      = /bin/sh
702INFO_PROGRAM    = /bin/info
703CYGWIN_DLL      = /bin/cygwin1.dll
704
705windist: ${SINGULAR}
706        cd Singular; ${MAKE} install-bindist
707        rm -rf ${TMPDIR}
708        ${MKINSTALLDIRS} ${TMPDIR}/${BINDIR_NAME}
709        ${INSTALL} Singular/Singular-bindist \
710                   ${TMPDIR}/${BINDIR_NAME}/Singular.exe
711        ${INSTALL} Singular/libparse ${TMPDIR}/${BINDIR_NAME}
712        ${INSTALL} ${SH_PROGRAM} ${TMPDIR}/${BINDIR_NAME}
713        ${INSTALL} ${INFO_PROGRAM} ${TMPDIR}/${BINDIR_NAME}
714        ${INSTALL} ${CYGWIN_DLL} ${TMPDIR}/${BINDIR_NAME}
715        cat INSTALL.win | sed -e "s/<x-y-z>/${S_VERSION}/g" > \
716                         ${TMPDIR}/Singular/INSTALL
717        cd ${TMPDIR}; chmod -R a+rX *;\
718           ${ZIP} -r sing Singular
719        mv ${TMPDIR}/sing.zip Singular-${S_VERSION}-${SINGUNAME}.zip
720        rm -rf ${TMPDIR}
721
722srcdist:
723        rm -rf ${TMPDIR}
724        ${MKINSTALLDIRS} ${TMPDIR}/Singular-${S_VERSION}
725        cd ${TMPDIR}/Singular-${S_VERSION}; cvs co All
726        cd  ${TMPDIR}; \
727        tar cf - Singular-${S_VERSION}| ${MYGZIP} > Singular-${S_VERSION}.tar.gz
728        cp ${TMPDIR}/Singular-${S_VERSION}.tar.gz .
729        rm -rf ${TMPDIR}
730
731# You can remeber the password with "iwd" == "ich war dabei"
732CRYPT   = enigma # it does not seem to decrypt correctly with the HP crypt
733cryptdist: srcdist
734        ${CRYPT} S-${S_VERSION}-iwd < Singular-${S_VERSION}.tar.gz > Singular-${S_VERSION}.tar.gz.crypt
735
736
737##############################################################
738# stuff for configure
739Makefile : Makefile.in config.status
740        CONFIG_FILES=Makefile ./config.status
741
742doc/Makefile: doc/Makefile.in config.status
743        CONFIG_FILES=doc/Makefile ./config.status
744
745config.status: configure
746        ./config.status --recheck
747
748configure: configure.in
749        @echo "You need to rerun autoconf. I am proceeding, for now."
750        @touch configure
751#       autoconf
752#
Note: See TracBrowser for help on using the repository browser.