21137686 grails & unrar Makefiles break when PKG_PROTO_DIRS is extended s11-update
authorJohn Beck <John.Beck@Oracle.COM>
Fri, 29 May 2015 13:29:35 -0700
branchs11-update
changeset 4376 f3801994dee3
parent 4369 9935f32cf81f
child 4384 b2d57f949f7f
21137686 grails & unrar Makefiles break when PKG_PROTO_DIRS is extended
components/grails/Makefile
components/unrar/Makefile
make-rules/ips.mk
--- a/components/grails/Makefile	Thu May 28 03:17:48 2015 -0700
+++ b/components/grails/Makefile	Fri May 29 13:29:35 2015 -0700
@@ -39,6 +39,14 @@
 
 include $(WS_MAKE_RULES)/prep.mk
 include $(WS_MAKE_RULES)/ant.mk
+
+# Need to package the .jar files we've built, not the ones included in
+# the source tarball.  So we need $(BUILD_DIR_32) added to $(PKG_PROTO_DIRS)
+# but it has to come at the beginning not the end, so we set it before we
+# include ips.mk.
+
+PKG_PROTO_DIRS = $(BUILD_DIR_32)
+
 include $(WS_MAKE_RULES)/ips.mk
 
 # Make sure we use the specially modified versions of grails and grails-debug
@@ -49,11 +57,6 @@
 COMPONENT_PRE_BUILD_ACTION = $(MKDIR) $(@D)/tmp 
 COMPONENT_BUILD_ENV += "ANT_OPTS=-Djava.io.tmpdir=$(BUILD_DIR_32)/tmp"
 
-# Need to package the .jar files we've built, not the ones included in
-# the source tarball.
-PKG_PROTO_DIRS = $(BUILD_DIR_32) $(MANGLED_DIR) $(PROTO_DIR) $(@D) \
-	$(COMPONENT_DIR) $(COMPONENT_SRC)
-
 ASLR_MODE = $(ASLR_NOT_APPLICABLE)
 
 # common targets
--- a/components/unrar/Makefile	Thu May 28 03:17:48 2015 -0700
+++ b/components/unrar/Makefile	Fri May 29 13:29:35 2015 -0700
@@ -41,11 +41,12 @@
 
 include $(WS_MAKE_RULES)/prep.mk
 include $(WS_MAKE_RULES)/justmake.mk
-include $(WS_MAKE_RULES)/ips.mk
 
-PKG_PROTO_DIRS = $(MANGLED_DIR)
-PKG_PROTO_DIRS += $(BUILD_DIR_32)
-PKG_PROTO_DIRS += $(COMPONENT_DIR)
+# We need this before the default PKG_PROTO_DIRS, so set it before we include
+# ips.mk, which will append the default set.
+PKG_PROTO_DIRS = $(BUILD_DIR_32)
+
+include $(WS_MAKE_RULES)/ips.mk
 
 PATCH_LEVEL =	0
 
--- a/make-rules/ips.mk	Thu May 28 03:17:48 2015 -0700
+++ b/make-rules/ips.mk	Fri May 29 13:29:35 2015 -0700
@@ -115,6 +115,9 @@
 
 MANGLED_DIR =	$(PROTO_DIR)/mangled
 
+# We use += below so anyone wishing to put other directories at the beginning
+# of the list can do so, by setting PKG_PROTO_DIRS before including this file.
+# So don't change += to = here or components that use this will break.
 PKG_PROTO_DIRS += $(MANGLED_DIR) $(PROTO_DIR) $(@D) $(COMPONENT_DIR) $(COMPONENT_SRC)
 
 MANIFEST_BASE =		$(BUILD_DIR)/manifest-$(MACH)