https://github.com/Singular/Sources
Tip revision: be77cf1dd000fb79a2c712ff01d5455661826482 authored by Hans Schoenemann on 19 November 2014, 13:06:05 UTC
chg: changes from spielwiese
chg: changes from spielwiese
Tip revision: be77cf1
Makefile.in
#################################################################
###
### Top-level Makefile for Singular
###
### The main purpose of this Makefile is to call `make'
### recursively in the subdirectories determined at configuration
### time.
###
#################################################################
# @SET_MAKE@
SHELL = /bin/sh
SINGULAR = @SINGULAR@
BUILD_SUBDIRS = @BUILD_SUBDIRS@
BUILD1_SUBDIRS = @BUILD1_SUBDIRS@
SUBDIRS = @SUBDIRS@
PERL = @PERL@
TMP_DIR = @TMP_DIR@
MYGZIP = @MYGZIP@ -9
GUNZIP = @GUNZIP@
##############################################################
# default target
${SINGULAR}:
${MAKE} install
##############################################################
# general targets
# simply descend for these targets
.PHONY: all install uninstall install_all prepare-depend
TEXINFO_TEX_FILES = epsf.tex texinfo.tex txi-cs.tex txi-de.tex txi-no.tex
TEXINFO_TEX_DIR = Texinfo/doc
all:
echo For everybody who did not read the README: use make install
exit 1
install install_all:
@ for SUBDIR in ${BUILD1_SUBDIRS}; \
do \
echo ${MAKE} $@ in $${SUBDIR}; \
(cd $${SUBDIR} && ${MAKE} $@ ) || exit 1;\
(if test "$${SUBDIR}" = Texinfo && test -d doc; then \
for FILE in ${TEXINFO_TEX_FILES}; \
do \
if test "$@" = uninstall; then\
echo rm -f doc/$${FILE};\
rm -f doc/$${FILE}; \
else \
echo cp ${TEXINFO_TEX_DIR}/$${FILE} doc; \
cp ${TEXINFO_TEX_DIR}/$${FILE} doc; \
fi; \
done;\
fi;); \
done
echo "* do not forget to install Singular-@SINGULAR_VERSION@-share.tar.gz"
install-nolns:
@ for SUBDIR in ${BUILD1_SUBDIRS}; \
do \
echo ${MAKE} $@ in $${SUBDIR}; \
(cd $${SUBDIR} && ${MAKE} $@ ) || exit 1;\
(if test "$${SUBDIR}" = Texinfo && test -d doc; then \
for FILE in ${TEXINFO_TEX_FILES}; \
do \
if test "$@" = uninstall; then\
echo rm -f doc/$${FILE};\
rm -f doc/$${FILE}; \
else \
echo cp ${TEXINFO_TEX_DIR}/$${FILE} doc; \
cp ${TEXINFO_TEX_DIR}/$${FILE} doc; \
fi; \
done;\
fi;); \
done
echo "* do not forget to install Singular-@SINGULAR_VERSION@-share.tar.gz"
install-libsingular:
@ for SUBDIR in ${BUILD1_SUBDIRS}; \
do \
echo ${MAKE} $@ in $${SUBDIR}; \
(cd $${SUBDIR} && ${MAKE} $@ ) || exit 1;\
done
maintainer-install uninstall:
@ for SUBDIR in ${BUILD_SUBDIRS}; \
do \
echo ${MAKE} $@ in $${SUBDIR}; \
( cd $${SUBDIR} && ${MAKE} $@;); \
(if test "$${SUBDIR}" = Texinfo && test -d doc; then \
for FILE in ${TEXINFO_TEX_FILES}; \
do \
if test "$@" = uninstall; then\
echo rm -f doc/$${FILE};\
rm -f doc/$${FILE}; \
else \
echo cp ${TEXINFO_TEX_DIR}/$${FILE} doc; \
cp ${TEXINFO_TEX_DIR}/$${FILE} doc; \
fi; \
done;\
fi;); \
done
install-doc:
cd doc; ${MAKE} install
prepare-depend:
@ for SUBDIR in ${SUBDIRS}; \
do \
echo ${MAKE} depend in $${SUBDIR}; \
cd $${SUBDIR} && ${MAKE} depend;\
cd ..;\
done; \
for SUBDIR in kernel Singular; \
do \
sed -e 's@\([^/]\)\(omalloc.h\|factory.h\)@\1$$(includedir)/\2@g' \
$${SUBDIR}/depend > $${SUBDIR}/depend.tmp; \
mv $${SUBDIR}/depend.tmp $${SUBDIR}/depend; \
done;
##############################################################
# cleaning up
.PHONY: local-clean local-distclean local-maintainer-clean \
clean distclean mostlyclean maintainer-clean
# we use a canned sequence to avoid code redundancy
define recurse
@ for SUBDIR in ${SUBDIRS}; \
do \
echo ${MAKE} $@ in $${SUBDIR}; \
( cd $${SUBDIR} && ${MAKE} $@; ) \
done
endef
local-clean:
rm -rf *~ a.out core *.o *.log
local-distclean: local-clean
rm -rf Makefile config.cache config.log config.status TAGS* *.gz *.tar
local-maintainer-clean: local-distclean
@ echo "This command is intended for maintainer use, only"
rm -rf configure
clean mostlyclean: local-clean
+$(recurse)
distclean: local-distclean
+$(recurse)
rm -rf build
maintainer-clean: uninstall local-maintainer-clean
+$(recurse)
##############################################################
# some extra targets for the specific packages
.PHONY: factory libfac MP
Singular factory libfac MP:
cd $@; ${MAKE} all
##############################################################
# documentation
.PHONY: info dvi ps doc doc/singular.hlp html
info dvi ps doc/singular.hlp html: ${SINGULAR}
cd doc; ${MAKE} $@
doc info/singular.hlp:
cd doc; ${MAKE} install
##############################################################
# Tst targets
.PHONY: Tst-All Tst Tst-Old Tst-Short Tst-Long
Tst-All: Tst-Old Tst-Short Tst-Long
Tst: Tst-Old Tst-Short
Tst-Old: ${SINGULAR} Tst/Old/universal.lst Tst/regress.cmd
${PERL} Tst/regress.cmd -r -s ${SINGULAR} Tst/Old/universal.lst
Tst-Short: ${SINGULAR} Tst/Short/ok_s.lst Tst/regress.cmd
${PERL} Tst/regress.cmd -r -s ${SINGULAR} Tst/Short/ok_s.lst
Tst-Long: ${SINGULAR} Tst/Long/ok_l.lst Tst/regress.cmd
${PERL} Tst/regress.cmd -r -s ${SINGULAR} Tst/Long/ok_l.lst
##############################################################
test:
@echo "make Tst for the official Singular test suite"
@echo "this part here are unittest and still under development"
(cd Singular; ${MAKE} libsingular.a)
mkdir -p build
(cd build && cmake .. && make && make test)
##############################################################
# distribution targets
#
S_VERSION = $${SINGULAR_VERSION-@SINGULAR_VERSION@}
SINGUNAME = @SINGUNAME@
localdir = /usr/local
install_prefix = ${localdir}/Singular/${S_VERSION}
##############################################################
# cygwin related stuff
#
CYGWIN_SING_VER = @SINGULAR_RPM_VERSION@
CYGWIN_PORT_VER = ${CYGWIN_SING_VER}-1
CYGWIN_SETUP_VER = 2.457.2.2
CYGWIN_REP_DIR = cygwin_pkg
CYGWIN_AUX_FILES = rpm/cygwin
## CYGWIN_PFW_DIR = /cygdrive/c/Programme/PackageForTheWeb\ 4/
CYGWIN_PFW_EXEC = ./pftwwiz.exe
CYGWIN_ORIG = external-cygwin
CYGWIN_SINGULAR_DIR = Singular
CYGWIN_SINGULAR_ROOT = /usr/share/${CYGWIN_SINGULAR_DIR}
CYGWIN_SINGULAR_BIN = /usr/lib/${CYGWIN_SINGULAR_DIR}
CYGWIN_SINGULAR_DOC = /usr/share/doc/${CYGWIN_SINGULAR_DIR}-${CYGWIN_SING_VER}
BINDIST_DIRS = kernel Singular doc IntegerProgramming dyn_modules
SHAREDIST_DIRS = Singular doc emacs
SI_TMPDIR = ${TMP_DIR}/singdist
LN_S = @LN_S@
MKINSTALLDIRS = ./mkinstalldirs
BINDIST_NAME = Singular-${S_VERSION}-${SINGUNAME}
SHAREDIST_NAME = Singular-${S_VERSION}-share
install-dist install-local: install-bindist install-sharedist
install-bindist:
for DIR in ${BINDIST_DIRS}; \
do \
if test -d $${DIR}; then \
(cd $${DIR}; ${MAKE} install-bindist install_prefix=${install_prefix});\
fi \
done
install-sharedist: ${SINGULAR}
for DIR in ${SHAREDIST_DIRS}; \
do \
(cd $${DIR}; ${MAKE} install-sharedist install_prefix=${install_prefix}); \
done
dist: ${SHAREDIST_NAME}.tar.gz ${BINDIST_NAME}.tar.gz
sharedist ${SHAREDIST_NAME}.tar.gz:
if test -d ${SI_TMPDIR}; then rm -rf ${SI_TMPDIR}; fi
${MAKE} install-sharedist localdir=${SI_TMPDIR}
chmod -R a+rX ${SI_TMPDIR}
cd ${SI_TMPDIR}; tar cf - Singular| ${MYGZIP} > ${SHAREDIST_NAME}.tar.gz
mv ${SI_TMPDIR}/${SHAREDIST_NAME}.tar.gz .
rm -rf ${SI_TMPDIR}
bindist ${BINDIST_NAME}.tar.gz:
if test -d ${SI_TMPDIR}; then rm -fr ${SI_TMPDIR}; fi
${MAKE} install-bindist localdir=${SI_TMPDIR}
chmod -R a+rX ${SI_TMPDIR}
cd ${SI_TMPDIR}; tar cf - Singular| ${MYGZIP} > ${BINDIST_NAME}.tar.gz
mv ${SI_TMPDIR}/${BINDIST_NAME}.tar.gz .
rm -rf ${SI_TMPDIR}
static-bindist ${BINDIST_NAME}-static.tar.gz:
if test -d ${SI_TMPDIR}; then rm -fr ${SI_TMPDIR}; fi
${MAKE} install-bindist localdir=${SI_TMPDIR} LD_STATIC=1
chmod -R a+rX ${SI_TMPDIR}
-rm -f ${SI_TMPDIR}/Singular/*/*/*.so
-rm -f ${SI_TMPDIR}/Singular/*/*/modgen*
cd ${SI_TMPDIR}; tar cf - Singular| ${MYGZIP} > ${BINDIST_NAME}-static.tar.gz
mv ${SI_TMPDIR}/${BINDIST_NAME}-static.tar.gz .
rm -rf ${SI_TMPDIR}
install-root:
${MKINSTALLDIRS} ${localdir}/bin
${LN_S} ${localdir}/Singular/${S_VERSION}/${SINGUNAME}/Singular ${localdir}/bin/Singular-${S_VERSION}
${LN_S} ${localdir}/Singular/${S_VERSION}/${SINGUNAME}/ESingular ${localdir}/bin/ESingular-${S_VERSION}
##############################################################
# targets for the windows distribution
#
cygwin-dist-src singular-base-${CYGWIN_PORT_VER}-src.tar.bz2:
-rm -rf ${SI_TMPDIR}
${MKINSTALLDIRS} ${SI_TMPDIR}/singular-${CYGWIN_PORT_VER}
export SVN_RSH=ssh; export SVNROOT=:ext:monty.mathematik.uni-kl.de:/usr/local/Singular/svn/trunk; \
cd ${SI_TMPDIR}/singular-${CYGWIN_PORT_VER}; svn co http://www.singular.uni-kl.de/svn/trunk;
cd ${SI_TMPDIR}; \
tar cjf singular-base-${CYGWIN_PORT_VER}-src.tar.bz2 singular-${CYGWIN_PORT_VER};
mv ${SI_TMPDIR}/singular-base-${CYGWIN_PORT_VER}-src.tar.bz2 .
-rm -rf ${SI_TMPDIR}
cygwin-dist-scripts:
@echo -e "Writing /etc/postinstall/singular-help.sh"
@echo -e '#!/bin/sh' > /etc/postinstall/singular-help.sh
@echo -e '' >> /etc/postinstall/singular-icons.sh
@echo -e 'install-info' >> /etc/postinstall/singular-icons.sh
@echo -e 'mkdir "`cygpath -u -A -P`/Singular CAS"' >> /etc/postinstall/singular-icons.sh
@echo -e "Writing /etc/postinstall/singular-icons.sh"
@echo -e '#!/bin/sh' > /etc/postinstall/singular-icons.sh
@echo -e '' >> /etc/postinstall/singular-icons.sh
@echo -e 'mkdir "`cygpath -u -A -P`/Singular CAS"' >> /etc/postinstall/singular-icons.sh
@echo -e 'mkdir "`cygpath -u -A -P`/Singular CAS/Cygwin"' >> /etc/postinstall/singular-icons.sh
@echo -e '' >> /etc/postinstall/singular-icons.sh
@echo -e '##################### Singular CAS\Cygwin' >> /etc/postinstall/singular-icons.sh
@echo -e '# Bash Shell' >> /etc/postinstall/singular-icons.sh
@echo -e 'mkshortcut -A -a \047\047 \' >> /etc/postinstall/singular-icons.sh
@echo -e ' -P /cygwin.bat -n "Singular CAS\\Cygwin\\Bash shell" \' >> /etc/postinstall/singular-icons.sh
@echo -e ' -i /bin/rxvt.exe \' >> /etc/postinstall/singular-icons.sh
@echo -e ' -d "This starts a bash shell."' >> /etc/postinstall/singular-icons.sh
@echo -e '' >> /etc/postinstall/singular-icons.sh
@echo -e '# Rxvt Terminal' >> /etc/postinstall/singular-icons.sh
@echo -e 'mkshortcut -A -a \047-rv -fn "FixedSys" -e /bin/bash --login -i\047 \' >> /etc/postinstall/singular-icons.sh
@echo -e ' -i /bin/rxvt.exe -n "Singular CAS\\Cygwin\\Rxvt - Terminal" \' >> /etc/postinstall/singular-icons.sh
@echo -e ' -P /bin/rxvt -d "This starts an rxvt terminal."' >> /etc/postinstall/singular-icons.sh
@echo -e '' >> /etc/postinstall/singular-icons.sh
@echo -e '##################### Singular CAS' >> /etc/postinstall/singular-icons.sh
@echo -e '# Singular in rxvt' >> /etc/postinstall/singular-icons.sh
@echo -e 'mkshortcut -A -a \047-rv -fn "FixedSys" -e /bin/bash --login -i -c Singular\047 \' >> /etc/postinstall/singular-icons.sh
@echo -e ' -i ${CYGWIN_SINGULAR_BIN}/runTSingular.exe -n "Singular CAS\\Singular (rxvt)" \' >> /etc/postinstall/singular-icons.sh
@echo -e ' -P /bin/rxvt -d "This starts Singular in an rxvt terminal."' >> /etc/postinstall/singular-icons.sh
@echo -e '' >> /etc/postinstall/singular-icons.sh
@echo -e '# Singular in DOS mode' >> /etc/postinstall/singular-icons.sh
@echo -e 'mkshortcut -A -a Singular \' >> /etc/postinstall/singular-icons.sh
@echo -e ' -i ${CYGWIN_SINGULAR_BIN}/Singular.exe -n "Singular CAS\\Singular (Terminal)" \' >> /etc/postinstall/singular-icons.sh
@echo -e ' -P /bin/bash -d "This starts Singular in a Microsoft terminal."' >> /etc/postinstall/singular-icons.sh
@echo -e '' >> /etc/postinstall/singular-icons.sh
@echo -e '# Emacs + Singular' >> /etc/postinstall/singular-icons.sh
@echo -e 'if test -f /bin/XWin.exe; then' >> /etc/postinstall/singular-icons.sh
@echo -e 'mkshortcut -A -a \047bash -c -l "((xwin -multiwindow -clipboard -silent-dup-error &) && sleep 5 && (ESingular --emacs=xemacs)) &"\047 \' >> /etc/postinstall/singular-icons.sh
@echo -e ' -i ${CYGWIN_SINGULAR_BIN}/runESingular.exe -n "Singular CAS\\Singular (Emacs and X-Server)" \' >> /etc/postinstall/singular-icons.sh
@echo -e ' -w /bin \' >> /etc/postinstall/singular-icons.sh
@echo -e ' -P /bin/run.exe -d "This starts Singular in Emacs after starting the X-Server."' >> /etc/postinstall/singular-icons.sh
@echo -e 'fi' >> /etc/postinstall/singular-icons.sh
@echo -e '' >> /etc/postinstall/singular-icons.sh
@echo -e '##################### Desktop' >> /etc/postinstall/singular-icons.sh
@echo -e '# Singular in rxvt' >> /etc/postinstall/singular-icons.sh
@echo -e 'mkshortcut -A -a \047-rv -fn "FixedSys" -e /bin/bash --login -i -c Singular\047 \' >> /etc/postinstall/singular-icons.sh
@echo -e ' -i ${CYGWIN_SINGULAR_BIN}/runTSingular.exe -n "Singular (rxvt)" \' >> /etc/postinstall/singular-icons.sh
@echo -e ' -D /bin/rxvt -d "This starts Singular in an rxvt terminal."' >> /etc/postinstall/singular-icons.sh
@echo -e '' >> /etc/postinstall/singular-icons.sh
@echo -e '# Singular in DOS mode' >> /etc/postinstall/singular-icons.sh
@echo -e 'mkshortcut -A -a Singular \' >> /etc/postinstall/singular-icons.sh
@echo -e ' -i ${CYGWIN_SINGULAR_BIN}/Singular.exe -n "Singular (Terminal)" \' >> /etc/postinstall/singular-icons.sh
@echo -e ' -D /bin/bash -d "This starts Singular in a Microsoft terminal."' >> /etc/postinstall/singular-icons.sh
@echo -e '' >> /etc/postinstall/singular-icons.sh
@echo -e '# Emacs + Singular' >> /etc/postinstall/singular-icons.sh
@echo -e 'if test -f /bin/XWin.exe; then' >> /etc/postinstall/singular-icons.sh
@echo -e 'mkshortcut -A -a \047bash -c -l "((xwin -multiwindow -clipboard -silent-dup-error &) && sleep 5 && (ESingular --emacs=xemacs)) &"\047 \' >> /etc/postinstall/singular-icons.sh
@echo -e ' -i ${CYGWIN_SINGULAR_BIN}/runESingular.exe -n "Singular (Emacs and X-Server)" \' >> /etc/postinstall/singular-icons.sh
@echo -e ' -w /bin \' >> /etc/postinstall/singular-icons.sh
@echo -e ' -D /bin/run.exe -d "This starts Singular in Emacs after starting the X-Server."' >> /etc/postinstall/singular-icons.sh
@echo -e 'fi' >> /etc/postinstall/singular-icons.sh
@echo -e '' >> /etc/postinstall/singular-icons.sh
@echo -e Writing /usr/bin/ESingular
@echo -e "#! /bin/bash" > /usr/bin/ESingular
@echo -e "export SINGULAR_BIN_DIR=${CYGWIN_SINGULAR_BIN}" >> /usr/bin/ESingular
@echo -e "export SINGULAR_ROOT_DIR=${CYGWIN_SINGULAR_ROOT}" >> /usr/bin/ESingular
@echo -e "export SINGULAR_INFO_FILE=/usr/share/info/singular.info" >> /usr/bin/ESingular
@echo -e "export SINGULAR_IDX_FILE=${CYGWIN_SINGULAR_DOC}/doc/singular.idx" >> /usr/bin/ESingular
@echo -e "export SINGULAR_HTML_DIR=${CYGWIN_SINGULAR_DOC}/html" >> /usr/bin/ESingular
@echo -e "export SINGULAR_CHM_FILE=${CYGWIN_SINGULAR_DOC}/doc/Manual.chm" >> /usr/bin/ESingular
@echo -e "export SINGULAR_EXAMPLES_DIR=${CYGWIN_SINGULAR_DOC}/examples" >> /usr/bin/ESingular
@echo -e 'export PATH="${CYGWIN_SINGULAR_BIN}:/bin:$$PATH"' >> /usr/bin/ESingular
@echo -e 'if [ -z $$DISPLAY ]; then export DISPLAY=:0.0; fi' >> /usr/bin/ESingular
@echo -e "exec ${CYGWIN_SINGULAR_BIN}/ESingular.exe \$$*" >> /usr/bin/ESingular
@echo -e Writing /usr/bin/Singular
@echo -e "#! /bin/bash" > /usr/bin/Singular
@echo -e "export SINGULAR_BIN_DIR=${CYGWIN_SINGULAR_BIN}" >> /usr/bin/Singular
@echo -e "export SINGULAR_ROOT_DIR=${CYGWIN_SINGULAR_ROOT}" >> /usr/bin/Singular
@echo -e "export SINGULAR_INFO_FILE=/usr/share/info/singular.info" >> /usr/bin/Singular
@echo -e "export SINGULAR_IDX_FILE=${CYGWIN_SINGULAR_DOC}/doc/singular.idx" >> /usr/bin/Singular
@echo -e "export SINGULAR_HTML_DIR=${CYGWIN_SINGULAR_DOC}/html" >> /usr/bin/Singular
@echo -e "export SINGULAR_CHM_FILE=${CYGWIN_SINGULAR_DOC}/doc/Manual.chm" >> /usr/bin/Singular
@echo -e "export SINGULAR_EXAMPLES_DIR=${CYGWIN_SINGULAR_DOC}/examples" >> /usr/bin/Singular
@echo -e 'export PATH="${CYGWIN_SINGULAR_BIN}:$$PATH"' >> /usr/bin/Singular
@echo -e "exec ${CYGWIN_SINGULAR_BIN}/Singular.exe \$$*" >> /usr/bin/Singular
@echo -e Writing /usr/bin/surfex
@echo -e "#! /bin/bash" > /usr/bin/surfex
@echo -e "surfex_dir='/lib/surfex'" >> /usr/bin/surfex
@echo -e "shift" >> /usr/bin/surfex
@echo -e "tmp_dir=/tmp" >> /usr/bin/surfex
@echo -e "std_eqn='x^3+y^3+z^3+1-0.25*(x+y+z+1)^3'" >> /usr/bin/surfex
@echo -e "allargs=''" >> /usr/bin/surfex
@echo -e 'if [ -z $$1 ] ; then' >> /usr/bin/surfex
@echo -e ' allargs="-e $$std_eqn"' >> /usr/bin/surfex
@echo -e 'else' >> /usr/bin/surfex
@echo -e ' allargs=$$*' >> /usr/bin/surfex
@echo -e 'fi' >> /usr/bin/surfex
@echo -e 'echo "$$PWD" | sed -e "s/ /\ /g" > $$tmp_dir/tmp.$$$$.txt' >> /usr/bin/surfex
@echo -e 'read surfexstartdir <$$tmp_dir/tmp.$$$$.txt' >> /usr/bin/surfex
@echo -e '/bin/rm -f $$tmp_dir/tmp.$$$$.txt' >> /usr/bin/surfex
@echo -e 'cd "$$surfex_dir"' >> /usr/bin/surfex
@echo -e 'java -jar surfex.jar -d "$$surfexstartdir" -t "$$tmp_dir" $$allargs' >> /usr/bin/surfex
cygwin-dist-install: cygwin-dist-scripts ## ${BINDIST_NAME}.tar.gz
if test -d ${SI_TMPDIR}; then rm -fr ${SI_TMPDIR}; fi
${MKINSTALLDIRS} ${SI_TMPDIR}
tar --directory=${SI_TMPDIR} -x -z -f ${SHAREDIST_NAME}.tar.gz
-rm -rf ${SI_TMPDIR}/Singular/${S_VERSION}/html
tar --directory=${SI_TMPDIR} -x -z -f ${BINDIST_NAME}.tar.gz
-rm -rf ${CYGWIN_SINGULAR_ROOT} ${CYGWIN_SINGULAR_DOC} ${CYGWIN_SINGULAR_BIN}
${MKINSTALLDIRS} ${CYGWIN_SINGULAR_ROOT} ${CYGWIN_SINGULAR_DOC} ${CYGWIN_SINGULAR_BIN}
## Copy documentation files
cp ${SI_TMPDIR}/Singular/${S_VERSION}/README /usr/share/doc/Singular-${CYGWIN_SING_VER}/
cp ${SI_TMPDIR}/Singular/${S_VERSION}/INSTALL /usr/share/doc/Singular-${CYGWIN_SING_VER}/
cp ${SI_TMPDIR}/Singular/${S_VERSION}/COPYING /usr/share/doc/Singular-${CYGWIN_SING_VER}/
cp ${SI_TMPDIR}/Singular/${S_VERSION}/NEWS /usr/share/doc/Singular-${CYGWIN_SING_VER}/
cp ${SI_TMPDIR}/Singular/${S_VERSION}/GPL* /usr/share/doc/Singular-${CYGWIN_SING_VER}/
## Install Cygwin specific structure
-rm -rf /lib/surfex
mv ${SI_TMPDIR}/Singular/${S_VERSION}/LIB/surfex /lib/surfex
-mv -u ${SI_TMPDIR}/Singular/${S_VERSION}/LIB/surfex.jar /lib/surfex/surfex.jar
mv ${SI_TMPDIR}/Singular/${S_VERSION}/ix86-Win/* ${CYGWIN_SINGULAR_BIN}/
-rmdir ${SI_TMPDIR}/Singular/${S_VERSION}/ix86-Win
mv ${SI_TMPDIR}/Singular/${S_VERSION}/LIB ${CYGWIN_SINGULAR_ROOT}/
mv ${SI_TMPDIR}/Singular/${S_VERSION}/emacs ${CYGWIN_SINGULAR_ROOT}/
mv ${SI_TMPDIR}/Singular/${S_VERSION}/* ${CYGWIN_SINGULAR_DOC}/
mv ${CYGWIN_SINGULAR_DOC}/info/singular.hlp /usr/share/info/singular.info
-rm -f ${CYGWIN_SINGULAR_BIN}/surfex
## Copy auxiliary files
cp ${CYGWIN_AUX_FILES}/surf.exe /usr/bin/
cp ${CYGWIN_AUX_FILES}/SURF_AUTHORS ${CYGWIN_SINGULAR_BIN}/
cp ${CYGWIN_AUX_FILES}/SURF_README ${CYGWIN_SINGULAR_BIN}/
cp ${CYGWIN_AUX_FILES}/SURF_COPYING ${CYGWIN_SINGULAR_BIN}/
cp ${CYGWIN_AUX_FILES}/Manual.chm ${CYGWIN_SINGULAR_DOC}/doc
export http_proxy=http://positron.mathematik.uni-kl.de:3128; \
cp ${CYGWIN_AUX_FILES}/singular-base.README /usr/share/doc/Cygwin/singular-base-${CYGWIN_SING_VER}.README
cp ${CYGWIN_AUX_FILES}/singular-share.README /usr/share/doc/Cygwin/singular-share-${CYGWIN_SING_VER}.README
cp ${CYGWIN_AUX_FILES}/singular-help.README /usr/share/doc/Cygwin/singular-help-${CYGWIN_SING_VER}.README
cp ${CYGWIN_AUX_FILES}/singular-surf.README /usr/share/doc/Cygwin/singular-surf-${CYGWIN_SING_VER}.README
cp ${CYGWIN_AUX_FILES}/singular-icons.README /usr/share/doc/Cygwin/singular-icons-${CYGWIN_SING_VER}.README
cygwin-dist-pack: ## singular-base-${CYGWIN_PORT_VER}-src.tar.bz2
-rm -r -f ${CYGWIN_REP_DIR}
mkdir ${CYGWIN_REP_DIR}
mkdir ${CYGWIN_REP_DIR}/release
mkdir ${CYGWIN_REP_DIR}/release/Singular
tar cjf ${CYGWIN_REP_DIR}/release/Singular/singular-base-${CYGWIN_PORT_VER}.tar.bz2 \
/usr/share/doc/Cygwin/singular-base-${CYGWIN_SING_VER}.README \
/usr/share/doc/Singular-${CYGWIN_SING_VER}/COPYING \
/usr/share/doc/Singular-${CYGWIN_SING_VER}/INSTALL \
/usr/share/doc/Singular-${CYGWIN_SING_VER}/NEWS \
/usr/share/doc/Singular-${CYGWIN_SING_VER}/README \
/usr/share/doc/Singular-${CYGWIN_SING_VER}/GPL* \
/usr/bin/Singular \
/usr/bin/ESingular \
${CYGWIN_SINGULAR_BIN}/*Singular* \
${CYGWIN_SINGULAR_BIN}/solve_IP.exe \
${CYGWIN_SINGULAR_BIN}/toric_ideal.exe \
${CYGWIN_SINGULAR_BIN}/change_cost.exe \
${CYGWIN_SINGULAR_BIN}/LLL.exe \
${CYGWIN_SINGULAR_BIN}/libparse.exe \
${CYGWIN_SINGULAR_BIN}/gen_test.exe
tar cjf ${CYGWIN_REP_DIR}/release/Singular/singular-surf-${CYGWIN_PORT_VER}.tar.bz2 \
/usr/share/doc/Cygwin/singular-surf-${CYGWIN_SING_VER}.README \
/usr/bin/surf.exe \
/usr/bin/surfex \
${CYGWIN_SINGULAR_BIN}/SURF_AUTHORS \
${CYGWIN_SINGULAR_BIN}/SURF_README \
${CYGWIN_SINGULAR_BIN}/SURF_COPYING \
/lib/surfex/* \
${CYGWIN_SINGULAR_ROOT}/LIB/surf.lib \
${CYGWIN_SINGULAR_ROOT}/LIB/surfex.lib
tar -cj --exclude='surf*' -f \
${CYGWIN_REP_DIR}/release/Singular/singular-share-${CYGWIN_PORT_VER}.tar.bz2 \
/usr/share/doc/Cygwin/singular-share-${CYGWIN_SING_VER}.README \
${CYGWIN_SINGULAR_ROOT}/*
tar cjf ${CYGWIN_REP_DIR}/release/Singular/singular-help-${CYGWIN_PORT_VER}.tar.bz2 \
/usr/share/doc/Cygwin/singular-help-${CYGWIN_SING_VER}.README \
/usr/share/info/singular.info \
${CYGWIN_SINGULAR_DOC}/*
tar cjf ${CYGWIN_REP_DIR}/release/Singular/singular-icons-${CYGWIN_PORT_VER}.tar.bz2 \
/usr/share/doc/Cygwin/singular-icons-${CYGWIN_SING_VER}.README \
/etc/postinstall/singular-icons.sh
cp singular-base-${CYGWIN_PORT_VER}-src.tar.bz2 ${CYGWIN_REP_DIR}/release/Singular/
touch ${CYGWIN_AUX_FILES}/singular-surf-${CYGWIN_PORT_VER}-src.tar.bz2
cp ${CYGWIN_AUX_FILES}/singular-surf-${CYGWIN_PORT_VER}-src.tar.bz2 ${CYGWIN_REP_DIR}/release/Singular/
touch ${CYGWIN_AUX_FILES}/singular-helper-${CYGWIN_PORT_VER}.tar.bz2
cp ${CYGWIN_AUX_FILES}/singular-helper-${CYGWIN_PORT_VER}.tar.bz2 ${CYGWIN_REP_DIR}/release/Singular/
cygwin-helper: cygwin-setup-init cygwin-setup-helper
${MKINSTALLDIRS} ${CYGWIN_REP_DIR}/release/Singular
touch ${CYGWIN_REP_DIR}/release/Singular/singular-helper-${CYGWIN_PORT_VER}.tar.bz2
cygwin-dist: cygwin-dist-install cygwin-dist-pack
cygwin-setup-init:
${MKINSTALLDIRS} ${CYGWIN_REP_DIR}
@echo "Writing ${CYGWIN_REP_DIR}/setup.ini"
@echo "# This file is automatically generated by Makefile." > ${CYGWIN_REP_DIR}/setup.ini
@echo "# Special for Singular Distribution." >> ${CYGWIN_REP_DIR}/setup.ini
@echo -n "setup-timestamp: " >> ${CYGWIN_REP_DIR}/setup.ini
@echo `perl -e 'print time'` >> ${CYGWIN_REP_DIR}/setup.ini
@echo "setup-version: ${CYGWIN_SETUP_VER}" >> ${CYGWIN_REP_DIR}/setup.ini
@echo >> ${CYGWIN_REP_DIR}/setup.ini
if test -f ${CYGWIN_ORIG}/Small/setup.ini; then \
tail -n +7 ${CYGWIN_ORIG}/Small/setup.ini >> ${CYGWIN_REP_DIR}/setup.ini; \
else \
tail -n +7 ${CYGWIN_ORIG}/Full/setup.ini >> ${CYGWIN_REP_DIR}/setup.ini; \
fi;
@echo >> ${CYGWIN_REP_DIR}/setup.ini
export http_proxy=http://positron.mathematik.uni-kl.de:3128; \
cygwin-setup-beta: cygwin-setup-init cygwin-setup-helper cygwin-setup-base cygwin-setup-share cygwin-setup-icons cygwin-setup-help cygwin-setup-surf
cp ${CYGWIN_REP_DIR}/setup.ini ${CYGWIN_REP_DIR}/setup
cd ${CYGWIN_REP_DIR} && bzip2 -f setup
cd ${CYGWIN_REP_DIR} && md5sum setup.* | sed -e 's/*//g' > md5.sum
cp -r ${CYGWIN_REP_DIR}/release/* ${CYGWIN_ORIG}/Full/release
rm -rf ${CYGWIN_ORIG}/Full/release/Singular/singular-base-*-src.tar.bz2
rm -rf ${CYGWIN_ORIG}/Full/release/Singular/singular-surf-*-src.tar.bz2
cp -r ${CYGWIN_REP_DIR}/release/* ${CYGWIN_ORIG}/Small/release
rm -rf ${CYGWIN_ORIG}/Small/release/Singular/singular-base-*-src.tar.bz2
rm -rf ${CYGWIN_ORIG}/Small/release/Singular/singular-surf-*-src.tar.bz2
cygwin-setup: cygwin-setup-init cygwin-setup-helper
cp ${CYGWIN_REP_DIR}/setup.ini ${CYGWIN_REP_DIR}/setup
cd ${CYGWIN_REP_DIR} && bzip2 -f setup
cd ${CYGWIN_REP_DIR} && md5sum setup.* | sed -e 's/*//g' > md5.sum
cygwin-setup-%:
@echo "Writing ${CYGWIN_REP_DIR}/setup.ini ($*)"
@echo "@ singular-$*" >> ${CYGWIN_REP_DIR}/setup.ini
cat ${CYGWIN_AUX_FILES}/setup-$*.hint >> ${CYGWIN_REP_DIR}/setup.ini
@echo "version: ${CYGWIN_PORT_VER}" >> ${CYGWIN_REP_DIR}/setup.ini
@echo -n "install: release/Singular/singular-$*-${CYGWIN_PORT_VER}.tar.bz2 " >> ${CYGWIN_REP_DIR}/setup.ini
@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
@echo -n " " >> ${CYGWIN_REP_DIR}/setup.ini
@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
@if test -e ${CYGWIN_REP_DIR}/release/Singular/singular-$*-${CYGWIN_PORT_VER}-src.tar.bz2; then \
echo -n "source: release/Singular/singular-$*-${CYGWIN_PORT_VER}-src.tar.bz2 " >> ${CYGWIN_REP_DIR}/setup.ini; \
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; \
echo -n " " >> ${CYGWIN_REP_DIR}/setup.ini; \
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; \
fi;
@echo >> ${CYGWIN_REP_DIR}/setup.ini
cygwin-pfw: cygwin-pfw-Small cygwin-pfw-Full
cygwin-pfw-%:
if test -d ${SI_TMPDIR}; then rm -rf ${SI_TMPDIR}; fi
${MKINSTALLDIRS} ${SI_TMPDIR}/Files
cp -r ${CYGWIN_ORIG}/$*/* ${SI_TMPDIR}/Files/
# touch ${SI_TMPDIR}/Files/release/Singular/singular-helper-${CYGWIN_PORT_VER}.tar.bz2
@echo "Creating $* distribution ..."
-rm -f ${SI_TMPDIR}/Files/setup.exe
cp ${CYGWIN_AUX_FILES}/setup-pfw.exe ${SI_TMPDIR}/Files/setup.exe
# wrong: cat ${CYGWIN_REP_DIR}/setup.ini | sed -e 's/setup-version:.*//' | sed -e 's/setup-timestamp:.*//' >> ${SI_TMPDIR}/Files/setup.ini
# new:
cp ${CYGWIN_REP_DIR}/setup.ini ${SI_TMPDIR}/Files/setup.ini
@echo Writing Singular.pfw ...
@echo "Version=2.0" >> ${SI_TMPDIR}/Singular.pfw
@echo "" >> ${SI_TMPDIR}/Singular.pfw
@echo "[Options]" >> ${SI_TMPDIR}/Singular.pfw
@echo "Title=Singular ${S_VERSION}: $* Distribution" >> ${SI_TMPDIR}/Singular.pfw
@echo "Company=Department of Mathematics and Center for Computer Algebra, University of Kaiserslautern" >> ${SI_TMPDIR}/Singular.pfw
@echo "CompanyEMail=singular@mathematik.uni-kl.de" >> ${SI_TMPDIR}/Singular.pfw
@echo -n "BasePath=" >> ${SI_TMPDIR}/Singular.pfw
@echo `cygpath -a -w ${SI_TMPDIR}/Files` >> ${SI_TMPDIR}/Singular.pfw
@echo "ImportPath=" >> ${SI_TMPDIR}/Singular.pfw
@echo "UseRTF=1" >> ${SI_TMPDIR}/Singular.pfw
@echo "SaveFiles=0" >> ${SI_TMPDIR}/Singular.pfw
@echo "SubFolders=1" >> ${SI_TMPDIR}/Singular.pfw
@echo "ApplicationName=Singular ${S_VERSION} Build `date -u +%D' UTC '%T`" >> ${SI_TMPDIR}/Singular.pfw
@echo "Description=A Computer Algebra System For Polynomial Computations" >> ${SI_TMPDIR}/Singular.pfw
@echo "Comments=Authors: G.-M. Greuel, G. Pfister, H. Schoenemann" >> ${SI_TMPDIR}/Singular.pfw
@echo "Notice=Distributed under General Public License (GPL)" >> ${SI_TMPDIR}/Singular.pfw
@echo "Version=3-1-0" >> ${SI_TMPDIR}/Singular.pfw
@echo -n "OutputSpec=" >> ${SI_TMPDIR}/Singular.pfw
@echo -n "`cygpath -a -w .`" >> ${SI_TMPDIR}/Singular.pfw
@echo "\Singular-${S_VERSION}-$*.exe" >> ${SI_TMPDIR}/Singular.pfw
@echo "GUIDs=0" >> ${SI_TMPDIR}/Singular.pfw
@echo "Type=2" >> ${SI_TMPDIR}/Singular.pfw
@echo "Compress=1" >> ${SI_TMPDIR}/Singular.pfw
@echo "Sign=0" >> ${SI_TMPDIR}/Singular.pfw
@echo "Transfer=0" >> ${SI_TMPDIR}/Singular.pfw
@echo "" >> ${SI_TMPDIR}/Singular.pfw
@echo "[Runtime]" >> ${SI_TMPDIR}/Singular.pfw
@echo "Welcome=" >> ${SI_TMPDIR}/Singular.pfw
@echo -n "License=" >> ${SI_TMPDIR}/Singular.pfw
@echo -n "`cygpath -a -w .`" >> ${SI_TMPDIR}/Singular.pfw
@echo "\GPL" >> ${SI_TMPDIR}/Singular.pfw
@echo "Prompt=" >> ${SI_TMPDIR}/Singular.pfw
@echo "Password=" >> ${SI_TMPDIR}/Singular.pfw
@echo "DefaultPath=" >> ${SI_TMPDIR}/Singular.pfw
@echo "Language=English" >> ${SI_TMPDIR}/Singular.pfw
@echo "WindowStyle=0" >> ${SI_TMPDIR}/Singular.pfw
@echo "Options=33" >> ${SI_TMPDIR}/Singular.pfw
@echo "Execute=setup.exe" >> ${SI_TMPDIR}/Singular.pfw
@echo "CmdLine=-L -q -n" >> ${SI_TMPDIR}/Singular.pfw
@echo "AllowChangeTarget=0" >> ${SI_TMPDIR}/Singular.pfw
@echo "AllowDelete=0" >> ${SI_TMPDIR}/Singular.pfw
@echo "LaunchEXE=1" >> ${SI_TMPDIR}/Singular.pfw
@echo "" >> ${SI_TMPDIR}/Singular.pfw
@echo "[Extension]" >> ${SI_TMPDIR}/Singular.pfw
@echo "Server=" >> ${SI_TMPDIR}/Singular.pfw
@echo "Calls=0" >> ${SI_TMPDIR}/Singular.pfw
## old code for calling PackageForTheWeb:
## cd ${CYGWIN_PFW_DIR}; \
## ${CYGWIN_PFW_EXEC} -a -s "`cygpath -a -w ${SI_TMPDIR}/Singular.pfw`"
singular-cd-windows:
@echo Building cd directories and web interface
${MKINSTALLDIRS} singular-cd/WINDOWS/Files/Repository
@echo WEBPAGE FEATURE NOT INTRODUCED
@echo Buidling cd autostart
@echo AUTOSTART FEATURE NOT INTRODUCED
@echo Copying PackageForTheWeb
cp Singular-${S_VERSION}-*.exe singular-cd/WINDOWS/Files/
cp Singular/singular.ico singular-cd/WINDOWS/Files/
@echo Building cygwin-cd-repository
cp -r ${CYGWIN_ORIG}/cd-repository/* singular-cd/WINDOWS/Files/Repository/
cp -r ${CYGWIN_REP_DIR}/release/Singular singular-cd/WINDOWS/Files/Repository/release/
cp ${CYGWIN_AUX_FILES}/setup-cd.exe singular-cd/WINDOWS/Files/Repository/
cat ${CYGWIN_REP_DIR}/setup.ini | sed -e 's/setup-version:.*//' | sed -e 's/setup-timestamp:.*//' >> singular-cd/WINDOWS/Files/Repository/setup.ini
##
## old targets -- need to be updated
##
BINDIR_NAME = Singular/${S_VERSION}/${SINGUNAME}
LIBDIR_NAME = Singular/${S_VERSION}/LIB
GFTABLESDIR_NAME= Singular/${S_VERSION}/LIB/gftables
DOCDIR_NAME = Singular/${S_VERSION}/doc
HTMLDIR_NAME = Singular/${S_VERSION}/html
INFODIR_NAME = Singular/${S_VERSION}/info
EMACSDIR_NAME = Singular/${S_VERSION}/emacs
ZIP = zip
test_t:
echo ${S_VERSION}
.PHONY: sharedist bindist static-bindist infodist win-sharedist
_static-bindist: ${SINGULAR}
cd Singular; ${MAKE} Singular-$@ libparse
rm -rf ${SI_TMPDIR}
${MKINSTALLDIRS} ${SI_TMPDIR}/${BINDIR_NAME}
cp Singular/Singular-$@ ${SI_TMPDIR}/${BINDIR_NAME}/Singular-static
cp Singular/libparse ${SI_TMPDIR}/${BINDIR_NAME}
-strip ${SI_TMPDIR}/${BINDIR_NAME}/*
cat INSTALL.unix | sed -e "s/<x-y-z>/${S_VERSION}/g" > \
${SI_TMPDIR}/Singular/INSTALL
cd ${SI_TMPDIR}; chmod -R a+rX *;\
tar cf - Singular | ${MYGZIP} > ${BINDIST_NAME}-static.tar.gz
mv ${SI_TMPDIR}/${BINDIST_NAME}-static.tar.gz .
rm -rf ${SI_TMPDIR}
_infodist:
rm -rf ${SI_TMPDIR}
${MKINSTALLDIRS} ${SI_TMPDIR}/${SINGUNAME}/bin/
cp `which info` ${SI_TMPDIR}/${SINGUNAME}/bin/
-strip ${SI_TMPDIR}/${SINGUNAME}/bin/info
cd ${SI_TMPDIR}; tar cf - ${SINGUNAME} | ${MYGZIP} > info-${SINGUNAME}.tar.gz
mv ${SI_TMPDIR}/info-${SINGUNAME}.tar.gz .
rm -rf ${SI_TMPDIR}
INSTALL = ./Singular/install-sh -c
SH_PROGRAM = /bin/sh
INFO_PROGRAM = /bin/info
CYGWIN_DLL = /bin/cygwin1.dll
windist: ${SINGULAR}
cd Singular; ${MAKE} install-bindist
rm -rf ${SI_TMPDIR}
${MKINSTALLDIRS} ${SI_TMPDIR}/${BINDIR_NAME}
${INSTALL} Singular/Singular-bindist \
${SI_TMPDIR}/${BINDIR_NAME}/Singular.exe
${INSTALL} Singular/libparse ${SI_TMPDIR}/${BINDIR_NAME}
${INSTALL} ${SH_PROGRAM} ${SI_TMPDIR}/${BINDIR_NAME}
${INSTALL} ${INFO_PROGRAM} ${SI_TMPDIR}/${BINDIR_NAME}
${INSTALL} ${CYGWIN_DLL} ${SI_TMPDIR}/${BINDIR_NAME}
cat INSTALL.win | sed -e "s/<x-y-z>/${S_VERSION}/g" > \
${SI_TMPDIR}/Singular/INSTALL
cd ${SI_TMPDIR}; chmod -R a+rX *;\
${ZIP} -r sing Singular
mv ${SI_TMPDIR}/sing.zip Singular-${S_VERSION}-${SINGUNAME}.zip
rm -rf ${SI_TMPDIR}
srcdist:
rm -rf ${SI_TMPDIR}
${MKINSTALLDIRS} ${SI_TMPDIR}
cd ${SI_TMPDIR}; svn export http://www.singular.uni-kl.de/svn/trunk Singular-${S_VERSION}
cd ${SI_TMPDIR}/Singular-${S_VERSION}/Singular; sleep 2;\
touch grammar.cc;\
touch scanner.cc;\
cd ../..;\
chmod -R a+rX .;\
tar cf - Singular-${S_VERSION}| ${MYGZIP} > Singular-${S_VERSION}.tar.gz
mv ${SI_TMPDIR}/Singular-${S_VERSION}.tar.gz .
rm -rf ${SI_TMPDIR}
##############################################################
# stuff for configure
Makefile : Makefile.in config.status
CONFIG_FILES=Makefile ./config.status
doc/Makefile: doc/Makefile.in config.status
CONFIG_FILES=doc/Makefile ./config.status
config.status: configure
./config.status --recheck
configure: configure.in
@echo "You need to rerun autoconf. I am proceeding, for now."
@touch configure
# autoconf
#