changeset 2206:94a46c0ad8f2

8160334: Building --with-parfait= fails with No rule to make target 'PARFAIT_NATIVEJMOD Reviewed-by: tbell
author erikj
date Thu, 04 Aug 2016 10:05:40 +0200
parents d57780478145
children 7c9e87e37b25
files make/CreateJmods.gmk
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/make/CreateJmods.gmk	Thu Aug 04 10:03:57 2016 +0200
+++ b/make/CreateJmods.gmk	Thu Aug 04 10:05:40 2016 +0200
@@ -1,5 +1,5 @@
 
-# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -82,8 +82,10 @@
   endif
 endif
 
-# Changes to the jmod tool itself should also trigger a rebuild of all jmods
-DEPS += $(JMOD_CMD)
+# Changes to the jmod tool itself should also trigger a rebuild of all jmods.
+# The variable JMOD_CMD could contain an environment variable assignment before
+# the actual command. Filter that out using wildcard before adding to DEPS.
+DEPS += $(wildcard $(JMOD_CMD))
 ifeq ($(EXTERNAL_BUILDJDK), false)
   DEPS += $(call CacheFind, $(JDK_OUTPUTDIR)/modules/jdk.jlink/jdk/tools/jmod)
 endif
@@ -100,7 +102,7 @@
             --os-name $(REQUIRED_OS_NAME) \
             --os-arch $(OPENJDK_TARGET_CPU_LEGACY) \
             --os-version $(REQUIRED_OS_VERSION) \
-	        --modulepath $(JMODS_DIR) \
+            --modulepath $(JMODS_DIR) \
             --exclude '**{_the.*,*.diz,*.debuginfo,*.dSYM/**,*.pdb,*.map}' \
 	    $(JMOD_FLAGS) $(SUPPORT_OUTPUTDIR)/jmods/$(notdir $@)
 	$(MV) $(SUPPORT_OUTPUTDIR)/jmods/$(notdir $@) $@