[singular] 04/45: doc building optional

felix salfelder felix-guest at alioth.debian.org
Sat Sep 14 13:57:00 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 5b4fce680fb56ab5938a55884a04dde80bc5ec03
Author: Felix Salfelder <felix at salfelder.org>
Date:   Sun Jul 14 09:25:14 2013 +0200

    doc building optional
---
 debian/rules |   39 ++++++++++++++++++++++++++-------------
 1 file changed, 26 insertions(+), 13 deletions(-)

diff --git a/debian/rules b/debian/rules
index bf0b5ee..c4959ab 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,6 +11,15 @@ CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
 CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS)
 LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
 
+DOC_TRUE=
+ifneq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
+	DOC_TRUE=\#
+else
+	ENABLE_DOC=--enable-doc
+	DOCDIR=doc
+endif
+
+
 CFLAGS += -Wall
 CXXFLAGS += -Wall
 
@@ -22,7 +31,7 @@ DEB_CONFIGURE_EXTRA_FLAGS += --with-apint=gmp --with-gmp=/usr/lib --disable-NTL
                              --exec-prefix=/usr/lib/singular-$(VERSION) \
                              --libdir=/usr/lib \
                              --includedir=/usr/include --without-lex \
-                             --without-bison --enable-doc --without-Boost \
+                             --without-bison $(ENABLE_DOC) --without-Boost \
                              --with-factory=$(CURDIR)/factory \
                              --with-libfac=$(CURDIR)/libfac
 
@@ -74,7 +83,7 @@ binary-arch: install
 	ln -sf ../lib/singular-$(VERSION)/Singular debian/singular/usr/bin/
 	ln -sf ../lib/singular-$(VERSION)/TSingular debian/singular/usr/bin/
 	ln -sf ../lib/singular-$(VERSION)/ESingular debian/singular/usr/bin/
-	for dir in info html doc examples emacs ; do \
+	for dir in info html $(DOCDIR) examples emacs ; do \
 		mkdir -p debian/libsingular-$(VERSION)/usr/share/singular-$(VERSION)/$$dir ; \
 		ln -sf /usr/share/singular-$(VERSION)/$$dir \
 			debian/libsingular-$(VERSION)/usr/lib/singular-$(VERSION)/$$dir ; \
@@ -144,6 +153,7 @@ build-stamp: configure-stamp
 	# and the makefile here uses the wrong flags (only CPPFLAGS, not CXXFLAGS)
 	$(MAKE) -C Singular CPPFLAGS='-I. -I.. $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS)' libparse ESingular TSingular
 
+ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
 emacs-stamp: doc-stamp
 	cd Singular && ln -sf ../kernel/p_*.so .
 	mkdir -p debian/lddir && ln -sf ../../Singular/libsingular.so debian/lddir/libsingular-$(VERSION).so
@@ -172,6 +182,9 @@ doc-stamp: build-stamp
 		standalone-txt standalone-html html singular.idx singular.hlp
 	rm -r debian/doclddir
 	touch $@
+endif
+emacs-stamp:
+doc-stamp:
 
 install: build-stamp doc-stamp emacs-stamp
 	dh_testdir
@@ -179,17 +192,17 @@ install: build-stamp doc-stamp emacs-stamp
 	dh_prep
 	$(MAKE) DESTDIR=$(CURDIR)/debian/tmp/ DL_LIBSG='' install-libsingular templatedir='$${includedir}/factory/templates'
 	$(MAKE) -C Singular DESTDIR=$(CURDIR)/debian/tmp/ DL_LIBSG='' install
-	$(MAKE) -C doc \
-		bindir="$(CURDIR)/Singular" \
-		SINGULAR='$(CURDIR)/Singular/Singular' \
-		install_prefix=$(CURDIR)/debian/tmp/usr/share/singular-$(VERSION) \
-		install-sharedist
-	$(MAKE) -C emacs \
-		prefix="$(CURDIR)" \
-		examplesdir="$(CURDIR)/doc/examples" \
-		SINGULAR='$(CURDIR)/Singular/Singular' \
-		install_prefix=$(CURDIR)/debian/tmp/usr/share/singular-$(VERSION) \
-		install-sharedist
+	$(DOC_TRUE)$(MAKE) -C doc \
+	$(DOC_TRUE)	bindir="$(CURDIR)/Singular" \
+	$(DOC_TRUE)	SINGULAR='$(CURDIR)/Singular/Singular' \
+	$(DOC_TRUE)	install_prefix=$(CURDIR)/debian/tmp/usr/share/singular-$(VERSION) \
+	$(DOC_TRUE)	install-sharedist
+	$(DOC_TRUE)$(MAKE) -C emacs \
+	$(DOC_TRUE)	prefix="$(CURDIR)" \
+	$(DOC_TRUE)	examplesdir="$(CURDIR)/doc/examples" \
+	$(DOC_TRUE)	SINGULAR='$(CURDIR)/Singular/Singular' \
+	$(DOC_TRUE)	install_prefix=$(CURDIR)/debian/tmp/usr/share/singular-$(VERSION) \
+	$(DOC_TRUE)	install-sharedist
 	# surfex is not included due to missing sources, so do not install wrappers, either:
 	rm debian/tmp/usr/lib/singular-$(VERSION)/LIB/surfex.lib
 	rm debian/tmp/usr/lib/singular-$(VERSION)/surfex

-- 
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