]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
make: check if configure output is still likely to be valid.
authorAdam Sutton <dev@adamsutton.me.uk>
Wed, 9 Jan 2013 21:26:20 +0000 (21:26 +0000)
committerAdam Sutton <dev@adamsutton.me.uk>
Wed, 9 Jan 2013 21:26:51 +0000 (21:26 +0000)
Makefile

index d8d6197e0f741deabadd3b1be116446977c9c161..445586bc35aa133f4bf5dd4f69156eab9107efd0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -221,10 +221,16 @@ DEPS       = ${OBJS:%.o=%.d}
 all: ${PROG}
 
 # Special
-.PHONY:        clean distclean
+.PHONY:        clean distclean check_config
+
+# Check configure output is valid
+check_config:
+       @test $(CURDIR)/.config.mk -nt $(CURDIR)/configure\
+               || echo "./configure output is old, please re-run"
+       @test $(CURDIR)/.config.mk -nt $(CURDIR)/configure
 
 # Binary
-${PROG}: $(OBJS) $(ALLDEPS)
+${PROG}: check_config $(OBJS) $(ALLDEPS)
        $(CC) -o $@ $(OBJS) $(CFLAGS) $(LDFLAGS)
 
 # Object