build: Add missing config.sh dependency for pkg-config files
authorDiego Biurrun <diego@biurrun.de>
Mon, 6 Nov 2017 16:57:25 +0000 (17:57 +0100)
committerDiego Biurrun <diego@biurrun.de>
Thu, 9 Nov 2017 14:22:03 +0000 (15:22 +0100)
Also only update config.sh when it changed to avoid spurious rebuilds.

avbuild/library.mak
configure

index 98a100d..81778b7 100644 (file)
@@ -39,7 +39,7 @@ $(TESTPROGS) $(TOOLS): %$(EXESUF): %.o
 $(SUBDIR)lib$(NAME).version: $(SUBDIR)version.h | $(SUBDIR)
        $$(M) $$(SRC_PATH)/avbuild/libversion.sh $(NAME) $$< > $$@
 
-$(SUBDIR)lib$(NAME).pc: $(SUBDIR)version.h | $(SUBDIR)
+$(SUBDIR)lib$(NAME).pc: $(SUBDIR)version.h avbuild/config.sh | $(SUBDIR)
        $$(M) $$(SRC_PATH)/avbuild/pkgconfig_generate.sh $(NAME) "$(DESC)"
 
 $(SUBDIR)lib$(NAME).ver: $(SUBDIR)lib$(NAME).v $(OBJS)
index d43bd6e..1f220c8 100755 (executable)
--- a/configure
+++ b/configure
@@ -5385,7 +5385,7 @@ print_enabled_components libavformat/protocol_list.c URLProtocol url_protocols $
 
 # Settings for pkg-config files
 
-cat > avbuild/config.sh <<EOF
+cat > $TMPH <<EOF
 # Automatically generated by configure - do not modify!
 shared=$shared
 prefix=$prefix
@@ -5407,3 +5407,5 @@ for lib in $LIBRARY_LIST; do
     lib_deps="$(eval echo \$${lib}_deps)"
     echo ${lib}_deps=\"$lib_deps\" >> avbuild/config.sh
 done
+
+cp_if_changed $TMPH avbuild/config.sh