[Pkg-cyrus-sasl2-commits] r247 - in /cyrus-sasl-2.1/trunk/debian: changelog rules

fabbe at users.alioth.debian.org fabbe at users.alioth.debian.org
Fri Jul 13 08:54:49 UTC 2007


Author: fabbe
Date: Fri Jul 13 08:54:49 2007
New Revision: 247

URL: http://svn.debian.org/wsvn/pkg-cyrus-sasl2/?sc=1&rev=247
Log:
Allow building twice by removing a minimal set of build-time generated files (symlinks, actually) in the clean target.

Modified:
    cyrus-sasl-2.1/trunk/debian/changelog
    cyrus-sasl-2.1/trunk/debian/rules

Modified: cyrus-sasl-2.1/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-cyrus-sasl2/cyrus-sasl-2.1/trunk/debian/changelog?rev=247&op=diff
==============================================================================
--- cyrus-sasl-2.1/trunk/debian/changelog (original)
+++ cyrus-sasl-2.1/trunk/debian/changelog Fri Jul 13 08:54:49 2007
@@ -8,8 +8,13 @@
   * debian/rules, debian/control, debian/sasl-sample-client.sgml,
     debian/sasl-sample-server.sgml: Introduce man pages for
     sasl-sample-client and sasl-sample-server.
-
- -- Fabian Fagerholm <fabbe at debian.org>  Tue, 10 Jul 2007 17:19:48 +0300
+  * debian/rules: Allow the package to be built twice. The upstream build
+    system cannot properly clean the source tree after a build, but this
+    at least allows another build to be performed even though the tree is
+    not exactly the same (some generated files are left, but they would be
+    regenerated anyway). (Closes: #424169)
+
+ -- Fabian Fagerholm <fabbe at debian.org>  Fri, 13 Jul 2007 11:47:05 +0300
 
 cyrus-sasl2 (2.1.22.dfsg1-12) unstable; urgency=low
 

Modified: cyrus-sasl-2.1/trunk/debian/rules
URL: http://svn.debian.org/wsvn/pkg-cyrus-sasl2/cyrus-sasl-2.1/trunk/debian/rules?rev=247&op=diff
==============================================================================
--- cyrus-sasl-2.1/trunk/debian/rules (original)
+++ cyrus-sasl-2.1/trunk/debian/rules Fri Jul 13 08:54:49 2007
@@ -69,14 +69,26 @@
 # Some convenience variables
 export TMPPKG := $(CURDIR)/debian/tmp
 
-AUTOTOOLS=rm -f acinclude.m4 aclocal.m4 config/config.sub \
-	config/config.guess config/ltmain.sh config/libtool.m4 && \
-	libtoolize --force && \
-	aclocal-1.9 -I $(CURDIR)/cmulocal -I $(CURDIR)/config && \
-	autoheader && \
-	autoconf && \
-	automake-1.9 --add-missing --include-deps && \
-	touch stamp-h.in
+AUTOFILES=acinclude.m4 aclocal.m4 config/config.sub config/config.guess \
+		  config/ltmain.sh config/libtool.m4
+BUILD_TMP_SUFFIX=.debian-build.tmp
+AUTOTOOLS=for i in $(AUTOFILES); do \
+		  	if [ -e $$i ]; then \
+				mv --verbose $$i `basename $$i`$(BUILD_TMP_SUFFIX) ; \
+			fi ; \
+		  done && \
+		  libtoolize --force && \
+		  aclocal-1.9 -I $(CURDIR)/cmulocal -I $(CURDIR)/config && \
+		  autoheader && \
+		  autoconf && \
+		  automake-1.9 --add-missing --include-deps && \
+		  touch stamp-h.in
+AUTOTOOLS_REVERSE=for i in $(AUTOFILES); do \
+				  	if [ -e `basename $$i`$(BUILD_TMP_SUFFIX) ]; then \
+						if [ -e $$i ]; then rm -fv $$i; fi ; \
+						mv --verbose `basename $$i`$(BUILD_TMP_SUFFIX) $$i ; \
+					fi ; \
+				  done
 
 
 ### The Makefile targets begin. ###
@@ -92,15 +104,18 @@
 	dh_testroot
 	rm -f build-stamp 
 
-ifneq "$(wildcard config.sub.old)" ""
-	mv config.sub.old config/config.sub
-endif
-ifneq "$(wildcard config.guess.old)" ""
-	mv config.guess.old config/config.guess
-endif
 	rm -f $(CURDIR)/sample/{sample-client,sample-server,config.h}
 	-$(MAKE) distclean
+	$(AUTOTOOLS_REVERSE)
+	(cd saslauthd && $(AUTOTOOLS_REVERSE) && cd ..)
 	-rm -f config.h config.log autom4ate.cache
+
+	# Remove symlinks that the CMU build sets up but never removes.
+	# They can be found by running find . -lname '*' -print in the
+	# source tree before and after a build and comparing the differences.
+	rm -f lib/sasldb.c lib/db_berkeley.c lib/allockey.c lib/cram.c \
+			lib/digestmd5.c lib/otp.c lib/gssapi.c lib/plain.c \
+			lib/anonymous.c lib/login.c lib/ntlm.c lib/sql.c lib/ldapdb.c
 
 	dh_clean 
 
@@ -110,13 +125,6 @@
 ###
 config.status: patch configure
 	dh_testdir
-
-ifneq "$(wildcard /usr/share/misc/config.sub)" ""
-	mv -f config/config.sub config.sub.old
-endif
-ifneq "$(wildcard /usr/share/misc/config.guess)" ""
-	mv -f config/config.guess config.guess.old
-endif
 
 	# Avoid problems with timestamp skew and autotools.
 	touch configure




More information about the Pkg-cyrus-sasl2-commits mailing list