[singular] 41/45: rules update

felix salfelder felix-guest at alioth.debian.org
Sat Sep 14 13:57:08 UTC 2013


This is an automated email from the git hooks/post-receive script.

felix-guest pushed a commit to branch master-3-1-5
in repository singular.

commit 3a1055c50b04ba657f221b446ee587ca184e7568
Author: Felix Salfelder <felix at salfelder.org>
Date:   Tue Sep 3 17:55:29 2013 +0200

    rules update
    
    do it more like sage (but in one go).
---
 debian/rules |   79 ++++++++++++++++++++++++++++++++++++++++++++++------------
 1 file changed, 63 insertions(+), 16 deletions(-)

diff --git a/debian/rules b/debian/rules
index 0aa7cd3..f7e5b9a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -25,19 +25,33 @@ endif
 CFLAGS += -Wall
 CXXFLAGS += -Wall
 
-DEB_CONFIGURE_EXTRA_FLAGS += --with-apint=gmp --with-gmp=/usr/lib --disable-NTL \
-                             --without-MP --enable-gmp=/usr/lib \
-                             --enable-Singular --enable-factory --enable-libfac \
-                             --enable-IntegerProgramming --disable-debug \
+DEB_CONFIGURE_EXTRA_FLAGS += --with-apint=gmp \
+                             --with-gmp=/usr/lib \
+                             --with-NTL \
+                             --without-flint \
+                             --with-malloc=system
+                             --without-MP \
+                             --enable-gmp=/usr/lib \
+                             --enable-Singular \
+                             --enable-factory \
+                             --enable-libfac \
+                             --enable-IntegerProgramming \
                              --prefix=/usr/lib/singular-$(VERSION) \
                              --exec-prefix=/usr/lib/singular-$(VERSION) \
                              --libdir=/usr/lib \
-                             --includedir=/usr/include --without-lex \
-                             --without-bison $(ENABLE_DOC) --without-Boost \
-                             --with-factory=$(CURDIR)/factory \
+                             --includedir=/usr/include \
+                             --without-lex \
+                             --without-bison $(ENABLE_DOC) \
+                             --without-Boost \
+                             --with-factory=../factory \
                              --with-libfac=$(CURDIR)/libfac
 
+# BUG (see singular/spkg-install)
+# singular apparently doesnt work without debug
+DEB_CONFIGURE_EXTRA_FLAGS += --with-debug
+
 clean:
+	rm -f libfac/Singular kernel/Singular
 	if [ -f doc/Makefile ] ; then $(MAKE) -C doc clean ; fi
 	if [ -f Makefile ] ; then $(MAKE) distclean ; fi
 	rm -f *-stamp
@@ -111,22 +125,51 @@ binary-arch: install
 	dh_md5sums
 	dh_builddeb
 
+ENABLE_DEBUGOUTPUT=--disable-debugoutput
+WITH_DEBUG=--without-debug
+
 configure-stamp:
 	cp -f /usr/share/misc/config.guess config.guess
 	cp -f /usr/share/misc/config.sub config.sub
-	CFLAGS="$(CFLAGS) -fPIC" \
+	export CFLAGS="$(CFLAGS) -fPIC" \
 	CXXFLAGS="$(CXXFLAGS) -fPIC" \
-	CPPFLAGS="$(CPPFLAGS) -DMAKE_DISTRIBUTION -I../omalloc -I$(CURDIR)/factory" \
-	LDFLAGS="$(LDFLAGS) -L$(CURDIR)/factory -L$(CURDIR)/libfac -L$(CURDIR)/omalloc" \
-	enable_NTL=no \
-	./configure $(DEB_CONFIGURE_EXTRA_FLAGS)
+	CPPFLAGS="$(CPPFLAGS) -DMAKE_DISTRIBUTION -I$(CURDIR) -I../omalloc -I$(CURDIR)/factory -Ifactor" \
+	LDFLAGS="$(LDFLAGS) -L$(CURDIR)/factory -L$(CURDIR)/libfac -L$(CURDIR)/omalloc"; \
+	./configure $(DEB_CONFIGURE_EXTRA_FLAGS); \
+	cd factory; ./configure \
+	            --prefix=/usr \
+	            --includedir=/usr/include/factory \
+	            --exec-prefix=/usr \
+	            --bindir=/usr/bin \
+	            --libdir=/usr/lib \
+	            --enable-gmp \
+	            --with-gmp=/usr \
+	            --enable-NTL \
+	            --with-NTL=/usr \
+	            --without-flint \
+	            --with-gmp=/usr \
+	            --with-Singular=yes \
+	            $(ENABLE_DEBUGOUTPUT); \
+	cd $(CURDIR)/libfac; ./configure \
+	            --prefix=/usr \
+	            --exec-prefix=/usr \
+	            --bindir=/usr/bin \
+	            --libdir=/usr/lib \
+	            --with-Singular=yes \
+	            $(WITH_DEBUG)
+
+	# random symlinks
+	cd libfac; ln -sf ../Singular .
+	cd kernel; ln -sf ../Singular .
+
 	# don't look in system directories first:
-	sed 	-e 's#-I/usr/lib/singular-[0-9.-]*\>#-I'"$(CURDIR)"'#g' \
+	sed	-e 's#-I/usr/lib/singular-[0-9.-]*\>#-I'"$(CURDIR)"'#g' \
 		-e 's#-I/usr/\(local/\)\?include\( \|$$\)##g' \
-		-e 's#-I$${prefix}\( \|$$\)#-I'"$(CURDIR)"' #g' \
+		-e 's#-I$${prefix}\( \|$$\)#-I'"$(CURDIR)"' -I'"$(CURDIR)/factory"' -Ifactor #g' \
 		-e 's#-L/usr/local/lib\( \|$$\)##g' \
 		-e 's#-L/usr/lib\( \|$$\)##g' \
 		-e 's#-L$${libdir}\( \|$$\)##g' \
+		-e 's#-I../kernel#-I../kernel -I$(CURDIR)#g' \
 		-i \
 		Makefile omalloc/Makefile kernel/Makefile Singular/Makefile \
 		libfac/Makefile factory/GNUmakefile IntegerProgramming/Makefile
@@ -150,10 +193,13 @@ build build-arch: build-stamp
 EXAMPLE_EXCLUDE=-exclude MP -exclude gfan -exclude normaliz -exclude sing4ti2 -exclude memory -exclude dynlib
 
 build-stamp: configure-stamp
-	$(MAKE) LD='$(CXX) $(CXXFLAGS) -fPIC $(LDFLAGS)' LIBSINGULAR_FLAGS='-shared -Wl,-soname,libsingular-$(VERSION).so $(CXXFLAGS) -fPIC $(LDFLAGS) -L../omalloc' LD_DYN_FLAGS2='' DL_LIBSG='' GLIBC_DYN_FIX="-lc"
+	$(MAKE) LD='$(CXX) $(CXXFLAGS) -fPIC $(LDFLAGS)' \
+	           LIBSINGULAR_FLAGS='-shared -Wl,-soname,libsingular-$(VERSION).so $(CXXFLAGS) -fPIC $(LDFLAGS) -L../omalloc' \
+	           LD_DYN_FLAGS2='' DL_LIBSG='' GLIBC_DYN_FIX="-lc" \
+	           CXXFLAGS="$(CXXFLAGS) -fPIC" # CPPFLAGS="-I. -I.. -I$(CURDIR)/factory -I$(CURDIR)/libfac/charset $(CPPFLAGS) -fPIC"
 	# libparse is needed for doc-building ESingular and TSingular not built by "all".
 	# and the makefile here uses the wrong flags (only CPPFLAGS, not CXXFLAGS)
-	$(MAKE) -C Singular CPPFLAGS='-I. -I.. $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS)' libparse ESingular TSingular
+	$(MAKE) -C Singular CPPFLAGS='-I. -I.. -I$(CURDIR)/factory -Ifactor $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS)' libparse ESingular TSingular
 
 ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
 emacs-stamp: doc-stamp
@@ -223,3 +269,4 @@ install: build-stamp doc-stamp emacs-stamp
 	find debian/tmp -name "*.gif" -exec chmod a-x {} \;
 
 .PHONY: build-arch build-indep build install binary-arch binary-indep binary clean
+# vim:ts=4:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/singular.git



More information about the debian-science-commits mailing list