Add Makefile to rebuild targets for generated files
authorDan Scott <dscott@laurentian.ca>
Thu, 22 Mar 2012 20:04:39 +0000 (16:04 -0400)
committerJason Stephenson <jstephenson@mvlc.org>
Thu, 29 Mar 2012 14:34:37 +0000 (10:34 -0400)
If you rerun ./configure with a different option (such as
--sysconf=foo), the changed Makefile needs to trigger a rebuild of the
generated files. Otherwise, the first generated version of the file is
always newer than its *.in counterpart and a rebuild won't be triggered
on subsequent ./configure runs.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Open-ILS/src/Makefile.am
Open-ILS/src/perlmods/Makefile.am

index 4a4d9ac..d250f58 100644 (file)
@@ -183,32 +183,32 @@ uninstall-hook:
        rm -R $(XSLDIR)
        rm -R $(CGIDIR)
 
-@srcdir@/extras/fast-extract: @srcdir@/extras/fast-extract.in
-       $(do_subst) "$<" > "$@"
+@srcdir@/extras/fast-extract: Makefile @srcdir@/extras/fast-extract.in
+       $(do_subst) @srcdir@/extras/fast-extract.in > "$@"
        chmod 755 "$@"
 
-@srcdir@/extras/import/marc2are.pl: @srcdir@/extras/import/marc2are.pl.in
-       $(do_subst) "$<" > "$@"
+@srcdir@/extras/import/marc2are.pl: Makefile @srcdir@/extras/import/marc2are.pl.in
+       $(do_subst) @srcdir@/extras/import/marc2are.pl.in > "$@"
        chmod 755 "$@"
 
-@srcdir@/extras/import/marc2bre.pl: @srcdir@/extras/import/marc2bre.pl.in
-       $(do_subst) "$<" > "$@"
+@srcdir@/extras/import/marc2bre.pl: Makefile @srcdir@/extras/import/marc2bre.pl.in
+       $(do_subst) @srcdir@/extras/import/marc2bre.pl.in > "$@"
        chmod 755 "$@"
 
-@srcdir@/extras/import/marc2sre.pl: @srcdir@/extras/import/marc2sre.pl.in
-       $(do_subst) "$<" > "$@"
+@srcdir@/extras/import/marc2sre.pl: Makefile @srcdir@/extras/import/marc2sre.pl.in
+       $(do_subst) @srcdir@/extras/import/marc2sre.pl.in > "$@"
        chmod 755 "$@"
 
-@srcdir@/extras/import/parallel_pg_loader.pl: @srcdir@/extras/import/parallel_pg_loader.pl.in
-       $(do_subst) "$<" > "$@"
+@srcdir@/extras/import/parallel_pg_loader.pl: Makefile @srcdir@/extras/import/parallel_pg_loader.pl.in
+       $(do_subst) @srcdir@/extras/import/parallel_pg_loader.pl.in > "$@"
        chmod 755 "$@"
 
-$(supportscr)/authority_control_fields.pl: $(supportscr)/authority_control_fields.pl.in
-       $(do_subst) "$<" > "$@"
+$(supportscr)/authority_control_fields.pl: Makefile $(supportscr)/authority_control_fields.pl.in
+       $(do_subst) $(supportscr)/authority_control_fields.pl.in > "$@"
        chmod 755 "$@"
 
-$(supportscr)/marc_export: $(supportscr)/marc_export.in
-       $(do_subst) "$<" > "$@"
+$(supportscr)/marc_export: Makefile $(supportscr)/marc_export.in
+       $(do_subst) $(supportscr)/marc_export.in > "$@"
        chmod 755 "$@"
 
 #perl-install and string-templates-install     
index 64f350d..ac507d1 100644 (file)
@@ -31,8 +31,8 @@ install: build-perl
 build-perl: lib/OpenILS/Utils/Cronscript.pm
        perl Build.PL --destdir $(DESTDIR) || make -s build-perl-fail
 
-lib/OpenILS/Utils/Cronscript.pm: lib/OpenILS/Utils/Cronscript.pm.in
-       $(do_subst) "$<" > "$@"
+lib/OpenILS/Utils/Cronscript.pm: Makefile lib/OpenILS/Utils/Cronscript.pm.in
+       $(do_subst) lib/OpenILS/Utils/Cronscript.pm.in > "$@"
 
 build-perl-fail:
        echo