Rebuild error2.h on Makefile changes.
authorAndre Noll <maan@systemlinux.org>
Fri, 20 Dec 2013 10:29:58 +0000 (11:29 +0100)
committerAndre Noll <maan@systemlinux.org>
Fri, 20 Dec 2013 10:29:58 +0000 (11:29 +0100)
Re-running configure without a subsequent make clean currently fails if
the set of objects has changed since the last run. This happens for
example if a different cryptolib was requested with --enable-cryptolib,
or if different libraries were detected by configure.

The problem is that error2.h is not updated according to the new
set of objects. Letting error2.h depend on Makefile should fix it,
because configure creates Makefile, so error2.h will be recreated
after reconfiguring.

Makefile.real

index ab64f3cc73f6d3713586fc45155494df44bc254a..d80203765c521d68a3f2f634536cf46283142545 100644 (file)
@@ -159,7 +159,7 @@ $(man_dir)/%.1: $(help2man_dir)/% | $(man_dir)
 $(hostbin_dir)/error2: error2.c | $(hostbin_dir)
        @[ -z "$(Q)" ] || echo 'HCC $<'
        $(Q) $(HOSTCC) -o $@ $<
 $(hostbin_dir)/error2: error2.c | $(hostbin_dir)
        @[ -z "$(Q)" ] || echo 'HCC $<'
        $(Q) $(HOSTCC) -o $@ $<
-error2.h: $(hostbin_dir)/error2
+error2.h: $(hostbin_dir)/error2 Makefile
        @[ -z "$(Q)" ] || echo 'ER2 $<'
        @echo "$(object_executable_matrix)" | $< > $@
 
        @[ -z "$(Q)" ] || echo 'ER2 $<'
        @echo "$(object_executable_matrix)" | $< > $@