From: Ian Jackson Date: Sat, 26 Jul 2014 13:56:17 +0000 (+0100) Subject: regress/Makefile.in: Declare _c.o as .SECONDARY X-Git-Tag: adns-1.5.0-rc0~47 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=adns.git;a=commitdiff_plain;h=2260f64fef01236f3cb0d3da98dbeeeb117c224c regress/Makefile.in: Declare _c.o as .SECONDARY 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 --- diff --git a/regress/Makefile.in b/regress/Makefile.in index 7428965..94017cc 100644 --- a/regress/Makefile.in +++ b/regress/Makefile.in @@ -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 _c.o after building . +# 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 without building +# _c.o! (Debian #756123.) +# +# See also Savannah #29620, http://savannah.gnu.org/bugs/index.php?29620 + adnshost_%: $(ADH_OBJS) h%.o $(HARNLOBJS) $(LINK_CMD)