[med-svn] [vista] 01/01: Added make rule to compile .m into .o files.
Luis Ibanez
luisibanez-guest at moszumanska.debian.org
Mon Jan 20 01:04:55 UTC 2014
This is an automated email from the git hooks/post-receive script.
luisibanez-guest pushed a commit to branch master
in repository vista.
commit b1ea3a1921040beeb9f62189e04ac92165e66b82
Author: Luis Ibanez <luis.ibanez at kitware.com>
Date: Sun Jan 19 17:39:31 2014 -0500
Added make rule to compile .m into .o files.
Once the .m routines are installed, we compile them all into the VistA instance
/o directory, using a make rule. This new rule invokes the mumps compiler with
the environment variable gtm_destdir set to remove the prefix of the local
debian build directory. In this way, the resulting .o files can be relocated to
their final destination in the destdir/o instance directory, and yet the $TEXT
function will be able to locate the source code of the routines.
---
debian/changelog | 1 +
debian/rules | 40 +++++++++++++++++++++++++++++++++++++++-
2 files changed, 40 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index e061162..6be36e6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -22,5 +22,6 @@ vista-foia (0.20140106-1) UNRELEASED; urgency=low
* In control, added xinetd and ssh as dependencies.
* In rules, removing .pyc files in clean: target.
* Started adding deployment scripts to create instances.
+ * In rules, added make rule for compiling VistA .m routines into .o files.
-- Luis Ibanez <luis.ibanez at kitware.com> Wed, 4 Jul 2012 17:16:45 -0500
diff --git a/debian/rules b/debian/rules
index af54dc8..4229c89 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,7 +8,8 @@
ARCH=$(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
UAPIVER=6.0-003
UAPIDIR=V$(UAPIVER)_$(ARCH)
-VISTAINSTANCEDIR=$(PWD)/debian/usr/share/vista-foia
+LOCALINSTANCEDIR=$(PWD)/debian
+VISTAINSTANCEDIR=$(LOCALINSTANCEDIR)/usr/share/vista-foia
GTM_INSTALL_DIR=/usr/lib/fis-gtm/$(UAPIDIR)
VISTA_GLOBALS_DIR=$(VISTAINSTANCEDIR)/g
VISTA_ROUTINES_DIR=$(VISTAINSTANCEDIR)/r
@@ -25,6 +26,43 @@ VISTA_TESTING_SOURCE_DIR=$(PWD)
%:
dh $@
+
+#
+# Bring in the full list of VistA M routines
+# and place them in the vista_m_sources variable
+#
+include debian/vista_m_routines_list
+
+#
+# Define the default paths for finding .m files and .o files
+#
+vpath %.m $(VISTA_ROUTINES_DIR)
+vpath %.o $(VISTA_OBJECTS_DIR)
+
+#
+# Implicit rule to compile MUMPS files into object files
+#
+# http://tinco.pair.com/bhaskar/gtm/doc/books/pg/UNIX_manual/ch03s05.html#Compile_from_Shell
+#
+%.o : %.m
+ echo $< -o $(VISTA_OBJECTS_DIR)/$(@F)
+ (export gtmgbldir=$(VISTA_GTM_DATABASE); \
+export gtmroutines=$(VISTA_GTM_ROUTINES); \
+export gtm_dist=$(GTM_INSTALL_DIR); \
+export gtm_destdir=$(LOCALINSTANCEDIR); \
+$(GTM_INSTALL_DIR)/mumps -object=$(VISTA_OBJECTS_DIR)/$(@F) $< )
+
+vista_m_sources := $(patsubst %.m,$(VISTA_ROUTINES_DIR)/%.m,$(vista_m_sources_files))
+vista_o_objects_files := $(patsubst %.m,%.o,$(vista_m_sources_files))
+
+#
+# This list of dependencies will invoke the implicit rule for .m -> .o
+#
+compile_vista_routines: $(vista_o_objects_files)
+ echo "Compiling all M routines"
+
+
+
override_dh_auto_configure:
(export gtmgbldir=$(VISTA_GTM_DATABASE); export gtmroutines=$(VISTA_GTM_ROUTINES); export gtm_dist=$(GTM_INSTALL_DIR); \
cd $(VISTA_TESTING_BINARY_DIR); \
--
Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/vista.git
More information about the debian-med-commit
mailing list