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=4ec27e27e12028fcd1a14aba4e951b0659e5b2fb;hpb=cdaae5df1d8ccbd1d6d7faa56b6f38ebb2943b68;p=topgit.git diff --git a/debian/tg2quilt.mk b/debian/tg2quilt.mk index 4ec27e2..70ad402 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 @@ -118,9 +121,11 @@ 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) -depth -type d -empty -execdir rmdir {} + # fail if the directory could not be removed and still exists