< prev index next >

make/linux/makefiles/sa.make

Print this page
rev 8551 : 8078521: AARCH64: Add AArch64 SA support
Summary: Add AArch64 SA support


  45 
  46 # tools.jar is needed by the JDI - SA binding
  47 SA_CLASSPATH = $(BOOT_JAVA_HOME)/lib/tools.jar
  48 
  49 # TODO: if it's a modules image, check if SA module is installed.
  50 MODULELIB_PATH= $(BOOT_JAVA_HOME)/lib/modules
  51 
  52 AGENT_FILES_LIST := $(GENERATED)/agent.classes.list
  53 
  54 SA_CLASSDIR = $(GENERATED)/saclasses
  55 
  56 SA_BUILD_VERSION_PROP = "sun.jvm.hotspot.runtime.VM.saBuildVersion=$(SA_BUILD_VERSION)"
  57 
  58 SA_PROPERTIES = $(SA_CLASSDIR)/sa.properties
  59 
  60 # if $(AGENT_DIR) does not exist, we don't build SA
  61 # also, we don't build SA on Itanium or zero.
  62 
  63 all: 
  64         if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" \
  65              -a "$(SRCARCH)" != "zero" \
  66              -a "$(SRCARCH)" != "aarch64" ] ; then \
  67            $(MAKE) -f sa.make $(GENERATED)/sa-jdi.jar; \
  68         fi
  69 
  70 $(GENERATED)/sa-jdi.jar:: $(AGENT_FILES)
  71         $(QUIETLY) echo "Making $@"
  72         $(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \
  73           echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \
  74           exit 1; \
  75         fi
  76         $(QUIETLY) if [ ! -f $(SA_CLASSPATH) -a ! -d $(MODULELIB_PATH) ] ; then \
  77           echo "Missing $(SA_CLASSPATH) file. Use 1.6.0 or later version of JDK";\
  78           echo ""; \
  79           exit 1; \
  80         fi
  81         $(QUIETLY) if [ ! -d $(SA_CLASSDIR) ] ; then \
  82           mkdir -p $(SA_CLASSDIR);        \
  83         fi
  84 # Note: When indented, make tries to execute the '$(shell' comment.
  85 # In some environments, cmd processors have limited line length.
  86 # To prevent the javac invocation in the next block from using


  92 # using '$(shell rm ...' instead of using the more traditional
  93 # 'rm ...' rule.
  94         $(shell rm -rf $(AGENT_FILES_LIST))
  95 # gnumake 3.78.1 does not accept the *'s that
  96 # are in AGENT_FILES, so use the shell to expand them.
  97 # Be extra carefull to not produce too long command lines in the shell!
  98         $(foreach file,$(AGENT_FILES),$(shell ls -1 $(file) >> $(AGENT_FILES_LIST)))
  99         $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) @$(AGENT_FILES_LIST)
 100         $(QUIETLY) $(REMOTE) $(COMPILE.RMIC)  -classpath $(SA_CLASSDIR) -d $(SA_CLASSDIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
 101         $(QUIETLY) echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES)
 102         $(QUIETLY) rm -f $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql/sa.js
 103         $(QUIETLY) cp $(AGENT_SRC_DIR)/sun/jvm/hotspot/utilities/soql/sa.js $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql
 104         $(QUIETLY) mkdir -p $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources
 105         $(QUIETLY) rm -f $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources/*
 106         $(QUIETLY) cp $(AGENT_SRC_DIR)/sun/jvm/hotspot/ui/resources/*.png $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources/
 107         $(QUIETLY) cp -r $(AGENT_SRC_DIR)/images/* $(SA_CLASSDIR)/
 108         $(QUIETLY) $(REMOTE) $(RUN.JAR) cf $@ -C $(SA_CLASSDIR)/ .
 109         $(QUIETLY) $(REMOTE) $(RUN.JAR) uf $@ -C $(AGENT_SRC_DIR) META-INF/services/com.sun.jdi.connect.Connector
 110         $(QUIETLY) $(REMOTE) $(RUN.JAVAH) -classpath $(SA_CLASSDIR) -d $(GENERATED) -jni sun.jvm.hotspot.debugger.x86.X86ThreadContext
 111         $(QUIETLY) $(REMOTE) $(RUN.JAVAH) -classpath $(SA_CLASSDIR) -d $(GENERATED) -jni sun.jvm.hotspot.debugger.amd64.AMD64ThreadContext

 112         $(QUIETLY) $(REMOTE) $(RUN.JAVAH) -classpath $(SA_CLASSDIR) -d $(GENERATED) -jni sun.jvm.hotspot.debugger.sparc.SPARCThreadContext
 113         $(QUIETLY) $(REMOTE) $(RUN.JAVAH) -classpath $(SA_CLASSDIR) -d $(GENERATED) -jni sun.jvm.hotspot.asm.Disassembler
 114 
 115 clean:
 116         rm -rf $(SA_CLASSDIR)
 117         rm -rf $(GENERATED)/sa-jdi.jar
 118         rm -rf $(AGENT_FILES_LIST)
 119 
 120 -include $(HS_ALT_MAKE)/linux/makefiles/sa-rules.make


  45 
  46 # tools.jar is needed by the JDI - SA binding
  47 SA_CLASSPATH = $(BOOT_JAVA_HOME)/lib/tools.jar
  48 
  49 # TODO: if it's a modules image, check if SA module is installed.
  50 MODULELIB_PATH= $(BOOT_JAVA_HOME)/lib/modules
  51 
  52 AGENT_FILES_LIST := $(GENERATED)/agent.classes.list
  53 
  54 SA_CLASSDIR = $(GENERATED)/saclasses
  55 
  56 SA_BUILD_VERSION_PROP = "sun.jvm.hotspot.runtime.VM.saBuildVersion=$(SA_BUILD_VERSION)"
  57 
  58 SA_PROPERTIES = $(SA_CLASSDIR)/sa.properties
  59 
  60 # if $(AGENT_DIR) does not exist, we don't build SA
  61 # also, we don't build SA on Itanium or zero.
  62 
  63 all: 
  64         if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" \
  65              -a "$(SRCARCH)" != "zero" ] ; then \

  66            $(MAKE) -f sa.make $(GENERATED)/sa-jdi.jar; \
  67         fi
  68 
  69 $(GENERATED)/sa-jdi.jar:: $(AGENT_FILES)
  70         $(QUIETLY) echo "Making $@"
  71         $(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \
  72           echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \
  73           exit 1; \
  74         fi
  75         $(QUIETLY) if [ ! -f $(SA_CLASSPATH) -a ! -d $(MODULELIB_PATH) ] ; then \
  76           echo "Missing $(SA_CLASSPATH) file. Use 1.6.0 or later version of JDK";\
  77           echo ""; \
  78           exit 1; \
  79         fi
  80         $(QUIETLY) if [ ! -d $(SA_CLASSDIR) ] ; then \
  81           mkdir -p $(SA_CLASSDIR);        \
  82         fi
  83 # Note: When indented, make tries to execute the '$(shell' comment.
  84 # In some environments, cmd processors have limited line length.
  85 # To prevent the javac invocation in the next block from using


  91 # using '$(shell rm ...' instead of using the more traditional
  92 # 'rm ...' rule.
  93         $(shell rm -rf $(AGENT_FILES_LIST))
  94 # gnumake 3.78.1 does not accept the *'s that
  95 # are in AGENT_FILES, so use the shell to expand them.
  96 # Be extra carefull to not produce too long command lines in the shell!
  97         $(foreach file,$(AGENT_FILES),$(shell ls -1 $(file) >> $(AGENT_FILES_LIST)))
  98         $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) @$(AGENT_FILES_LIST)
  99         $(QUIETLY) $(REMOTE) $(COMPILE.RMIC)  -classpath $(SA_CLASSDIR) -d $(SA_CLASSDIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
 100         $(QUIETLY) echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES)
 101         $(QUIETLY) rm -f $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql/sa.js
 102         $(QUIETLY) cp $(AGENT_SRC_DIR)/sun/jvm/hotspot/utilities/soql/sa.js $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql
 103         $(QUIETLY) mkdir -p $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources
 104         $(QUIETLY) rm -f $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources/*
 105         $(QUIETLY) cp $(AGENT_SRC_DIR)/sun/jvm/hotspot/ui/resources/*.png $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources/
 106         $(QUIETLY) cp -r $(AGENT_SRC_DIR)/images/* $(SA_CLASSDIR)/
 107         $(QUIETLY) $(REMOTE) $(RUN.JAR) cf $@ -C $(SA_CLASSDIR)/ .
 108         $(QUIETLY) $(REMOTE) $(RUN.JAR) uf $@ -C $(AGENT_SRC_DIR) META-INF/services/com.sun.jdi.connect.Connector
 109         $(QUIETLY) $(REMOTE) $(RUN.JAVAH) -classpath $(SA_CLASSDIR) -d $(GENERATED) -jni sun.jvm.hotspot.debugger.x86.X86ThreadContext
 110         $(QUIETLY) $(REMOTE) $(RUN.JAVAH) -classpath $(SA_CLASSDIR) -d $(GENERATED) -jni sun.jvm.hotspot.debugger.amd64.AMD64ThreadContext
 111         $(QUIETLY) $(REMOTE) $(RUN.JAVAH) -classpath $(SA_CLASSDIR) -d $(GENERATED) -jni sun.jvm.hotspot.debugger.aarch64.AARCH64ThreadContext
 112         $(QUIETLY) $(REMOTE) $(RUN.JAVAH) -classpath $(SA_CLASSDIR) -d $(GENERATED) -jni sun.jvm.hotspot.debugger.sparc.SPARCThreadContext
 113         $(QUIETLY) $(REMOTE) $(RUN.JAVAH) -classpath $(SA_CLASSDIR) -d $(GENERATED) -jni sun.jvm.hotspot.asm.Disassembler
 114 
 115 clean:
 116         rm -rf $(SA_CLASSDIR)
 117         rm -rf $(GENERATED)/sa-jdi.jar
 118         rm -rf $(AGENT_FILES_LIST)
 119 
 120 -include $(HS_ALT_MAKE)/linux/makefiles/sa-rules.make
< prev index next >