+# 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
# 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
# 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!
# 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!
ifeq ($(shell tg summary -t),)
# This is not a TopGit branch, so just blubber a bit.
ifeq ($(shell tg summary -t),)
# This is not a TopGit branch, so just blubber a bit.
unpatch: __tg-temp-export
__tg-temp-export:
@echo "Exporting TopGit branches to series so that quilt can clean up..." >&2
unpatch: __tg-temp-export
__tg-temp-export:
@echo "Exporting TopGit branches to series so that quilt can clean up..." >&2