chiark / gitweb /
regress/Makefile.in: Declare <client>_c.o as .SECONDARY
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 26 Jul 2014 13:56:17 +0000 (14:56 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 13 Oct 2014 00:27:19 +0000 (01:27 +0100)
Otherwise you can get this:

 regress$ make adnstest_record -j2
 gcc -g -O2 -Wall -Wmissing-prototypes -Wwrite-strings -Wstrict-prototypes -Wcast-qual -Wpointer-arith -Wno-pointer-sign  -I../src -I. -I./../src  -DADNS_REGRESS_TEST -I. -c -g -o addrfam_d.o ../src/addrfam.c
 gcc    adnstest_c.o hrecord.o hcommon.o types_d.o event_d.o query_d.o reply_d.o general_d.o setup_d.o transmit_d.o parse_d.o poll_d.o check_d.o addrfam_d.o  -o adnstest_record
 gcc: error: adnstest_c.o: No such file or directory
 make: *** [adnstest_record] Error 1
 regress$

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
regress/Makefile.in

index 7428965edbc3faddad918b7ae0766680d9f1bb97..94017cc9964a071a6dad068f6bfa98e0654d39c9 100644 (file)
@@ -56,6 +56,16 @@ LINK_CMD=    $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
 %_playback:    %_c.o hplayback.o $(HARNLOBJS)
                $(LINK_CMD)
 
+.SECONDARY: $(addsuffix _c.o, $(CLIENTS))
+# Without this, make will remove <client>_c.o after building <client>.
+# This wastes effort.  (Debian bug #4073.)
+#
+# Also, it exposes us to a bug (in make 3.81, at least) which can
+# cause make to run the rule for building <client> without building
+# <client>_c.o!  (Debian #756123.)
+#
+# See also Savannah #29620, http://savannah.gnu.org/bugs/index.php?29620
+
 adnshost_%:    $(ADH_OBJS) h%.o $(HARNLOBJS)
                $(LINK_CMD)