X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;ds=sidebyside;f=debian%2Ftg2quilt.mk;h=70ad40288e163f7ff71ddbe9db02e9e4ca4de4a2;hb=e076b1866e4ffb05c3c0bd9bcd52f4898941cadf;hp=2ff9bc9a754f7cc051143ef3952cecdc8caf7534;hpb=32158f526a4add8e1461a17414dee675a80d3f8e;p=topgit.git diff --git a/debian/tg2quilt.mk b/debian/tg2quilt.mk index 2ff9bc9..70ad402 100644 --- a/debian/tg2quilt.mk +++ b/debian/tg2quilt.mk @@ -68,11 +68,16 @@ else # We are in a TopGit branch, so let the fun begin. -ifdef (PATCHES_DIR) - @echo 'W: The $PATCHES_DIR variable is deprecated, please use $QUILT_PATCH_DIR instead' >&2 +ifdef PATCHES_DIR + DUMMY := $(warning W: The $$PATCHES_DIR variable is deprecated, please use $$QUILT_PATCH_DIR instead.) + DUMMY := $(warning W: Sleeping for 10 seconds so you can read this!) + DUMMY := $(shell sleep 10) QUILT_PATCH_DIR := $(PATCHES_DIR) endif +QUILT_PATCH_DIR ?= debian/patches +QUILT_STAMPFN ?= patch + # Hook tg-export into quilt's make(1) snippet such that it gets executed # before quilt patches or unpatches. $(QUILT_STAMPFN): tg-export @@ -116,11 +121,13 @@ else | xargs grep -l '^tg:') tg-rmdir: # remove all files whose contents matches /^tg:/ - test -n "$(__TG_FILES)" && rm $(__TG_FILES) || : - # remove the series file - test -f $(QUILT_PATCH_DIR)/series && rm $(QUILT_PATCH_DIR)/series || : + rm -f $(__TG_FILES) + # remove the series file + rm -f $(QUILT_PATCH_DIR)/series + # remove dpkg v3 file + rm -f $(QUILT_PATCH_DIR)/.dpkg-source-applied # try to remove directories - find $(QUILT_PATCH_DIR) -type d | tac | xargs rmdir 2>/dev/null || : + find $(QUILT_PATCH_DIR) -depth -type d -empty -execdir rmdir {} + # fail if the directory could not be removed and still exists @test ! -d $(QUILT_PATCH_DIR) || { \ echo "E: $(QUILT_PATCH_DIR) contains non-TopGit-generated files:" >&2; \