1.1 --- a/make/solaris/makefiles/sa.make Thu Sep 29 09:53:56 2011 -0700 1.2 +++ b/make/solaris/makefiles/sa.make Thu Sep 29 13:47:57 2011 -0700 1.3 @@ -39,13 +39,7 @@ 1.4 # TODO: if it's a modules image, check if SA module is installed. 1.5 MODULELIB_PATH= $(BOOT_JAVA_HOME)/lib/modules 1.6 1.7 -# gnumake 3.78.1 does not accept the *s that 1.8 -# are in AGENT_FILES1 and AGENT_FILES2, so use the shell to expand them 1.9 -AGENT_FILES1 := $(shell /usr/bin/test -d $(AGENT_DIR) && /bin/ls $(AGENT_FILES1)) 1.10 -AGENT_FILES2 := $(shell /usr/bin/test -d $(AGENT_DIR) && /bin/ls $(AGENT_FILES2)) 1.11 - 1.12 -AGENT_FILES1_LIST := $(GENERATED)/agent1.classes.list 1.13 -AGENT_FILES2_LIST := $(GENERATED)/agent2.classes.list 1.14 +AGENT_FILES_LIST := $(GENERATED)/agent.classes.list 1.15 1.16 SA_CLASSDIR = $(GENERATED)/saclasses 1.17 1.18 @@ -59,7 +53,7 @@ 1.19 $(MAKE) -f sa.make $(GENERATED)/sa-jdi.jar; \ 1.20 fi 1.21 1.22 -$(GENERATED)/sa-jdi.jar: $(AGENT_FILES1) $(AGENT_FILES2) 1.23 +$(GENERATED)/sa-jdi.jar: $(AGENT_FILES) 1.24 $(QUIETLY) echo "Making $@"; 1.25 $(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \ 1.26 echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \ 1.27 @@ -73,7 +67,6 @@ 1.28 $(QUIETLY) if [ ! -d $(SA_CLASSDIR) ] ; then \ 1.29 mkdir -p $(SA_CLASSDIR); \ 1.30 fi 1.31 - 1.32 # Note: When indented, make tries to execute the '$(shell' comment. 1.33 # In some environments, cmd processors have limited line length. 1.34 # To prevent the javac invocation in the next block from using 1.35 @@ -84,13 +77,12 @@ 1.36 # the initialization of the lists is also done in the same phase 1.37 # using '$(shell rm ...' instead of using the more traditional 1.38 # 'rm ...' rule. 1.39 - $(shell rm -rf $(AGENT_FILES1_LIST) $(AGENT_FILES2_LIST)) 1.40 - $(foreach file,$(AGENT_FILES1),$(shell echo $(file) >> $(AGENT_FILES1_LIST))) 1.41 - $(foreach file,$(AGENT_FILES2),$(shell echo $(file) >> $(AGENT_FILES2_LIST))) 1.42 - 1.43 - $(QUIETLY) $(COMPILE.JAVAC) -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) @$(AGENT_FILES1_LIST) 1.44 - $(QUIETLY) $(COMPILE.JAVAC) -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) @$(AGENT_FILES2_LIST) 1.45 - 1.46 + $(shell rm -rf $(AGENT_FILES_LIST)) 1.47 +# gnumake 3.78.1 does not accept the *'s that 1.48 +# are in AGENT_FILES, so use the shell to expand them. 1.49 +# Be extra carefull to not produce too long command lines in the shell! 1.50 + $(foreach file,$(AGENT_FILES),$(shell ls -1 $(file) >> $(AGENT_FILES_LIST))) 1.51 + $(QUIETLY) $(COMPILE.JAVAC) -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) @$(AGENT_FILES_LIST) 1.52 $(QUIETLY) $(COMPILE.RMIC) -classpath $(SA_CLASSDIR) -d $(SA_CLASSDIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer 1.53 $(QUIETLY) echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES) 1.54 $(QUIETLY) rm -f $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql/sa.js 1.55 @@ -106,4 +98,4 @@ 1.56 clean: 1.57 rm -rf $(SA_CLASSDIR) 1.58 rm -rf $(GENERATED)/sa-jdi.jar 1.59 - rm -rf $(AGENT_FILES1_LIST) $(AGENT_FILES2_LIST) 1.60 + rm -rf $(AGENT_FILES_LIST)