X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=debian%2Ftg2quilt.mk;h=a0f8d587bf2531461dcd308f7e3795494bec23a8;hb=6d8cb9730c6ec32fd56d8b0eb254ac0f835ec475;hp=1f890920b5bcf33ec0be264afe5c51d78c2999d9;hpb=9c9a9b49c3c6a70e273a7502d981fca217b062d6;p=topgit.git diff --git a/debian/tg2quilt.mk b/debian/tg2quilt.mk index 1f89092..a0f8d58 100644 --- a/debian/tg2quilt.mk +++ b/debian/tg2quilt.mk @@ -10,6 +10,10 @@ # include /usr/share/quilt/quilt.make # -include /usr/share/topgit/tg2quilt.mk # +# The leading dash is necessary for make not to die when the file is not +# installed. TopGit is not a build dependency (and does not need to be), and +# if the package is not installed, debian/rules can still be used normally. +# # The snippet exports the following targets. These targets only perform the # describe behaviour when invoked from a TopGit repository (`tg summary -t` # returns a non-empty set); used outside, they simply output informational @@ -34,6 +38,9 @@ # removed. This means that edits to the series file are # likely to vanish. # +# tg-cleanexport: recreates the debian/patches directory from scratch, using +# tg-rmdir and tg-export. +# # tg-forceclean: cleans the source tree, just like the debian/rules clean # target, and forcefully removes the debian/patches # directory in doing so. Yes, *force*-fully. WHAM! @@ -55,7 +62,7 @@ ifeq ($(shell tg summary -t),) # This is not a TopGit branch, so just blubber a bit. - tg-export tg-clean tg-forceclean tg-rmdir: + tg-export tg-clean tg-forceclean tg-rmdir tg-cleanexport: @echo "E: The $@ target only works from a TopGit repository." >&2 else @@ -69,7 +76,7 @@ $(QUILT_STAMPFN): tg-export unpatch: __tg-temp-export __tg-temp-export: @echo "Exporting TopGit branches to series so that quilt can clean up..." >&2 - $(MAKE) -f debian/rules tg-export + $(MAKE) --no-print-directory -f debian/rules tg-export .PHONY: __tg-temp-export # Set some tg-export-specific variables, e.g. default TG_BRANCHES to all @@ -121,13 +128,17 @@ endif # Make sure that we try to clean up the patches directory last tg-clean: clean - $(MAKE) -f debian/rules tg-rmdir + $(MAKE) --no-print-directory -f debian/rules tg-rmdir tg-forceclean: clean test -d $(PATCHES_DIR) && rm -r $(PATCHES_DIR) || : +tg-cleanexport: tg-rmdir + $(MAKE) --no-print-directory -f debian/rules tg-export + endif .PHONY: tg-clean tg-export tg-forceclean tg-rmdir # vim:ft=make:ts=8:noet +# -*- Makefile -*-, you silly Emacs! (shamelessly stolen from quilt)