# a quilt series.
#
# It is intended to be included from debian/rules files of TopGit-using
-# packages, like so:
+# packages after including the quilt rules, like so:
#
+# include /usr/share/quilt/quilt.make
# -include /usr/share/topgit/tg2quilt.mk
#
# The snippet exports the following targets. These targets only perform the
# The PATCHES_DIR variable can be set before including the file to override
# the default debian/patches location.
#
-# Copyright © 2008 martin f. krafft <madduck@debian.org>
-# Released under terms of the the Artistic Licence 2.0.
+# More information, particularly for people working on TopGit-using packages,
+# can be found in /usr/share/doc/topgit/HOWTO-tg2quilt.gz .
+#
+# Copyright © 2008 martin f. krafft <madduck@debian.org> Released under terms
+# of the the Artistic Licence 2.0.
#
ifeq ($(shell tg summary -t),)
# We are in a TopGit branch, so let the fun begin.
-PATCHES_DIR ?= debian/patches
+PATCHES_DIR ?= $(QUILT_PATCH_DIR)
# Hook tg-export into quilt's make(1) snippet such that it gets executed
# before quilt patches or unpatches.
-debian/stamp-patched: tg-export
+$(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) $(MAKEFLAGS) -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
# TopGit branches
# Make sure that we try to clean up the patches directory last
tg-clean: clean
- $(MAKE) $(MAKEFLAGS) -f debian/rules tg-rmdir
+ $(MAKE) --no-print-directory -f debian/rules tg-rmdir
tg-forceclean: clean
- test -d debian/patches && rm -r $(PATCHES_DIR) || :
+ test -d $(PATCHES_DIR) && rm -r $(PATCHES_DIR) || :
endif
.PHONY: tg-clean tg-export tg-forceclean tg-rmdir
# vim:ft=make:ts=8:noet
+# -*- Makefile -*-, you silly Emacs! (shamelessly stolen from quilt)