Print this page


Split Close
Expand all
Collapse all
          --- old/make/solaris/makefiles/sa.make
          +++ new/make/solaris/makefiles/sa.make
↓ open down ↓ 51 lines elided ↑ open up ↑
  52   52  SA_BUILD_VERSION_PROP = "sun.jvm.hotspot.runtime.VM.saBuildVersion=$(SA_BUILD_VERSION)"
  53   53  
  54   54  SA_PROPERTIES = $(SA_CLASSDIR)/sa.properties
  55   55  
  56   56  # if $(AGENT_DIR) does not exist, we don't build SA.
  57   57  all: 
  58   58          $(QUIETLY) if [ -d $(AGENT_DIR) ] ; then \
  59   59             $(MAKE) -f sa.make $(GENERATED)/sa-jdi.jar; \
  60   60          fi
  61   61  
  62      -$(GENERATED)/sa-jdi.jar: $(AGENT_FILES1) $(AGENT_FILES2) agent_files_preclean
       62 +$(GENERATED)/sa-jdi.jar: $(AGENT_FILES1) $(AGENT_FILES2)
  63   63          $(QUIETLY) echo "Making $@";
  64   64          $(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \
  65   65             echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \
  66   66             exit 1; \
  67   67          fi
  68   68          $(QUIETLY) if [ ! -f $(SA_CLASSPATH) -a ! -d $(MODULELIB_PATH) ] ; then \
  69   69            echo "Missing $(SA_CLASSPATH) file. Use 1.6.0 or later version of JDK";\
  70   70            echo ""; \
  71   71            exit 1; \
  72   72          fi
  73   73          $(QUIETLY) if [ ! -d $(SA_CLASSDIR) ] ; then \
  74   74            mkdir -p $(SA_CLASSDIR);        \
  75   75          fi
  76   76          
       77 +        # In some environments, cmd processors have limited line length.
       78 +        # To prevent the javac invocation in the next block from using
       79 +        # a very long cmd line, we use javac's @file-list option. We
       80 +        # generate the file lists using make's built-in 'foreach' control
       81 +        # flow which also avoids cmd processor line length issues. Since
       82 +        # the 'foreach' is done as part of make's macro expansion phase,
       83 +        # the initialization of the lists is also done in the same phase
       84 +        # using '$(shell rm ...' instead of using the more traditional
       85 +        # 'rm ...' rule.
       86 +        $(shell rm -rf $(AGENT_FILES1_LIST) $(AGENT_FILES2_LIST))
  77   87          $(foreach file,$(AGENT_FILES1),$(shell echo $(file) >> $(AGENT_FILES1_LIST)))
  78   88          $(foreach file,$(AGENT_FILES2),$(shell echo $(file) >> $(AGENT_FILES2_LIST)))
  79   89          
  80   90          $(QUIETLY) $(COMPILE.JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) @$(AGENT_FILES1_LIST)
  81   91          $(QUIETLY) $(COMPILE.JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) @$(AGENT_FILES2_LIST)
  82   92          
  83   93          $(QUIETLY) $(COMPILE.RMIC)  -classpath $(SA_CLASSDIR) -d $(SA_CLASSDIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
  84   94          $(QUIETLY) echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES)
  85   95          $(QUIETLY) rm -f $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql/sa.js
  86   96          $(QUIETLY) cp $(AGENT_SRC_DIR)/sun/jvm/hotspot/utilities/soql/sa.js $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql
  87   97          $(QUIETLY) mkdir -p $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources
  88   98          $(QUIETLY) rm -f $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources/*
  89   99          $(QUIETLY) cp $(AGENT_SRC_DIR)/sun/jvm/hotspot/ui/resources/*.png $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources/
  90  100          $(QUIETLY) cp -r $(AGENT_SRC_DIR)/images/* $(SA_CLASSDIR)/
  91  101          $(QUIETLY) $(RUN.JAR) cf $@ -C $(SA_CLASSDIR)/ .
  92  102          $(QUIETLY) $(RUN.JAR) uf $@ -C $(AGENT_SRC_DIR) META-INF/services/com.sun.jdi.connect.Connector
  93  103          $(QUIETLY) $(RUN.JAVAH) -classpath $(SA_CLASSDIR) -d $(GENERATED) -jni sun.jvm.hotspot.debugger.proc.ProcDebuggerLocal
  94  104  
  95      -agent_files_preclean:
  96      -        rm -rf $(AGENT_FILES1_LIST) $(AGENT_FILES2_LIST)
  97      -
  98  105  clean:
  99  106          rm -rf $(SA_CLASSDIR)
 100  107          rm -rf $(GENERATED)/sa-jdi.jar
 101  108          rm -rf $(AGENT_FILES1_LIST) $(AGENT_FILES2_LIST)
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX