source: git/Makefile.in @ 3e0c94f

spielwiese
Last change on this file since 3e0c94f was 3e0c94f, checked in by Hans Schönemann <hannes@…>, 15 years ago
*hannes: no separate plural targets (except doc) git-svn-id: file:///usr/local/Singular/svn/trunk@11266 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 36.0 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
198SHAREDIST_DIRS      = Singular doc emacs
199TMPDIR              = ${TMP_DIR}/singdist
200
201LN_S            = @LN_S@
202MKINSTALLDIRS   = ./mkinstalldirs
203
204BINDIST_NAME            = Singular-${S_VERSION}-${SINGUNAME}
205PLU_BINDIST_NAME        = SingularPlural-${S_VERSION}-${SINGUNAME}
206SHAREDIST_NAME          = Singular-${S_VERSION}-share
207PLU_SHAREDIST_NAME      = SingularPlural-${S_VERSION}-share
208
209
210install-dist install-local: install-bindist install-sharedist
211
212install-bindist:
213        for DIR in ${BINDIST_DIRS}; \
214        do \
215          if test -d $${DIR}; then \
216            (cd $${DIR}; ${MAKE} install-bindist install_prefix=${install_prefix});\
217          fi \
218        done
219
220install-bindist-plural:
221        for DIR in ${PLU_BINDIST_DIRS}; \
222        do \
223          if test -d $${DIR}; then \
224            (cd $${DIR}; ${MAKE} install-bindist-plural install_prefix=${install_prefix});\
225          fi \
226        done
227
228install-sharedist: ${SINGULAR}
229        for DIR in ${SHAREDIST_DIRS}; \
230        do \
231          (cd $${DIR}; ${MAKE} install-sharedist install_prefix=${install_prefix}); \
232        done
233
234install-sharedist-plural: ${SINGULAR}
235        for DIR in ${PLU_SHAREDIST_DIRS}; \
236        do \
237          (cd $${DIR}; ${MAKE} install-sharedist-plural install_prefix=${install_prefix}); \
238        done
239
240dist: ${SHAREDIST_NAME}.tar.gz  ${BINDIST_NAME}.tar.gz
241
242dist-plural: ${PLU_SHAREDIST_NAME}.tar.gz  ${PLU_BINDIST_NAME}.tar.gz
243
244sharedist ${SHAREDIST_NAME}.tar.gz:
245        if test -d ${TMPDIR}; then rm -rf ${TMPDIR}; fi
246        ${MAKE} install-sharedist localdir=${TMPDIR}
247        chmod -R a+rX ${TMPDIR}
248        cd ${TMPDIR}; tar cf - Singular| ${MYGZIP} > ${SHAREDIST_NAME}.tar.gz
249        mv ${TMPDIR}/${SHAREDIST_NAME}.tar.gz .
250        rm -rf ${TMPDIR}
251
252sharedist-plural ${PLU_SHAREDIST_NAME}.tar.gz:
253        if test -d ${TMPDIR}; then rm -rf ${TMPDIR}; fi
254        ${MAKE} install-sharedist-plural localdir=${TMPDIR}
255        chmod -R a+rX ${TMPDIR}
256        cd ${TMPDIR}; tar cf - Singular| ${MYGZIP} > ${SHAREDIST_NAME}.tar.gz
257        mv ${TMPDIR}/${SHAREDIST_NAME}.tar.gz .
258        rm -rf ${TMPDIR}
259
260bindist ${BINDIST_NAME}.tar.gz:
261        if test -d ${TMPDIR}; then rm -fr ${TMPDIR}; fi
262        ${MAKE} install-bindist localdir=${TMPDIR}
263        chmod -R a+rX ${TMPDIR}
264        cd ${TMPDIR}; tar cf - Singular| ${MYGZIP} > ${BINDIST_NAME}.tar.gz
265        mv ${TMPDIR}/${BINDIST_NAME}.tar.gz .
266        rm -rf ${TMPDIR}
267
268static-bindist ${BINDIST_NAME}-static.tar.gz:
269        if test -d ${TMPDIR}; then rm -fr ${TMPDIR}; fi
270        ${MAKE} install-bindist localdir=${TMPDIR} LD_STATIC=1
271        chmod -R a+rX ${TMPDIR}
272        -rm -f ${TMPDIR}/Singular/*/*/*.so
273        cd ${TMPDIR}; tar cf - Singular| ${MYGZIP} > ${BINDIST_NAME}-static.tar.gz
274        mv ${TMPDIR}/${BINDIST_NAME}-static.tar.gz .
275        rm -rf ${TMPDIR}
276
277static-bindist-plural ${PLU_BINDIST_NAME}-static.tar.gz:
278        if test -d ${TMPDIR}; then rm -fr ${TMPDIR}; fi
279        ${MAKE} install-bindist-plural localdir=${TMPDIR} LD_STATIC=1
280        chmod -R a+rX ${TMPDIR}
281        cd ${TMPDIR}; tar cf - Singular| ${MYGZIP} > ${BINDIST_NAME}-static.tar.gz
282        mv ${TMPDIR}/${BINDIST_NAME}-static.tar.gz .
283        rm -rf ${TMPDIR}
284
285install-root:
286        ${MKINSTALLDIRS} ${localdir}/bin
287        ${LN_S} ${localdir}/Singular/${S_VERSION}/${SINGUNAME}/Singular ${localdir}/bin/Singular-${S_VERSION}
288        ${LN_S} ${localdir}/Singular/${S_VERSION}/${SINGUNAME}/ESingular ${localdir}/bin/ESingular-${S_VERSION}
289
290##############################################################
291# targets for the windows distribution
292#
293
294cygwin-dist-src singular-base-${CYGWIN_PORT_VER}-src.tar.bz2:
295        -rm -rf ${TMPDIR}
296        ${MKINSTALLDIRS} ${TMPDIR}/singular-${CYGWIN_PORT_VER}
297        export CVS_RSH=ssh; export CVSROOT=:ext:monty.mathematik.uni-kl.de:/usr/local/Singular/cvsroot; \
298        cd ${TMPDIR}/singular-${CYGWIN_PORT_VER}; cvs export All;
299        cd  ${TMPDIR}; \
300        tar cjf singular-base-${CYGWIN_PORT_VER}-src.tar.bz2 singular-${CYGWIN_PORT_VER};
301        mv ${TMPDIR}/singular-base-${CYGWIN_PORT_VER}-src.tar.bz2 .
302        -rm -rf ${TMPDIR}
303
304cygwin-dist-scripts:
305        @echo -e  "Writing /etc/postinstall/singular-help.sh"
306        @echo -e  '#!/bin/sh' > /etc/postinstall/singular-help.sh
307        @echo -e  '' >> /etc/postinstall/singular-icons.sh
308        @echo -e  'install-info' >> /etc/postinstall/singular-icons.sh
309        @echo -e  'mkdir "`cygpath -u -A -P`/Singular CAS"' >> /etc/postinstall/singular-icons.sh
310        @echo -e  "Writing /etc/postinstall/singular-icons.sh"
311        @echo -e  '#!/bin/sh' > /etc/postinstall/singular-icons.sh
312        @echo -e  '' >> /etc/postinstall/singular-icons.sh
313        @echo -e  'mkdir "`cygpath -u -A -P`/Singular CAS"' >> /etc/postinstall/singular-icons.sh
314        @echo -e  'mkdir "`cygpath -u -A -P`/Singular CAS/Cygwin"' >> /etc/postinstall/singular-icons.sh
315        @echo -e  '' >> /etc/postinstall/singular-icons.sh
316        @echo -e  '##################### Singular CAS\Cygwin' >> /etc/postinstall/singular-icons.sh
317        @echo -e  '# Cygwin - Setup' >> /etc/postinstall/singular-icons.sh
318        @echo -e  'mkshortcut -A -a \047\047 \' >> /etc/postinstall/singular-icons.sh
319        @echo -e  '       -i ${CYGWIN_SINGULAR_BIN}/cygwin-setup.exe -n "Singular CAS\\Cygwin\\Setup (Cygwin)" \' >> /etc/postinstall/singular-icons.sh
320        @echo -e  '       -P ${CYGWIN_SINGULAR_BIN}/cygwin-setup.exe \' >> /etc/postinstall/singular-icons.sh
321        @echo -e  '       -d "Use this program to update, modify or remove your Singular and Cygwin installation"' >> /etc/postinstall/singular-icons.sh
322        @echo -e  '' >> /etc/postinstall/singular-icons.sh
323        @echo -e  '# Bash Shell' >> /etc/postinstall/singular-icons.sh
324        @echo -e  'mkshortcut -A -a \047\047 \' >> /etc/postinstall/singular-icons.sh
325        @echo -e  '       -P /cygwin.bat -n "Singular CAS\\Cygwin\\Bash shell" \' >> /etc/postinstall/singular-icons.sh
326        @echo -e  '       -i ${CYGWIN_SINGULAR_BIN}/cygwin-setup.exe \' >> /etc/postinstall/singular-icons.sh
327        @echo -e  '       -d "A simple Bash shell"' >> /etc/postinstall/singular-icons.sh
328        @echo -e  '' >> /etc/postinstall/singular-icons.sh
329        @echo -e  '# Rxvt Terminal' >> /etc/postinstall/singular-icons.sh
330        @echo -e  'mkshortcut -A -a \047-rv -fn "FixedSys" -e /bin/bash --login -i\047 \' >> /etc/postinstall/singular-icons.sh
331        @echo -e  '       -i /bin/rxvt.exe -n "Singular CAS\\Cygwin\\Rxvt - Terminal" \' >> /etc/postinstall/singular-icons.sh
332        @echo -e  '       -P /bin/rxvt -d "Start Singular in a rxvt terminal"' >> /etc/postinstall/singular-icons.sh
333        @echo -e  '' >> /etc/postinstall/singular-icons.sh
334        @echo -e  '# xterm' >> /etc/postinstall/singular-icons.sh
335        @echo -e  'if test -f /usr/bin/XWin.exe; then' >> /etc/postinstall/singular-icons.sh
336        @echo -e  'mkshortcut -A -a \047\047 \' >> /etc/postinstall/singular-icons.sh
337        @echo -e  '       -i /usr/bin/XWin.exe \' >> /etc/postinstall/singular-icons.sh
338        @echo -e  '       -P /usr/bin/startxwin.bat -n "Singular CAS\\Cygwin\\XTerm" \' >> /etc/postinstall/singular-icons.sh
339        @echo -e  '       -d "This starts the Cygwin X-Server and launches one XTerm"' >> /etc/postinstall/singular-icons.sh
340        @echo -e  '' >> /etc/postinstall/singular-icons.sh
341        @echo -e  '# XServer + xterm' >> /etc/postinstall/singular-icons.sh
342        @echo -e  'mkshortcut -A -a \047\047 \' >> /etc/postinstall/singular-icons.sh
343        @echo -e  '       -i /usr/bin/XWin.exe \' >> /etc/postinstall/singular-icons.sh
344        @echo -e  '       -P /usr/bin/startxwin.bat -n "Singular CAS\\Cygwin\\Start X - Server (+ XTerm)" \' >> /etc/postinstall/singular-icons.sh
345        @echo -e  '       -d "This starts the Cygwin X-Server and launches one XTerm"' >> /etc/postinstall/singular-icons.sh
346        @echo -e  'fi' >> /etc/postinstall/singular-icons.sh
347        @echo -e  '' >> /etc/postinstall/singular-icons.sh
348        @echo -e  '##################### Singular CAS' >> /etc/postinstall/singular-icons.sh
349        @echo -e  '# Emacs + Singular EXP' >> /etc/postinstall/singular-icons.sh
350        @echo -e  'if test -f /usr/bin/XWin.exe; then' >> /etc/postinstall/singular-icons.sh
351        @echo -e  'mkshortcut -A -a \047bash -l -c "${CYGWIN_SINGULAR_BIN}/startxserver.bat && sleep 1 &&  ESingular"\047 \' >> /etc/postinstall/singular-icons.sh
352        @echo -e  '       -i ${CYGWIN_SINGULAR_BIN}/runESingular.exe -n "Singular CAS\\Singular (Emacs and X-Server) (experimental)" \' >> /etc/postinstall/singular-icons.sh
353        @echo -e  '       -w /bin \' >> /etc/postinstall/singular-icons.sh
354        @echo -e  '       -P /usr/bin/run.exe -d "Start Singular in Emacs after starting the X - Server"' >> /etc/postinstall/singular-icons.sh
355        @echo -e  'fi' >> /etc/postinstall/singular-icons.sh
356        @echo -e  '' >> /etc/postinstall/singular-icons.sh
357        @echo -e  '# Singular in rxvt' >> /etc/postinstall/singular-icons.sh
358        @echo -e  'mkshortcut -A -a \047-rv -fn "FixedSys" -e /bin/bash --login -i -c Singular\047 \' >> /etc/postinstall/singular-icons.sh
359        @echo -e  '       -i ${CYGWIN_SINGULAR_BIN}/runTSingular.exe -n "Singular CAS\\Singular (rxvt)" \' >> /etc/postinstall/singular-icons.sh
360        @echo -e  '       -P /bin/rxvt -d "Start Singular in a rxvt terminal"' >> /etc/postinstall/singular-icons.sh
361        @echo -e  '' >> /etc/postinstall/singular-icons.sh
362        @echo -e  '# Singular in Dos mode' >> /etc/postinstall/singular-icons.sh
363        @echo -e  'mkshortcut -A -a Singular \' >> /etc/postinstall/singular-icons.sh
364        @echo -e  '       -i ${CYGWIN_SINGULAR_BIN}/Singular.exe -n "Singular CAS\\Singular (Terminal)" \' >> /etc/postinstall/singular-icons.sh
365        @echo -e  '       -P /bin/bash -d "Start Singular in a Microsoft terminal"' >> /etc/postinstall/singular-icons.sh
366        @echo -e  '' >> /etc/postinstall/singular-icons.sh
367        @echo -e  '# Singular in Emacs' >> /etc/postinstall/singular-icons.sh
368        @echo -e  'if test -f usr/bin/XWin.exe; then' >> /etc/postinstall/singular-icons.sh
369        @echo -e  'mkshortcut -A -a \047bash -l ESingular\047 \' >> /etc/postinstall/singular-icons.sh
370        @echo -e  '       -i ${CYGWIN_SINGULAR_BIN}/runESingular.exe -n "Singular CAS\\Singular (Emacs)" \' >> /etc/postinstall/singular-icons.sh
371        @echo -e  '       -w /bin \' >> /etc/postinstall/singular-icons.sh
372        @echo -e  '       -P /usr/bin/run.exe \' >> /etc/postinstall/singular-icons.sh
373        @echo -e  '       -d "Start Singular in Emacs"' >> /etc/postinstall/singular-icons.sh
374        @echo -e  '' >> /etc/postinstall/singular-icons.sh
375        @echo -e  '# Only XServer' >> /etc/postinstall/singular-icons.sh
376        @echo -e  'mkshortcut -A -a \047\047 \' >> /etc/postinstall/singular-icons.sh
377        @echo -e  '       -i /usr/bin/XWin.exe \' >> /etc/postinstall/singular-icons.sh
378        @echo -e  '       -w /usr/bin \' >> /etc/postinstall/singular-icons.sh
379        @echo -e  '       -P ${CYGWIN_SINGULAR_BIN}/startxserver.bat -n "Singular CAS\\Start X - Server (needed for emacs and surf)" \' >> /etc/postinstall/singular-icons.sh
380        @echo -e  '       -d "This starts the Cygwin X-Server. Without XServer Emacs and Surf do not work."' >> /etc/postinstall/singular-icons.sh
381        @echo -e  'fi' >> /etc/postinstall/singular-icons.sh
382        @echo -e  '' >> /etc/postinstall/singular-icons.sh
383        @echo -e  '##################### Desktop' >> /etc/postinstall/singular-icons.sh
384        @echo -e  '# Only XServer' >> /etc/postinstall/singular-icons.sh
385        @echo -e  'if test -f /usr/bin/XWin.exe; then' >> /etc/postinstall/singular-icons.sh
386        @echo -e  'mkshortcut -A -a \047\047 \' >> /etc/postinstall/singular-icons.sh
387        @echo -e  '       -i /usr/bin/XWin.exe \' >> /etc/postinstall/singular-icons.sh
388        @echo -e  '       -w /usr/bin \' >> /etc/postinstall/singular-icons.sh
389        @echo -e  '       -D ${CYGWIN_SINGULAR_BIN}/startxserver.bat -n "Start X - Server (needed for emacs and surf)" \' >> /etc/postinstall/singular-icons.sh
390        @echo -e  '       -d "This starts the Cygwin X-Server. Without XServer Emacs and Surf do not work."' >> /etc/postinstall/singular-icons.sh
391        @echo -e  '' >> /etc/postinstall/singular-icons.sh
392        @echo -e  'mkshortcut -A -a \047bash -l ESingular\047 \' >> /etc/postinstall/singular-icons.sh
393        @echo -e  '       -i ${CYGWIN_SINGULAR_BIN}/runESingular.exe -n "Singular (Emacs)" \' >> /etc/postinstall/singular-icons.sh
394        @echo -e  '       -w /bin \' >> /etc/postinstall/singular-icons.sh
395        @echo -e  '       -D /usr/bin/run.exe \'  >> /etc/postinstall/singular-icons.sh
396        @echo -e  '       -d "Start Singular in Emacs"' >> /etc/postinstall/singular-icons.sh
397        @echo -e  'fi' >> /etc/postinstall/singular-icons.sh
398        @echo -e  '' >> /etc/postinstall/singular-icons.sh
399        @echo -e  '# Singular in rxvt' >> /etc/postinstall/singular-icons.sh
400        @echo -e  'mkshortcut -A -a \047-rv -fn "FixedSys" -e /bin/bash --login -i -c Singular\047 \' >> /etc/postinstall/singular-icons.sh
401        @echo -e  '       -i ${CYGWIN_SINGULAR_BIN}/runTSingular.exe -n "Singular (rxvt)" \' >> /etc/postinstall/singular-icons.sh
402        @echo -e  '       -D /bin/rxvt -d "Start Singular in a rxvt terminal"' >> /etc/postinstall/singular-icons.sh
403        @echo -e  Writing /usr/bin/ESingular
404        @echo -e  "#! /bin/bash" > /usr/bin/ESingular
405        @echo -e  "export SINGULAR_BIN_DIR=${CYGWIN_SINGULAR_BIN}" >> /usr/bin/ESingular
406        @echo -e  "export SINGULAR_ROOT_DIR=${CYGWIN_SINGULAR_ROOT}" >> /usr/bin/ESingular
407        @echo -e  "export SINGULAR_INFO_FILE=/usr/share/info/singular.info" >> /usr/bin/ESingular
408        @echo -e  "export SINGULAR_IDX_FILE=${CYGWIN_SINGULAR_DOC}/doc/singular.idx" >> /usr/bin/ESingular
409        @echo -e  "export SINGULAR_HTML_DIR=${CYGWIN_SINGULAR_DOC}/html" >> /usr/bin/ESingular
410        @echo -e  "export SINGULAR_CHM_FILE=${CYGWIN_SINGULAR_DOC}/doc/Manual.chm" >> /usr/bin/ESingular
411        @echo -e  "export SINGULAR_EXAMPLES_DIR=${CYGWIN_SINGULAR_DOC}/examples" >> /usr/bin/ESingular
412        @echo -e  'export PATH="${CYGWIN_SINGULAR_BIN}:/usr/bin:$$PATH"' >> /usr/bin/ESingular
413        @echo -e  'if [ -z $$DISPLAY ]; then export DISPLAY=:0.0; fi' >> /usr/bin/ESingular
414        @echo -e  "exec ${CYGWIN_SINGULAR_BIN}/ESingular.exe \$$*" >> /usr/bin/ESingular
415        @echo -e  Writing /usr/bin/Singular
416        @echo -e  "#! /bin/bash" > /usr/bin/Singular
417        @echo -e  "export SINGULAR_BIN_DIR=${CYGWIN_SINGULAR_BIN}" >> /usr/bin/Singular
418        @echo -e  "export SINGULAR_ROOT_DIR=${CYGWIN_SINGULAR_ROOT}" >> /usr/bin/Singular
419        @echo -e  "export SINGULAR_INFO_FILE=/usr/share/info/singular.info" >> /usr/bin/Singular
420        @echo -e  "export SINGULAR_IDX_FILE=${CYGWIN_SINGULAR_DOC}/doc/singular.idx" >> /usr/bin/Singular
421        @echo -e  "export SINGULAR_HTML_DIR=${CYGWIN_SINGULAR_DOC}/html" >> /usr/bin/Singular
422        @echo -e  "export SINGULAR_CHM_FILE=${CYGWIN_SINGULAR_DOC}/doc/Manual.chm" >> /usr/bin/Singular
423        @echo -e  "export SINGULAR_EXAMPLES_DIR=${CYGWIN_SINGULAR_DOC}/examples" >> /usr/bin/Singular
424        @echo -e  'export PATH="${CYGWIN_SINGULAR_BIN}:$$PATH"' >> /usr/bin/Singular
425        @echo -e  "exec ${CYGWIN_SINGULAR_BIN}/Singular.exe \$$*" >> /usr/bin/Singular
426        @echo -e  Writing /usr/bin/surfex
427        @echo -e  "#! /bin/bash" > /usr/bin/surfex
428        @echo -e  "surfex_dir='/lib/surfex'" >> /usr/bin/surfex
429        @echo -e  "shift" >> /usr/bin/surfex
430        @echo -e  "tmp_dir=/tmp" >> /usr/bin/surfex
431        @echo -e  "std_eqn='x^3+y^3+z^3+1-0.25*(x+y+z+1)^3'" >> /usr/bin/surfex
432        @echo -e  "allargs=''" >> /usr/bin/surfex
433        @echo -e  'if [ -z $$1 ] ; then' >> /usr/bin/surfex
434        @echo -e  '    allargs="-e $$std_eqn"' >> /usr/bin/surfex
435        @echo -e  'else' >> /usr/bin/surfex
436        @echo -e  '    allargs=$$*' >> /usr/bin/surfex
437        @echo -e  'fi' >> /usr/bin/surfex
438        @echo -e  'echo "$$PWD" | sed -e "s/ /\ /g" > $$tmp_dir/tmp.$$$$.txt' >> /usr/bin/surfex
439        @echo -e  'read surfexstartdir <$$tmp_dir/tmp.$$$$.txt' >> /usr/bin/surfex
440        @echo -e  '/bin/rm -f $$tmp_dir/tmp.$$$$.txt' >> /usr/bin/surfex
441        @echo -e  'cd "$$surfex_dir"' >> /usr/bin/surfex
442        @echo -e  'java -jar surfex.jar -d "$$surfexstartdir" -t "$$tmp_dir" $$allargs' >> /usr/bin/surfex
443
444cygwin-dist-install: cygwin-dist-scripts ## ${BINDIST_NAME}.tar.gz
445        if test -d ${TMPDIR}; then rm -fr ${TMPDIR}; fi
446        ${MKINSTALLDIRS} ${TMPDIR}
447        tar  --directory=${TMPDIR} -x -z -f ${SHAREDIST_NAME}.tar.gz
448        -rm -rf ${TMPDIR}/Singular/${S_VERSION}/html
449        tar  --directory=${TMPDIR} -x -z -f ${BINDIST_NAME}.tar.gz
450        -rm -rf ${CYGWIN_SINGULAR_ROOT} ${CYGWIN_SINGULAR_DOC} ${CYGWIN_SINGULAR_BIN}
451        ${MKINSTALLDIRS} ${CYGWIN_SINGULAR_ROOT} ${CYGWIN_SINGULAR_DOC} ${CYGWIN_SINGULAR_BIN}
452## Copy documentation files
453        cp ${TMPDIR}/Singular/${S_VERSION}/README /usr/share/doc/Singular-${CYGWIN_SING_VER}/
454        cp ${TMPDIR}/Singular/${S_VERSION}/INSTALL /usr/share/doc/Singular-${CYGWIN_SING_VER}/
455        cp ${TMPDIR}/Singular/${S_VERSION}/COPYING /usr/share/doc/Singular-${CYGWIN_SING_VER}/
456        cp ${TMPDIR}/Singular/${S_VERSION}/NEWS /usr/share/doc/Singular-${CYGWIN_SING_VER}/
457        cp ${TMPDIR}/Singular/${S_VERSION}/GPL* /usr/share/doc/Singular-${CYGWIN_SING_VER}/
458## Install Cygwin specific structure
459        -rm -rf /lib/surfex
460        mv ${TMPDIR}/Singular/${S_VERSION}/LIB/surfex /lib/surfex
461        -mv -u ${TMPDIR}/Singular/${S_VERSION}/LIB/surfex.jar /lib/surfex/surfex.jar
462        mv ${TMPDIR}/Singular/${S_VERSION}/ix86-Win/* ${CYGWIN_SINGULAR_BIN}/
463        -rmdir ${TMPDIR}/Singular/${S_VERSION}/ix86-Win
464        mv ${TMPDIR}/Singular/${S_VERSION}/LIB ${CYGWIN_SINGULAR_ROOT}/
465        mv ${TMPDIR}/Singular/${S_VERSION}/emacs ${CYGWIN_SINGULAR_ROOT}/
466        mv ${TMPDIR}/Singular/${S_VERSION}/* ${CYGWIN_SINGULAR_DOC}/
467        mv ${CYGWIN_SINGULAR_DOC}/info/singular.hlp /usr/share/info/singular.info
468        -rm -f ${CYGWIN_SINGULAR_BIN}/surfex
469## Copy auxiliar files
470        cp ${CYGWIN_AUX_FILES}/surf.exe /usr/bin/
471        cp ${CYGWIN_AUX_FILES}/SURF_AUTHORS ${CYGWIN_SINGULAR_BIN}/
472        cp ${CYGWIN_AUX_FILES}/SURF_README ${CYGWIN_SINGULAR_BIN}/
473        cp ${CYGWIN_AUX_FILES}/SURF_COPYING ${CYGWIN_SINGULAR_BIN}/
474        cp ${CYGWIN_AUX_FILES}/Manual.chm ${CYGWIN_SINGULAR_DOC}/doc
475        cp ${CYGWIN_AUX_FILES}/startxserver.bat ${CYGWIN_SINGULAR_BIN}/
476        unix2dos ${CYGWIN_SINGULAR_BIN}/startxserver.bat
477##      Download setup exe
478        export http_proxy=http://positron.mathematik.uni-kl.de:3128; \
479        wget http://cygwin.com/setup.exe -O ${CYGWIN_SINGULAR_BIN}/cygwin-setup.exe
480##      or copy from local folder
481#       cp ${CYGWIN_AUX_FILES}/cygwin-setup.exe ${CYGWIN_SINGULAR_BIN}/cygwin-setup.exe
482        cp ${CYGWIN_AUX_FILES}/singular-base.README /usr/share/doc/Cygwin/singular-base-${CYGWIN_SING_VER}.README
483        cp ${CYGWIN_AUX_FILES}/singular-share.README /usr/share/doc/Cygwin/singular-share-${CYGWIN_SING_VER}.README
484        cp ${CYGWIN_AUX_FILES}/singular-help.README /usr/share/doc/Cygwin/singular-help-${CYGWIN_SING_VER}.README
485        cp ${CYGWIN_AUX_FILES}/singular-surf.README /usr/share/doc/Cygwin/singular-surf-${CYGWIN_SING_VER}.README
486        cp ${CYGWIN_AUX_FILES}/singular-icons.README /usr/share/doc/Cygwin/singular-icons-${CYGWIN_SING_VER}.README
487
488cygwin-dist-pack: ## singular-base-${CYGWIN_PORT_VER}-src.tar.bz2
489        -rm -r -f ${CYGWIN_REP_DIR}
490        mkdir ${CYGWIN_REP_DIR}
491        mkdir ${CYGWIN_REP_DIR}/release
492        mkdir ${CYGWIN_REP_DIR}/release/Singular
493        tar cjf ${CYGWIN_REP_DIR}/release/Singular/singular-base-${CYGWIN_PORT_VER}.tar.bz2 \
494              /usr/share/doc/Cygwin/singular-base-${CYGWIN_SING_VER}.README \
495              /usr/share/doc/Singular-${CYGWIN_SING_VER}/COPYING  \
496              /usr/share/doc/Singular-${CYGWIN_SING_VER}/INSTALL  \
497              /usr/share/doc/Singular-${CYGWIN_SING_VER}/NEWS     \
498              /usr/share/doc/Singular-${CYGWIN_SING_VER}/README   \
499              /usr/share/doc/Singular-${CYGWIN_SING_VER}/GPL*  \
500              /usr/bin/Singular                  \
501              /usr/bin/ESingular                 \
502              ${CYGWIN_SINGULAR_BIN}/*Singular*       \
503              ${CYGWIN_SINGULAR_BIN}/solve_IP.exe     \
504              ${CYGWIN_SINGULAR_BIN}/toric_ideal.exe  \
505              ${CYGWIN_SINGULAR_BIN}/change_cost.exe  \
506              ${CYGWIN_SINGULAR_BIN}/LLL.exe          \
507              ${CYGWIN_SINGULAR_BIN}/libparse.exe     \
508              ${CYGWIN_SINGULAR_BIN}/gen_test.exe
509        tar cjf ${CYGWIN_REP_DIR}/release/Singular/singular-surf-${CYGWIN_PORT_VER}.tar.bz2 \
510              /usr/share/doc/Cygwin/singular-surf-${CYGWIN_SING_VER}.README \
511              /usr/bin/surf.exe                     \
512              /usr/bin/surfex                       \
513              ${CYGWIN_SINGULAR_BIN}/SURF_AUTHORS   \
514              ${CYGWIN_SINGULAR_BIN}/SURF_README    \
515              ${CYGWIN_SINGULAR_BIN}/SURF_COPYING   \
516              /lib/surfex/*                         \
517              ${CYGWIN_SINGULAR_ROOT}/LIB/surf.lib  \
518              ${CYGWIN_SINGULAR_ROOT}/LIB/surfex.lib
519        tar -cj --exclude='surf*' -f \
520              ${CYGWIN_REP_DIR}/release/Singular/singular-share-${CYGWIN_PORT_VER}.tar.bz2 \
521              /usr/share/doc/Cygwin/singular-share-${CYGWIN_SING_VER}.README \
522              ${CYGWIN_SINGULAR_ROOT}/*
523        tar cjf ${CYGWIN_REP_DIR}/release/Singular/singular-help-${CYGWIN_PORT_VER}.tar.bz2 \
524              /usr/share/doc/Cygwin/singular-help-${CYGWIN_SING_VER}.README \
525              /usr/share/info/singular.info                                 \
526              ${CYGWIN_SINGULAR_DOC}/*
527        tar cjf ${CYGWIN_REP_DIR}/release/Singular/singular-icons-${CYGWIN_PORT_VER}.tar.bz2  \
528              /usr/share/doc/Cygwin/singular-icons-${CYGWIN_SING_VER}.README \
529              ${CYGWIN_SINGULAR_BIN}/cygwin-setup.exe                \
530              ${CYGWIN_SINGULAR_BIN}/startxserver.bat                \
531              /etc/postinstall/singular-icons.sh
532        cp singular-base-${CYGWIN_PORT_VER}-src.tar.bz2 ${CYGWIN_REP_DIR}/release/Singular/
533        touch ${CYGWIN_AUX_FILES}/singular-surf-${CYGWIN_PORT_VER}-src.tar.bz2
534        cp ${CYGWIN_AUX_FILES}/singular-surf-${CYGWIN_PORT_VER}-src.tar.bz2 ${CYGWIN_REP_DIR}/release/Singular/
535
536cygwin-helper: cygwin-setup-init cygwin-setup-helper
537        ${MKINSTALLDIRS} ${CYGWIN_REP_DIR}/release/Singular
538        touch ${CYGWIN_REP_DIR}/release/Singular/singular-helper-${CYGWIN_PORT_VER}.tar.bz2
539
540cygwin-dist: cygwin-dist-install cygwin-dist-pack
541
542cygwin-setup-init:
543        mkinstalldirs ${CYGWIN_REP_DIR}
544        @echo "Writing ${CYGWIN_REP_DIR}/setup.ini"
545        @echo "# This file is automatically generated by Makefile." > ${CYGWIN_REP_DIR}/setup.ini
546        @echo "# Special for Singular Distribution." >> ${CYGWIN_REP_DIR}/setup.ini
547        @echo -n "setup-timestamp: " >> ${CYGWIN_REP_DIR}/setup.ini
548        @echo `perl -e 'print time'` >> ${CYGWIN_REP_DIR}/setup.ini
549        @echo "setup-version: ${CYGWIN_SETUP_VER}" >> ${CYGWIN_REP_DIR}/setup.ini
550        @echo >> ${CYGWIN_REP_DIR}/setup.ini
551        if test -f ${CYGWIN_ORIG}/Small/setup.ini; then                             \
552                tail -n +7 ${CYGWIN_ORIG}/Small/setup.ini >> ${CYGWIN_REP_DIR}/setup.ini;  \
553        else                                                                        \
554                tail -n +7 ${CYGWIN_ORIG}/Full/setup.ini >> ${CYGWIN_REP_DIR}/setup.ini;   \
555        fi;
556        @echo >> ${CYGWIN_REP_DIR}/setup.ini
557##      Download setup exe
558        export http_proxy=http://positron.mathematik.uni-kl.de:3128; \
559        wget http://cygwin.com/setup.exe -O ${CYGWIN_REP_DIR}/setup.exe
560##      or copy from local folder
561#       cp ${CYGWIN_AUX_FILES}/cygwin-setup.exe ${CYGWIN_REP_DIR}/setup.exe
562
563cygwin-setup-beta: cygwin-setup-init cygwin-setup-helper cygwin-setup-base cygwin-setup-share cygwin-setup-icons cygwin-setup-help cygwin-setup-surf
564        cp ${CYGWIN_REP_DIR}/setup.ini ${CYGWIN_REP_DIR}/setup
565        cd ${CYGWIN_REP_DIR} && bzip2 -f setup
566        cd ${CYGWIN_REP_DIR} && md5sum setup.* | sed -e 's/*//g' > md5.sum
567        cp -r ${CYGWIN_REP_DIR}/release/* ${CYGWIN_ORIG}/Full/release
568        rm -rf ${CYGWIN_ORIG}/Full/release/Singular/singular-base-*-src.tar.bz2
569        rm -rf ${CYGWIN_ORIG}/Full/release/Singular/singular-surf-*-src.tar.bz2
570        cp -r ${CYGWIN_REP_DIR}/release/* ${CYGWIN_ORIG}/Small/release
571        rm -rf ${CYGWIN_ORIG}/Small/release/Singular/singular-base-*-src.tar.bz2
572        rm -rf ${CYGWIN_ORIG}/Small/release/Singular
573
574cygwin-setup: cygwin-setup-init cygwin-setup-helper
575        cp ${CYGWIN_REP_DIR}/setup.ini ${CYGWIN_REP_DIR}/setup
576        cd ${CYGWIN_REP_DIR} && bzip2 -f setup
577        cd ${CYGWIN_REP_DIR} && md5sum setup.* | sed -e 's/*//g' > md5.sum
578
579cygwin-setup-%:
580        @echo "Writing ${CYGWIN_REP_DIR}/setup.ini ($*)"
581        @echo "@ singular-$*" >> ${CYGWIN_REP_DIR}/setup.ini
582        cat ${CYGWIN_AUX_FILES}/setup-$*.hint >> ${CYGWIN_REP_DIR}/setup.ini
583        @echo "version: ${CYGWIN_PORT_VER}" >> ${CYGWIN_REP_DIR}/setup.ini
584        @echo -n "install: release/Singular/singular-$*-${CYGWIN_PORT_VER}.tar.bz2 "  >> ${CYGWIN_REP_DIR}/setup.ini
585        @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
586        @echo -n " " >> ${CYGWIN_REP_DIR}/setup.ini
587        @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
588        @if test -e ${CYGWIN_REP_DIR}/release/Singular/singular-$*-${CYGWIN_PORT_VER}-src.tar.bz2; then \
589          echo -n "source: release/Singular/singular-$*-${CYGWIN_PORT_VER}-src.tar.bz2 "  >> ${CYGWIN_REP_DIR}/setup.ini; \
590          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; \
591          echo -n " " >> ${CYGWIN_REP_DIR}/setup.ini; \
592          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; \
593        fi;
594        @echo >> ${CYGWIN_REP_DIR}/setup.ini
595
596cygwin-pfw: cygwin-pfw-Small cygwin-pfw-Full
597
598cygwin-pfw-%:
599        if test -d ${TMPDIR}; then rm -rf ${TMPDIR}; fi
600        ${MKINSTALLDIRS} ${TMPDIR}/Files
601        cp -r ${CYGWIN_ORIG}/$*/* ${TMPDIR}/Files/
602        touch ${TMPDIR}/Files/release/Singular/singular-helper-${CYGWIN_PORT_VER}.tar.bz2
603        @echo "Creating $* distribution ..."
604        -rm -f  ${TMPDIR}/Files/setup.exe
605        cp ${CYGWIN_AUX_FILES}/setup-pfw.exe ${TMPDIR}/Files/setup.exe
606        cat ${CYGWIN_REP_DIR}/setup.ini | sed -e 's/setup-version:.*//' | sed -e 's/setup-timestamp:.*//' >> ${TMPDIR}/Files/setup.ini
607        @echo Writing Singular.pfw ...
608        @echo "Version=2.0" >> ${TMPDIR}/Singular.pfw
609        @echo "" >> ${TMPDIR}/Singular.pfw
610        @echo "[Options]" >> ${TMPDIR}/Singular.pfw
611        @echo "Title=Singular ${S_VERSION}: $* Distribution" >> ${TMPDIR}/Singular.pfw
612        @echo "Company=Department of Mathematics and Center for Computer Algebra, University of Kaiserslautern" >> ${TMPDIR}/Singular.pfw
613        @echo "CompanyEMail=singular@mathematik.uni-kl.de" >> ${TMPDIR}/Singular.pfw
614        @echo -n "BasePath="  >> ${TMPDIR}/Singular.pfw
615        @echo `cygpath -a -w ${TMPDIR}/Files` >> ${TMPDIR}/Singular.pfw
616        @echo "ImportPath=" >> ${TMPDIR}/Singular.pfw
617        @echo "UseRTF=1" >> ${TMPDIR}/Singular.pfw
618        @echo "SaveFiles=0" >> ${TMPDIR}/Singular.pfw
619        @echo "SubFolders=1" >> ${TMPDIR}/Singular.pfw
620        @echo "ApplicationName=Singular ${S_VERSION} Build `date -u +%D' UTC '%T`" >> ${TMPDIR}/Singular.pfw
621        @echo "Description=A Computer Algebra System For Polynomial Computations" >> ${TMPDIR}/Singular.pfw
622        @echo "Comments=Authors: G.-M. Greuel, G. Pfister, H. Schoenemann" >> ${TMPDIR}/Singular.pfw
623        @echo "Notice=Distributed under General Public License (GPL)" >> ${TMPDIR}/Singular.pfw
624        @echo "Version=@SINGULAR_VERSION@" >> ${TMPDIR}/Singular.pfw
625        @echo -n "OutputSpec=" >> ${TMPDIR}/Singular.pfw
626        @echo -n "`cygpath -a -w .`" >> ${TMPDIR}/Singular.pfw
627        @echo "\Singular-${S_VERSION}-$*.exe" >> ${TMPDIR}/Singular.pfw
628        @echo "GUIDs=0" >> ${TMPDIR}/Singular.pfw
629        @echo "Type=2" >> ${TMPDIR}/Singular.pfw
630        @echo "Compress=1" >> ${TMPDIR}/Singular.pfw
631        @echo "Sign=0" >> ${TMPDIR}/Singular.pfw
632        @echo "Transfer=0" >> ${TMPDIR}/Singular.pfw
633        @echo "" >> ${TMPDIR}/Singular.pfw
634        @echo "[Runtime]" >> ${TMPDIR}/Singular.pfw
635        @echo "Welcome=" >> ${TMPDIR}/Singular.pfw
636        @echo -n "License=" >> ${TMPDIR}/Singular.pfw
637        @echo -n "`cygpath -a -w .`" >> ${TMPDIR}/Singular.pfw
638        @echo "\GPL" >> ${TMPDIR}/Singular.pfw
639        @echo "Prompt=" >> ${TMPDIR}/Singular.pfw
640        @echo "Password=" >> ${TMPDIR}/Singular.pfw
641        @echo "DefaultPath=" >> ${TMPDIR}/Singular.pfw
642        @echo "Language=English" >> ${TMPDIR}/Singular.pfw
643        @echo "WindowStyle=0" >> ${TMPDIR}/Singular.pfw
644        @echo "Options=33" >> ${TMPDIR}/Singular.pfw
645        @echo "Execute=setup.exe" >> ${TMPDIR}/Singular.pfw
646        @echo "CmdLine=-L -q -n" >> ${TMPDIR}/Singular.pfw
647        @echo "AllowChangeTarget=0" >> ${TMPDIR}/Singular.pfw
648        @echo "AllowDelete=0" >> ${TMPDIR}/Singular.pfw
649        @echo "LaunchEXE=1" >> ${TMPDIR}/Singular.pfw
650        @echo "" >> ${TMPDIR}/Singular.pfw
651        @echo "[Extension]" >> ${TMPDIR}/Singular.pfw
652        @echo "Server=" >> ${TMPDIR}/Singular.pfw
653        @echo "Calls=0" >> ${TMPDIR}/Singular.pfw
654        cd ${CYGWIN_PFW_DIR}; \
655        ${CYGWIN_PFW_EXEC} -a -s "`cygpath -a -w ${TMPDIR}/Singular.pfw`"
656
657singular-cd-windows:
658        @echo Building cd directories and web interface
659        ${MKINSTALLDIRS} singular-cd/WINDOWS/Files/Repository
660        @echo WEBPAGE FEATURE NOT INTRODUCED
661        @echo Buidling cd autostart
662        @echo AUTOSTART FEATURE NOT INTRODUCED
663        @echo Copying PackageForTheWeb
664        cp Singular-${S_VERSION}-*.exe singular-cd/WINDOWS/Files/
665        cp Singular/singular.ico singular-cd/WINDOWS/Files/
666        @echo Building cygwin-cd-repository
667        cp -r ${CYGWIN_ORIG}/cd-repository/* singular-cd/WINDOWS/Files/Repository/
668        cp -r ${CYGWIN_REP_DIR}/release/Singular singular-cd/WINDOWS/Files/Repository/release/
669        cp ${CYGWIN_AUX_FILES}/setup-cd.exe singular-cd/WINDOWS/Files/Repository/
670        cat ${CYGWIN_REP_DIR}/setup.ini | sed -e 's/setup-version:.*//' | sed -e 's/setup-timestamp:.*//' >> singular-cd/WINDOWS/Files/Repository/setup.ini
671
672##
673## old targets -- need to be updated
674##
675
676BINDIR_NAME     = Singular/${S_VERSION}/${SINGUNAME}
677LIBDIR_NAME     = Singular/${S_VERSION}/LIB
678GFTABLESDIR_NAME= Singular/${S_VERSION}/LIB/gftables
679DOCDIR_NAME     = Singular/${S_VERSION}/doc
680HTMLDIR_NAME    = Singular/${S_VERSION}/html
681INFODIR_NAME    = Singular/${S_VERSION}/info
682EMACSDIR_NAME   = Singular/${S_VERSION}/emacs
683
684ZIP             = zip
685
686test_t:
687        echo ${S_VERSION}
688
689.PHONY: sharedist bindist static-bindist infodist win-sharedist
690_static-bindist: ${SINGULAR}
691        cd Singular; ${MAKE} Singular-$@ libparse
692        rm -rf ${TMPDIR}
693        ${MKINSTALLDIRS} ${TMPDIR}/${BINDIR_NAME}
694        cp Singular/Singular-$@ ${TMPDIR}/${BINDIR_NAME}/Singular-static
695        cp Singular/libparse ${TMPDIR}/${BINDIR_NAME}
696        -strip ${TMPDIR}/${BINDIR_NAME}/*
697        cat INSTALL.unix | sed -e "s/<x-y-z>/${S_VERSION}/g" > \
698                      ${TMPDIR}/Singular/INSTALL
699        cd ${TMPDIR}; chmod -R a+rX *;\
700           tar cf - Singular | ${MYGZIP} > ${BINDIST_NAME}-static.tar.gz
701        mv ${TMPDIR}/${BINDIST_NAME}-static.tar.gz .
702        rm -rf ${TMPDIR}
703
704_infodist:
705        rm -rf ${TMPDIR}
706        ${MKINSTALLDIRS} ${TMPDIR}/${SINGUNAME}/bin/
707        cp `which info` ${TMPDIR}/${SINGUNAME}/bin/
708        -strip ${TMPDIR}/${SINGUNAME}/bin/info
709        cd ${TMPDIR}; tar cf - ${SINGUNAME} | ${MYGZIP}  > info-${SINGUNAME}.tar.gz
710        mv ${TMPDIR}/info-${SINGUNAME}.tar.gz .
711        rm -rf ${TMPDIR}
712
713INSTALL         = ./Singular/install-sh -c
714SH_PROGRAM      = /bin/sh
715INFO_PROGRAM    = /bin/info
716CYGWIN_DLL      = /bin/cygwin1.dll
717
718windist: ${SINGULAR}
719        cd Singular; ${MAKE} install-bindist
720        rm -rf ${TMPDIR}
721        ${MKINSTALLDIRS} ${TMPDIR}/${BINDIR_NAME}
722        ${INSTALL} Singular/Singular-bindist \
723                   ${TMPDIR}/${BINDIR_NAME}/Singular.exe
724        ${INSTALL} Singular/libparse ${TMPDIR}/${BINDIR_NAME}
725        ${INSTALL} ${SH_PROGRAM} ${TMPDIR}/${BINDIR_NAME}
726        ${INSTALL} ${INFO_PROGRAM} ${TMPDIR}/${BINDIR_NAME}
727        ${INSTALL} ${CYGWIN_DLL} ${TMPDIR}/${BINDIR_NAME}
728        cat INSTALL.win | sed -e "s/<x-y-z>/${S_VERSION}/g" > \
729                         ${TMPDIR}/Singular/INSTALL
730        cd ${TMPDIR}; chmod -R a+rX *;\
731           ${ZIP} -r sing Singular
732        mv ${TMPDIR}/sing.zip Singular-${S_VERSION}-${SINGUNAME}.zip
733        rm -rf ${TMPDIR}
734
735srcdist:
736        rm -rf ${TMPDIR}
737        ${MKINSTALLDIRS} ${TMPDIR}/Singular-${S_VERSION}
738        cd ${TMPDIR}/Singular-${S_VERSION}; cvs co All
739        cd  ${TMPDIR}; \
740        tar cf - Singular-${S_VERSION}| ${MYGZIP} > Singular-${S_VERSION}.tar.gz
741        cp ${TMPDIR}/Singular-${S_VERSION}.tar.gz .
742        rm -rf ${TMPDIR}
743
744# You can remeber the password with "iwd" == "ich war dabei"
745CRYPT   = enigma # it does not seem to decrypt correctly with the HP crypt
746cryptdist: srcdist
747        ${CRYPT} S-${S_VERSION}-iwd < Singular-${S_VERSION}.tar.gz > Singular-${S_VERSION}.tar.gz.crypt
748
749
750##############################################################
751# stuff for configure
752Makefile : Makefile.in config.status
753        CONFIG_FILES=Makefile ./config.status
754
755doc/Makefile: doc/Makefile.in config.status
756        CONFIG_FILES=doc/Makefile ./config.status
757
758config.status: configure
759        ./config.status --recheck
760
761configure: configure.in
762        @echo "You need to rerun autoconf. I am proceeding, for now."
763        @touch configure
764#       autoconf
765#
Note: See TracBrowser for help on using the repository browser.