Skip to contentSkip to conversation

Avoid ChangeLog erasing in tarball release

PATCH New Alessio Igor Bogani 1 participant 1 message Mar 17, 2009 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Avoid ChangeLog erasing in tarball release

Execute a make clean into a rt-tests directory, exploded from a tarball, cause erroneous erasing of the ChangeLog file. Let make do it only if it executes under git tree.

---
 Makefile |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Makefile +2 -1
index 1d9da78..fb8f917 100644
@@ -21,7 +21,8 @@ classic_pi: src/pi_tests/classic_pi.c
 pi_stress:  src/pi_tests/pi_stress.c
 	$(CC) $(FLAGS) -D_GNU_SOURCE -D VERSION_STRING=\"$(VERSION_STRING)\" $^ -o $@ $(LIBS)
 
-CLEANUP = $(TARGETS) *.o .depend *.*~ ChangeLog *.orig *.rej rt-tests.spec
+CLEANUP  = $(TARGETS) *.o .depend *.*~ *.orig *.rej rt-tests.spec
+CLEANUP += $(if $(wildcard .git), ChangeLog)
 
 clean:
 	for F in $(CLEANUP); do find -type f -name $$F | xargs rm -f; done
Signature · 1 line
1.6.0.4