From 02c57a1eced36193d6d98676dc31aabffa8e3f98 Mon Sep 17 00:00:00 2001
From: Atlas-Software Librarian <Atlas-Software.Librarian@cern.ch>
Date: Wed, 14 Dec 2011 13:22:37 +0100
Subject: [PATCH] cmt/fragments/merge_relax_map_header: Revisit so that merging
 be done on dsoMapFile update only (AtlasRELAX-00-01-00)

---
 .../AtlasRELAX/cmt/fragments/merge_relax_map  |  0
 .../cmt/fragments/merge_relax_map_header      | 42 +++++++++++++++++++
 External/AtlasRELAX/cmt/requirements          | 17 ++++++++
 3 files changed, 59 insertions(+)
 create mode 100755 External/AtlasRELAX/cmt/fragments/merge_relax_map
 create mode 100755 External/AtlasRELAX/cmt/fragments/merge_relax_map_header
 create mode 100755 External/AtlasRELAX/cmt/requirements

diff --git a/External/AtlasRELAX/cmt/fragments/merge_relax_map b/External/AtlasRELAX/cmt/fragments/merge_relax_map
new file mode 100755
index 00000000000..e69de29bb2d
diff --git a/External/AtlasRELAX/cmt/fragments/merge_relax_map_header b/External/AtlasRELAX/cmt/fragments/merge_relax_map_header
new file mode 100755
index 00000000000..8bc1e4feb96
--- /dev/null
+++ b/External/AtlasRELAX/cmt/fragments/merge_relax_map_header
@@ -0,0 +1,42 @@
+# File: cmt/fragments/merge_relax_map_header
+# Author: Sebastien Binet (binet@cern.ch)
+# $Id: merge_relax_map_header,v 1.4 2008-08-14 14:10:34 schaffer Exp $
+
+#
+#  Makefile fragment to merge a <package>Dict.dsomap file into 
+#  a single <project>Dict.rootmap file in the install area
+#
+
+#dsoMapFile    := ${dict_dir}/${dictionary}/${dictionary}Dict.dsomap
+dsoMapFile    := ${dso_map_file}
+#dsoMapStamp   := ${CONSTITUENT}.stamp
+dsoMapStamp   := $(bin)/${CONSTITUENT}.stamp
+mergedDictMapdir := ${CMTINSTALLAREA}/$(tag)/lib
+mergedDictMap := ${CMTINSTALLAREA}/$(tag)/lib/$(project)Dict.rootmap
+
+# drive the running of this fragment off of a <package>Dict.dsomap.stamp file
+#${CONSTITUENT} ::  $(dsoMapStamp) $(mergedDictMap)
+${CONSTITUENT} :: $(dsoMapStamp) ;
+
+#$(mergedDictMap) : ${CMTINSTALLAREA}/$(tag)/lib
+#	touch $(mergedDictMap)
+
+$(dsoMapFile) :
+	touch $(dsoMapFile)
+
+#ifeq ($(MAKE_VERSION),3.79.1)          # slc3
+#$(dsoMapStamp)   : $(dsoMapFile) $(mergedDictMap)
+#else
+#$(dsoMapStamp)   : $(mergedDictMap) | $(dsoMapFile)
+#endif
+$(dsoMapStamp) : $(dsoMapFile)
+	@echo "Running merge_relax_map  ${CONSTITUENT}. File: ${dsoMapFile} Map: ${mergedDictMap}"
+	@-[ -d $(mergedDictMapdir) ] || mkdir -p $(mergedDictMapdir)
+	@touch $(mergedDictMap)
+	$(silent)$(merge_dict_rootmap_cmd) $(dsoMapFile) $(mergedDictMap)
+	@echo "	sed -e "s/$(dso_lib_name)$$/$(dso_lib_name)\.so/g" $(mergedDictMap) "
+	@-[ -d $(bin) ] || mkdir -p $(bin)
+	$(silent)touch $(dsoMapStamp)
+
+${CONSTITUENT}clean ::
+	$(cleanup_silent) $(uninstall_command) $(dsoMapStamp)
diff --git a/External/AtlasRELAX/cmt/requirements b/External/AtlasRELAX/cmt/requirements
new file mode 100755
index 00000000000..d66345312f5
--- /dev/null
+++ b/External/AtlasRELAX/cmt/requirements
@@ -0,0 +1,17 @@
+package AtlasRELAX
+
+author RD Schaffer <R.D.Schaffer@cern.ch>
+
+use ExternalPolicy ExternalPolicy-* External
+use RELAX          v*               LCG_Interfaces
+
+make_fragment merge_relax_map -header=merge_relax_map_header
+
+private
+ 
+ macro merge_dict_rootmap_cmd '${GaudiPolicy_root}/scripts/merge_files.py --stamp-dir $(bin) '
+ document merge_relax_map STLRflxMergeRelaxMap    dso_map_file=$(RELAX_home)/lib/libSTLRflx.pamtoor
+ document merge_relax_map STLAddRflxMergeRelaxMap dso_map_file=$(RELAX_home)/lib/libSTLAddRflx.pamtoor
+ macro_append STLAddRflxMergeRelaxMap_dependencies " STLRflxMergeRelaxMap "
+
+end_private
-- 
GitLab