[Dctrl-tools-devel] [SCM] Debian control file query tools branch, master, updated. 2.22.2-16-g672a5ab

Antti-Juhani Kaijanaho ajk at debian.org
Fri Jul 13 21:47:29 UTC 2012


The following commit has been merged in the master branch:
commit 07d48880d55cb0ee39fa23085e4d8523e62a1fa8
Author: Antti-Juhani Kaijanaho <ajk at debian.org>
Date:   Mon Jul 2 19:06:23 2012 +0300

    GNUmakefile: Use gcc's -MD feature instead of calling gcc -M separately
    
    Signed-off-by: Antti-Juhani Kaijanaho <ajk at debian.org>

diff --git a/GNUmakefile b/GNUmakefile
index 0de0533..2723e8f 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -133,13 +133,7 @@ join-dctrl/join-dctrl : join-dctrl/join-dctrl.o libdctrl.a
 	$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
 
 %.o : %.c
-	$(CC) $(ALL_CFLAGS) -c -o $@ $<
-
-%.d: %.c
-	$(CC) -M $(ALL_CFLAGS) $< > $@.$$$$; \
-	   sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
-	   rm -f $@.$$$$
-
+	$(CC) $(ALL_CFLAGS) -MD -MF $*.d -c -o $@ $<
 
 libdctrl.a : $(libobj)
 	ar cr $@ $^
@@ -214,9 +208,5 @@ maintainer-clean : distclean
 tags :
 	etags *.[hc]
 
-ifeq ($(MAKECMDGOALS),clean)
-else ifeq ($(MAKECMDGOALS),distclean)
-else ifeq  ($(MAKECMDGOALS),maintainer-clean)
-else
-include $(obj:.o=.d)
-endif
+-include $(obj:.o=.d)
+

-- 
Debian control file query tools



More information about the Dctrl-tools-devel mailing list