monotone-commits-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-commits-diffs] org.debian.monotone: 1276cf13fe434ed08df6766a4e


From: code
Subject: [Monotone-commits-diffs] org.debian.monotone: 1276cf13fe434ed08df6766a4e0b22c9ddfc48dd
Date: Mon, 11 Mar 2013 21:53:39 +0100 (CET)

revision:            1276cf13fe434ed08df6766a4e0b22c9ddfc48dd
tag:                 debian-monotone-0.43-1
date:                2009-04-04T00:27:26
author:              address@hidden
branch:              org.debian.monotone
changelog:
Clean up rules a bit using new dh_auto_* commands

manifest:
format_version "1"

new_manifest [6398eb2853fb0fd66984d9ac8a9b15baf33552aa]

old_revision [b515a0ab88ac9466f05007bb82559b36c593f14a]

patch "rules"
 from [f97c6b074392bb695e99fa1d206629849b9c6761]
   to [185a683db905c4e0b4cdc48efec5d2f4ca3c10e4]
============================================================
--- rules	f97c6b074392bb695e99fa1d206629849b9c6761
+++ rules	185a683db905c4e0b4cdc48efec5d2f4ca3c10e4
@@ -3,49 +3,6 @@
 # debian/rules for monotone, by Zack Weinberg
 # Based on a public domain template, originally written by Joey Hess.
 
-# Uncomment this to turn on verbose mode. 
-export DH_VERBOSE=1
-
-# These are used for cross-compiling and for saving the configure script
-# from having to guess our platform (since we know it already)
-export DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-export DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-
-ifeq "$(DEB_HOST_GNU_TYPE)" "$(DEB_BUILD_GNU_TYPE)"
-# not cross-compiling; don't specify --host, which will confuse configure
-BUILD_AND_HOST := --build=$(DEB_BUILD_GNU_TYPE)
-else
-# cross-compiling: need both switches.  Also, turn off the testsuite
-# (the cross-compile environment should have done this anyway, but
-# let's make sure).
-BUILD_AND_HOST := --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE)
-DEB_BUILD_OPTIONS += nocheck
-endif
-
-# This enables parallelism.
-ifneq (,$(findstring parallel=,$(DEB_BUILD_OPTIONS)))
-PAR := -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
-endif
-
-# DEB_BUILD_OPTIONS=noopt handling (Policy 10.1) and arch-specific
-# compiler options.  Allow total override of CFLAGS from the
-# make command line (make -f debian/rules build-arch CFLAGS=whatever).
-# Warning options are activated by upstream configure.
-DEFAULT_CFLAGS = -g
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-DEFAULT_CFLAGS += -O0
-# HPPA needs -mlong-calls when built with -O0 because the code is so
-# huge.  Might be addressed by more use of shared libraries - revisit
-# if we ever do anything about bug #318509.
-ifneq (,$(findstring hppa,$(DEB_HOST_GNU_TYPE)))
-DEFAULT_CFLAGS += -mlong-calls
-endif
-else # optimization enabled
-DEFAULT_CFLAGS += -O2
-endif
-
-CFLAGS ?= $(DEFAULT_CFLAGS)
-
 # put this up top so it's the default rule.
 #
 # Policy (section 4.9) says that build should depend on build-indep.
@@ -54,78 +11,118 @@ CFLAGS ?= $(DEFAULT_CFLAGS)
 # depends on build-indep, even a -B build will try to generate the
 # manuals -- and the buildds will do this having installed only the
 # Build-Depends, for they are ignorant of B-D-I.  All die, O the
-# embarrassment.  (This has been a festering known problem for at
-# least five years; see bugs #218893 and #229357.  There is a bunch of
-# recent discussion but, as far as I can tell, no actual forward
-# progress is being made.)
+# embarrassment.  (This has been a festering known problem for 
+# nearly a *decade*, with no forward progress since 2007.  See bugs
+# #218893 and #229357.)
 #
 # Conversely, not having build depend on build-indep means that if you
 # do a normal dpkg-buildpackage, the manual gets generated in the
 # binary-indep phase rather than the build phase, which works fine (as
 # long as you are being sensible and using fakeroot, anyway; I haven't
 # tried it with actual root privileges and don't propose to).
+#
+# (This is also the primary reason we aren't using "dh" yet; it only
+# knows about the "build" target, not "build-arch"/"build-indep".)
 build: build-arch
+binary: binary-indep binary-arch
 
+
+# DEB_BUILD_OPTIONS handling
+
+ifeq "$(findstring noopt,$(DEB_BUILD_OPTIONS))" ""
+DEFAULT_CFLAGS = -g -O2
+else # optimization disabled
+DEFAULT_CFLAGS = -g -O0
+endif
+CFLAGS ?= $(DEFAULT_CFLAGS)
+
+PAR := $(patsubst parallel=%,-j%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+
+
+# Other tunables
+
+# Thanks to buildd configuration decisions that no one will explain to
+# me in sufficient detail to detect reliably, we have to disable all
+# netsync tests until upstream gets around to converting them to local
+# network sockets.
+export DISABLE_NETWORK_TESTS = 1
+export DH_VERBOSE = 1
+
+
+# Building
+
 config.status: configure
 	dh_testdir
-ifneq "$(wildcard /usr/share/misc/config.sub)" ""
-	mv -f config.sub config.sub.upstream
+	[ -f config.sub.upstream ] || mv config.sub config.sub.upstream
+	[ -f config.guess.upstream ] || mv config.guess config.guess.upstream
 	cp -f /usr/share/misc/config.sub config.sub
-endif
-ifneq "$(wildcard /usr/share/misc/config.guess)" ""
-	mv -f config.guess config.guess.upstream
 	cp -f /usr/share/misc/config.guess config.guess
-endif
-	./configure $(BUILD_AND_HOST) \
-		    --prefix=/usr --mandir='$${prefix}/share/man' \
-		    --infodir='$${prefix}/share/info' CFLAGS="$(CFLAGS)" \
-		    CXXFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
+	dh_auto_configure -- CXXFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
 
-# We don't want to generate the info documentation in build-arch, so
-# we have to bypass the 'all' target.  (Revisit after automake-ectomy.)
-
-# The testsuite is still not entirely reliable in parallel mode, and
-# thanks to buildd configuration decisions that no one will explain to
-# me in sufficient detail to detect reliably, we have to disable all
-# netsync tests.  (We could get away with only doing that on mips, but
-# who knows whether another architecture will decide to do the same
-# thing.)  The real fix for both these issues will be network tests
-# over local domain sockets, coming Real Soon Now from upstream.
+# We don't want to generate the info documentation in build-arch.
 build-arch: build-arch-stamp
 build-arch-stamp: config.status
-	make $(PAR) all-local
-	make $(PAR) mtn mtnopt
-ifeq "$(findstring nocheck, $(DEB_BUILD_OPTIONS))" ""
-	make $(PAR) unit_tester tester check_net
-	DISABLE_NETWORK_TESTS=1 make check-local || sh contrib/dump-test-logs.sh
-endif
+	dh_auto_build -- $(PAR) INFO_DEPS=
+	dh_auto_test -- $(PAR) INFO_DEPS= || sh contrib/dump-test-logs.sh
 	touch $@
 
+# Conversely, in build-indep all we want is the documentation.
 build-indep: build-indep-stamp
 build-indep-stamp: config.status
-
-# Just the formatted documentation.
 	make $(PAR) info html monotone.pdf
 	touch $@
 
 clean:
 	dh_testdir
-	dh_testroot
-	[ ! -f Makefile ] || $(MAKE) distclean
-	rm -f build-arch-stamp build-indep-stamp
+	dh_auto_clean
+	dh_clean
 	[ ! -f config.sub.upstream ] || mv -f config.sub.upstream config.sub
 	[ ! -f config.guess.upstream ] || mv -f config.guess.upstream config.guess
-	dh_clean
 
-# Build architecture-independent files here.
+
+# Architecture-dependent binary packages.
+
+binary-arch: build-arch
+	dh_testroot
+	dh_prep
+	dh_installdirs -a
+
+# again, we don't want the documentation in this package; this pair of
+# targets installs everything but
+	$(MAKE) DESTDIR=$(shell pwd)/debian/monotone \
+	    install-exec-am install-data-local
+
+# dh_installdirs created etc/bash_completion.d.  dh_install cannot install
+# a file under a different basename.
+	cp contrib/monotone.bash_completion \
+	   debian/monotone/etc/bash_completion.d/monotone
+
+	dh_installdocs -a
+# upstream file "ChangeLog" is not actually a change log
+	dh_installchangelogs -a -X ChangeLog
+	dh_installexamples -a
+	dh_installman -a
+	dh_compress -a
+	dh_fixperms -a
+	dh_strip -a
+	dh_shlibdeps -a
+	dh_installdeb -a
+	dh_gencontrol -a
+	dh_md5sums -a
+	dh_builddeb -a
+
+
+# Architecture-independent binary packages.
 #
 # Both monotone-server and monotone-doc are permitted to have their
 # documentation directories be symlinks to the main package's
-# documentation directory, per Policy 12.5.  This means we should not
-# run dh_installexamples or dh_installchangelogs for either, and should
-# not run dh_installdocs for monotone-server.  monotone-doc needs us
-# to run dh_installdocs for monotone.pdf and doc-base support, but then
-# needs a bunch of -X flags to avoid conflicting files.
+# documentation directory, per Policy 12.5.  (We are tricksily having
+# monotone-doc add to the contents of the main documentation
+# directory.) This means we should not run dh_installexamples or
+# dh_installchangelogs for either, and should not run dh_installdocs
+# for monotone-server.  monotone-doc needs to run dh_installdocs for
+# monotone.pdf and doc-base support, but this requires a few -X flags
+# to avoid conflicting files.
 #
 # The upstream makefiles' install targets do nothing useful for these
 # packages.  (In particular, we do not want the monolithic
@@ -137,7 +134,6 @@ binary-indep: build-indep
 # directly into /usr/share/doc/monotone, which doesn't work.)
 
 binary-indep: build-indep
-	dh_testdir
 	dh_testroot
 	dh_prep
 
@@ -173,41 +169,4 @@ binary-indep: build-indep
 	dh_md5sums -i
 	dh_builddeb -i
 
-# Build architecture-dependent files here.
-binary-arch: build-arch
-	dh_testdir
-	dh_testroot
-	dh_prep
-	dh_installdirs -a
-
-# again because we don't want the documentation in *-arch, we can't
-# use the generic install target; instead, use the *nonrecursive*
-# install-exec target for the top level makefile and the install-data
-# target for the po directory.  (using the recursive install-exec
-# target would work too, but there's no point.)
-#
-# N.B. DEB_BUILD_OPTIONS=nostrip is handled entirely within dh_strip.
-	$(MAKE) DESTDIR=$(shell pwd)/debian/monotone install-exec-am
-	$(MAKE) DESTDIR=$(shell pwd)/debian/monotone install-data-local
-
-# dh_installdirs created etc/bash_completion.d.  dh_install cannot install
-# a file under a different basename.
-	cp contrib/monotone.bash_completion \
-	   debian/monotone/etc/bash_completion.d/monotone
-
-# upstream file "ChangeLog" is not actually a change log
-	dh_installchangelogs -a -X ChangeLog
-	dh_installdocs -a
-	dh_installexamples -a
-	dh_installman -a
-	dh_strip -a
-	dh_compress -a
-	dh_fixperms -a
-	dh_installdeb -a
-	dh_shlibdeps -a
-	dh_gencontrol -a
-	dh_md5sums -a
-	dh_builddeb -a
-
-binary: binary-indep binary-arch
 .PHONY: clean build build-arch build-indep binary binary-arch binary-indep

reply via email to

[Prev in Thread] Current Thread [Next in Thread]