X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=debian%2Ftg2quilt.mk;h=c1cc95a812ad9ad1c287ee5931dc9ffb1b9e7d3e;hb=11367cedcd47eb8250df75a45dc5775bd68b0a97;hp=66e9d4123ac0ab758c334ebea0e64819f387b308;hpb=d26e617f9b07ee63f9faa41aebce5a2b1ad171b5;p=topgit.git diff --git a/debian/tg2quilt.mk b/debian/tg2quilt.mk index 66e9d41..c1cc95a 100644 --- a/debian/tg2quilt.mk +++ b/debian/tg2quilt.mk @@ -75,6 +75,9 @@ ifdef PATCHES_DIR 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 @@ -122,7 +125,7 @@ else # remove the series file test -f $(QUILT_PATCH_DIR)/series && rm $(QUILT_PATCH_DIR)/series || : # 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; \