[postgis-tickets] r16153 - Fix parallel build directory creation in Makefile

Darafei komzpa at gmail.com
Fri Dec 15 06:51:34 PST 2017


Author: komzpa
Date: 2017-12-15 06:51:34 -0800 (Fri, 15 Dec 2017)
New Revision: 16153

Modified:
   trunk/extensions/postgis_tiger_geocoder/Makefile.in
   trunk/regress/run_test.pl
Log:
Fix parallel build directory creation in Makefile

Closes Fix parallel build directory creation in Makefile


Modified: trunk/extensions/postgis_tiger_geocoder/Makefile.in
===================================================================
--- trunk/extensions/postgis_tiger_geocoder/Makefile.in	2017-12-15 13:25:38 UTC (rev 16152)
+++ trunk/extensions/postgis_tiger_geocoder/Makefile.in	2017-12-15 14:51:34 UTC (rev 16153)
@@ -39,50 +39,44 @@
 
 all: sql/$(EXTENSION)--$(EXTVERSION).sql sql/$(EXTENSION)--unpackaged--$(EXTVERSION).sql sql/$(EXTENSION)--ANY--$(EXTVERSION).sql sql/test-normalize_address.sql sql/test-pagc_normalize_address.sql expected/test-normalize_address.out expected/test-pagc_normalize_address.out sql/test-upgrade.sql expected/test-upgrade.out
 
-sql/$(EXTENSION)--$(EXTVERSION).sql: sql/$(EXTENSION).sql
-	mkdir -p sql
-	mkdir -p expected
-	cp $< $@
 
+expected:
+	mkdir -p $@
 
-expected/test-normalize_address.out: sql_bits/test_tuples_only_unaligned.sql.in ../../extras/tiger_geocoder/regress/normalize_address_regress
-	mkdir -p expected
+sql:
+	mkdir -p $@
+
+sql/$(EXTENSION)--$(EXTVERSION).sql: sql/$(EXTENSION).sql | sql
+	cp $< $@
+
+expected/test-normalize_address.out: sql_bits/test_tuples_only_unaligned.sql.in ../../extras/tiger_geocoder/regress/normalize_address_regress | expected
 	cat $^ > $@
 
-expected/test-pagc_normalize_address.out: sql_bits/test_tuples_only_unaligned.sql.in ../../extras/tiger_geocoder/regress/pagc_normalize_address_regress
+expected/test-pagc_normalize_address.out: sql_bits/test_tuples_only_unaligned.sql.in ../../extras/tiger_geocoder/regress/pagc_normalize_address_regress | expected
 	cat $^ > $@
 
 ## adding \t .. to force output to be the same as what get in regular regress in tiger folder
-sql/test-normalize_address.sql: sql_bits/test_tuples_only_unaligned.sql.in ../../extras/tiger_geocoder/regress/normalize_address_regress.sql
-	mkdir -p sql
+sql/test-normalize_address.sql: sql_bits/test_tuples_only_unaligned.sql.in ../../extras/tiger_geocoder/regress/normalize_address_regress.sql | sql
 	cat $^ > $@
 
-sql/test-upgrade.sql:
-	mkdir -p sql
+sql/test-upgrade.sql: | sql
 	echo 'ALTER EXTENSION ${EXTENSION} UPDATE TO "$(EXTVERSION)next"' > $@
 
-expected/test-upgrade.out: sql/test-upgrade.sql
+expected/test-upgrade.out: sql/test-upgrade.sql | expected
 	cp $< $@
 
-sql/test-pagc_normalize_address.sql: sql_bits/test_tuples_only_unaligned.sql.in ../../extras/tiger_geocoder/regress/pagc_normalize_address_regress.sql
-	mkdir -p sql
+sql/test-pagc_normalize_address.sql: sql_bits/test_tuples_only_unaligned.sql.in ../../extras/tiger_geocoder/regress/pagc_normalize_address_regress.sql | sql
 	cat $^ > $@
 
-sql/$(EXTENSION).sql: sql_bits/tiger_geocoder.sql  sql_bits/mark_editable_objects.sql.in sql_bits/tiger_geocoder_comments.sql
-	mkdir -p sql
+sql/$(EXTENSION).sql: sql_bits/tiger_geocoder.sql  sql_bits/mark_editable_objects.sql.in sql_bits/tiger_geocoder_comments.sql | sql
 	cat $^ > $@
 
-sql/$(EXTENSION)--ANY--$(EXTVERSION).sql: ../postgis_extension_helper.sql sql_bits/remove_from_extension.sql.in sql/tiger_geocoder_upgrade_minor.sql sql_bits/mark_editable_objects.sql.in sql_bits/tiger_geocoder_comments.sql
-	mkdir -p sql
+sql/$(EXTENSION)--ANY--$(EXTVERSION).sql: ../postgis_extension_helper.sql sql_bits/remove_from_extension.sql.in sql/tiger_geocoder_upgrade_minor.sql sql_bits/mark_editable_objects.sql.in sql_bits/tiger_geocoder_comments.sql | sql
 	cat $^ > $@
 	echo "SELECT postgis_extension_drop_if_exists('${EXTENSION}', 'DROP SCHEMA tiger_data');" >> $@
 	cat ../postgis_extension_helper_uninstall.sql  >> $@
 
-
-
-
-sql/$(EXTENSION)--$(EXTVERSION)next--$(EXTVERSION).sql: sql/$(EXTENSION)--$(EXTVERSION)--$(EXTVERSION)next.sql
-	mkdir -p sql
+sql/$(EXTENSION)--$(EXTVERSION)next--$(EXTVERSION).sql: sql/$(EXTENSION)--$(EXTVERSION)--$(EXTVERSION)next.sql | sql
 	cp $< $@
 
 #strip BEGIN/COMMIT since these are not allowed in extensions
@@ -192,8 +186,7 @@
 
 #hardcode for now using
 #the extensions/make_unpackaged.sql script form an install
-sql/$(EXTENSION)--unpackaged--$(EXTVERSION).sql: sql_bits/tiger_geocoder--unpackaged.sql.in
-	mkdir -p sql
+sql/$(EXTENSION)--unpackaged--$(EXTVERSION).sql: sql_bits/tiger_geocoder--unpackaged.sql.in | sql
 	cp $< $@
 
 #upgrade script should have everything but table, schema, type creation/alter
@@ -204,9 +197,8 @@
 #aggregates are special
 #they can be dropped but we need to remove
 #them from the extension first
-sql/tiger_geocoder_upgrade_minor.sql:  sql_bits/tiger_geocoder_minor.sql.in
-	mkdir -p sql
-	 sed -e '/^\(CREATE\|ALTER\) \(CAST\|TYPE\|TABLE\|SCHEMA\|DOMAIN\|TRIGGER\).*;/d' \
+sql/tiger_geocoder_upgrade_minor.sql:  sql_bits/tiger_geocoder_minor.sql.in | sql
+	sed -e '/^\(CREATE\|ALTER\) \(CAST\|TYPE\|TABLE\|SCHEMA\|DOMAIN\|TRIGGER\).*;/d' \
 	 	 -e '/^\(CREATE\|ALTER\) \(CAST\|TYPE\|TABLE\|SCHEMA\|DOMAIN\|TRIGGER\)/,/\;/d' \
 	 	 -e 's/BEGIN;//g' -e 's/COMMIT;//g' \
 	 	 $< > $@

Modified: trunk/regress/run_test.pl
===================================================================
--- trunk/regress/run_test.pl	2017-12-15 13:25:38 UTC (rev 16152)
+++ trunk/regress/run_test.pl	2017-12-15 14:51:34 UTC (rev 16153)
@@ -754,6 +754,9 @@
 			print FILE $diff;
 			close(FILE);
 			fail("${msg}diff expected obtained", $diffile);
+			print "========";
+			print $diff;
+			print "========";
 			return 0;
 		}
 		else



More information about the postgis-tickets mailing list