< prev index next >
make/lib/JvmMapfile.gmk
Print this page
rev 11112 : 8148244: Finalize and integrate GTest implementation
Reviewed-by: jwilhelm, erikj
Contributed-by: stefan.karlsson@oracle.com, stefan.sarne@oracle.com, jesper.wilhelmsson@oracle.com, erik.helin@oracle.com, alexandre.iline@oracle.com, igor.ignatyev@oracle.com, erik.joelsson@oracle.com
@@ -151,22 +151,35 @@
$(SED) -e '/^#/d' $^ > $@
################################################################################
# Finally convert the symbol list into a platform-specific mapfile
-$(JVM_MAPFILE): $(JVM_OUTPUTDIR)/symbols
- $(call LogInfo, Creating mapfile)
- $(RM) $@
- ifeq ($(OPENJDK_TARGET_OS), macosx)
+ifeq ($(OPENJDK_TARGET_OS), macosx)
# On macosx, we need to add a leading underscore
+ define create-mapfile-work
$(AWK) '{ if ($$0 ~ ".") { print " _" $$0 } }' < $^ > $@.tmp
- else ifeq ($(OPENJDK_TARGET_OS), windows)
+ endef
+else ifeq ($(OPENJDK_TARGET_OS), windows)
# On windows, add an 'EXPORTS' header
+ define create-mapfile-work
$(ECHO) "EXPORTS" > $@.tmp
$(AWK) '{ if ($$0 ~ ".") { print " " $$0 } }' < $^ >> $@.tmp
- else
+ endef
+else
# Assume standard linker script
+ define create-mapfile-work
$(PRINTF) "SUNWprivate_1.1 { \n global: \n" > $@.tmp
$(AWK) '{ if ($$0 ~ ".") { print " " $$0 ";" } }' < $^ >> $@.tmp
$(PRINTF) " local: \n *; \n }; \n" >> $@.tmp
- endif
+ endef
+endif
+
+define create-mapfile
+ $(call LogInfo, Creating mapfile)
+ $(call MakeDir, $(@D))
+ $(call create-mapfile-work)
+ $(RM) $@
$(MV) $@.tmp $@
+endef
+
+$(JVM_MAPFILE): $(JVM_OUTPUTDIR)/symbols
+ $(call create-mapfile)
< prev index next >