Never clean files in quilt status directory
authorBen Hutchings <ben@decadent.org.uk>
Sun, 15 Jul 2018 20:53:39 +0000 (21:53 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 6 Jan 2019 19:33:01 +0000 (19:33 +0000)
The top-level "distclean" and "mrproper" targets delete zero-size
files in the source, perhaps assumed to be stamp files.  This is fine
for actual source direcgtories, but disastrous for a quilt status
directory.

For each patch, quilt stores the previous versions of the modified
files in a subdirectory of .pc.  If the patch creates a file, this
file will be empty.  Removing it effectively removes the file creation
from the patch.

The .git directory is already excluded from the clean rules for
a similar reason, so do the same for .pc.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Gbp-Pq: Name never-clean-files-in-quilt-status-directory.patch

Makefile

index dc10fc5da9af16a0c6779cd9b1e214cd2c548747..cd15149c73ec5d0ff372d1c0fa6b02b39c37a6c8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -158,7 +158,7 @@ FORCE: ;
 ###
 # clean: remove generated files
 # mrproper does a full cleaning including .config and linux symlink
-FIND_IGNORE := \( -name .git \) -prune -o
+FIND_IGNORE := \( -name .git -o -name .pc \) -prune -o
 quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),RM     $(wildcard $(rm-files)))
       cmd_rmfiles = rm -f $(rm-files)
 clean: