[postgis-tickets] r15969 - Allow make -j parallel builds (PR-160)

Paul Ramsey pramsey at cleverelephant.ca
Wed Oct 11 10:05:18 PDT 2017


Author: pramsey
Date: 2017-10-11 10:05:18 -0700 (Wed, 11 Oct 2017)
New Revision: 15969

Modified:
   trunk/extensions/postgis/Makefile.in
Log:
Allow make -j parallel builds (PR-160)



Modified: trunk/extensions/postgis/Makefile.in
===================================================================
--- trunk/extensions/postgis/Makefile.in	2017-10-11 16:47:53 UTC (rev 15968)
+++ trunk/extensions/postgis/Makefile.in	2017-10-11 17:05:18 UTC (rev 15969)
@@ -65,8 +65,7 @@
 
 all: sql/$(EXTENSION)--$(EXTVERSION).sql sql/$(EXTENSION)--unpackaged--$(EXTVERSION).sql
 
-sql/$(EXTENSION).sql: $(EXTENSION_SCRIPTS)
-	mkdir -p sql
+sql/$(EXTENSION).sql: $(EXTENSION_SCRIPTS) | sql
 	printf '\\echo Use "CREATE EXTENSION $(EXTENSION)" to load this file. \\quit\n' > $@
 	cat $^ >> $@
 
@@ -77,52 +76,53 @@
 		| sed -e 's|@MODULEPATH@|$(MODULEPATH)|g' \
 		> $@
 
-sql/$(EXTENSION)--$(EXTVERSION).sql: sql/$(EXTENSION).sql
-	mkdir -p sql
+sql/$(EXTENSION)--$(EXTVERSION).sql: sql/$(EXTENSION).sql | sql
 	cp $< $@
 
-sql/$(EXTENSION)--unpackaged--$(EXTVERSION).sql: $(EXTENSION_UNPACKAGED_UPGRADE_SCRIPTS) ../../utils/create_unpackaged.pl
-	mkdir -p sql
+sql/$(EXTENSION)--unpackaged--$(EXTVERSION).sql: $(EXTENSION_UNPACKAGED_UPGRADE_SCRIPTS) ../../utils/create_unpackaged.pl | sql
 	cat $(EXTENSION_UNPACKAGED_UPGRADE_SCRIPTS) | $(PERL) ../../utils/create_unpackaged.pl postgis > $@
 
+sql:
+	mkdir -p $@
+
+sql_bits:
+	mkdir -p $@
+
 #strip BEGIN/COMMIT since these are not allowed in extensions
-sql_bits/spatial_ref_sys.sql: ../../spatial_ref_sys.sql
+sql_bits/spatial_ref_sys.sql: ../../spatial_ref_sys.sql | sql_bits
 	$(PERL) -pe 's/BEGIN\;//g ; s/COMMIT\;//g' $< > $@
 
 #strip BEGIN/COMMIT since these are not allowed in extensions
-sql_bits/postgis.sql: ../../postgis/postgis_for_extension.sql
-	mkdir -p sql_bits/
+sql_bits/postgis.sql: ../../postgis/postgis_for_extension.sql | sql_bits
 	$(PERL) -pe 's/BEGIN\;//g ; s/COMMIT\;//g' $< > $@
 
 ../../doc/postgis_comments.sql:
 	$(MAKE) -C ../../doc comments
 
-sql_bits/postgis_comments.sql: ../../doc/postgis_comments.sql
+sql_bits/postgis_comments.sql: ../../doc/postgis_comments.sql | sql_bits
 	cp $< $@
 
 #strip BEGIN/COMMIT since these are not allowed in extensions
-sql_bits/rtpostgis.sql: ../../raster/rt_pg/rtpostgis_for_extension.sql
-	mkdir -p sql_bits
+sql_bits/rtpostgis.sql: ../../raster/rt_pg/rtpostgis_for_extension.sql | sql_bits
 	$(PERL) -pe 's/BEGIN\;//g ; s/COMMIT\;//g' $< > $@
 
-sql_bits/spatial_ref_sys_config_dump.sql: ../../spatial_ref_sys.sql ../../utils/create_spatial_ref_sys_config_dump.pl
+sql_bits/spatial_ref_sys_config_dump.sql: ../../spatial_ref_sys.sql ../../utils/create_spatial_ref_sys_config_dump.pl | sql_bits
 	$(PERL) ../../utils/create_spatial_ref_sys_config_dump.pl $< > $@
 
-sql_bits/rtpostgis_upgrade.sql: ../../raster/rt_pg/rtpostgis_upgrade_for_extension.sql
+sql_bits/rtpostgis_upgrade.sql: ../../raster/rt_pg/rtpostgis_upgrade_for_extension.sql | sql_bits
 	$(PERL) -pe "s/BEGIN\;//g ; s/COMMIT\;//g; s/^(DROP .*)\;/SELECT postgis_extension_drop_if_exists('$(EXTENSION)', '\1');\n\1\;/" $< > $@
 
-sql_bits/postgis_upgrade.sql: ../../postgis/postgis_upgrade_for_extension.sql
+sql_bits/postgis_upgrade.sql: ../../postgis/postgis_upgrade_for_extension.sql | sql_bits
 	$(PERL) -pe "s/BEGIN\;//g ; s/COMMIT\;//g; s/^(DROP .*)\;/SELECT postgis_extension_drop_if_exists('$(EXTENSION)', '\1');\n\1\;/" $< > $@
 
-
 ../../doc/raster_comments.sql:
 	$(MAKE) -C ../../doc comments
 
-sql_bits/raster_comments.sql: ../../doc/raster_comments.sql
+sql_bits/raster_comments.sql: ../../doc/raster_comments.sql | sql_bits
 	cp $< $@
 
 #postgis_extension_upgrade_minor.sql is the one that contains both postgis AND raster
-sql_bits/postgis_extension_upgrade_minor.sql: $(EXTENSION_UPGRADE_SCRIPTS)
+sql_bits/postgis_extension_upgrade_minor.sql: $(EXTENSION_UPGRADE_SCRIPTS) | sql_bits
 	printf '\\echo Use "CREATE EXTENSION $(EXTENSION)" to load this file. \\quit\n' > $@
 	cat $^ >> $@
 



More information about the postgis-tickets mailing list