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 +        # The file lists are generated when make does variable expansion
       78 +        # in preparation for executing the rules for this target; javac
       79 +        # uses the file lists in the next block during rule execution.
       80 +        $(shell rm -rf $(AGENT_FILES1_LIST) $(AGENT_FILES2_LIST))
  77   81          $(foreach file,$(AGENT_FILES1),$(shell echo $(file) >> $(AGENT_FILES1_LIST)))
  78   82          $(foreach file,$(AGENT_FILES2),$(shell echo $(file) >> $(AGENT_FILES2_LIST)))
  79   83          
  80   84          $(QUIETLY) $(COMPILE.JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) @$(AGENT_FILES1_LIST)
  81   85          $(QUIETLY) $(COMPILE.JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) @$(AGENT_FILES2_LIST)
  82   86          
  83   87          $(QUIETLY) $(COMPILE.RMIC)  -classpath $(SA_CLASSDIR) -d $(SA_CLASSDIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
  84   88          $(QUIETLY) echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES)
  85   89          $(QUIETLY) rm -f $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql/sa.js
  86   90          $(QUIETLY) cp $(AGENT_SRC_DIR)/sun/jvm/hotspot/utilities/soql/sa.js $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql
  87   91          $(QUIETLY) mkdir -p $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources
  88   92          $(QUIETLY) rm -f $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources/*
  89   93          $(QUIETLY) cp $(AGENT_SRC_DIR)/sun/jvm/hotspot/ui/resources/*.png $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources/
  90   94          $(QUIETLY) cp -r $(AGENT_SRC_DIR)/images/* $(SA_CLASSDIR)/
  91   95          $(QUIETLY) $(RUN.JAR) cf $@ -C $(SA_CLASSDIR)/ .
  92   96          $(QUIETLY) $(RUN.JAR) uf $@ -C $(AGENT_SRC_DIR) META-INF/services/com.sun.jdi.connect.Connector
  93   97          $(QUIETLY) $(RUN.JAVAH) -classpath $(SA_CLASSDIR) -d $(GENERATED) -jni sun.jvm.hotspot.debugger.proc.ProcDebuggerLocal
  94   98  
  95      -agent_files_preclean:
  96      -        rm -rf $(AGENT_FILES1_LIST) $(AGENT_FILES2_LIST)
  97      -
  98   99  clean:
  99  100          rm -rf $(SA_CLASSDIR)
 100  101          rm -rf $(GENERATED)/sa-jdi.jar
 101  102          rm -rf $(AGENT_FILES1_LIST) $(AGENT_FILES2_LIST)
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX