diff --git a/configure/RULES_BUILD b/configure/RULES_BUILD index 55b6101..a3c3636 100644 --- a/configure/RULES_BUILD +++ b/configure/RULES_BUILD @@ -8,6 +8,11 @@ ifdef IOCADMIN INSTALL_IOCRELEASE_DBS=$(IOCRELEASE_DB:%=$(INSTALL_DB)/%) +PYTHON=$(shell which python2) +ifneq ("python2","$(notdir $(PYTHON))") + PYTHON=python +endif + #-------------------------------------------------- # Rules @@ -15,9 +20,9 @@ build : $(IOCRELEASE_DB) buildInstall : $(INSTALL_IOCRELEASE_DBS) # Create database for module version PVs -$(IOCRELEASE_DB) : $(TOP)/configure/RELEASE $(TOP)/RELEASE_SITE +$(IOCRELEASE_DB) : $(TOP)/configure/RELEASE $(RM) $@ - python2 $(IOCADMIN)/iocAdmin/src/iocReleaseCreateDb.py $^ >$@ + $(PYTHON) $(IOCADMIN)/bin/$(EPICS_HOST_ARCH)/iocReleaseCreateDb.py $^ > $@ $(INSTALL_DB)/%: % @echo "Installing db file $@" diff --git a/iocAdmin/src/Makefile b/iocAdmin/src/Makefile index d59b9c4..0b8a1b7 100644 --- a/iocAdmin/src/Makefile +++ b/iocAdmin/src/Makefile @@ -13,6 +13,10 @@ DBD += iocAdmin.dbd #============================= +SCRIPTS_HOST += iocReleaseCreateDb.py +SCRIPTS_HOST += pkgNamesToMacroNames.py +SCRIPTS_HOST += version_utils.py + #LIBRARY = iocAdmin #iocAdmin_LIBS = $(EPICS_BASE_IOC_LIBS) diff --git a/iocAdmin/src/iocReleaseCreateDb.py b/iocAdmin/src/iocReleaseCreateDb.py index df8efc0..4fe750d 100755 --- a/iocAdmin/src/iocReleaseCreateDb.py +++ b/iocAdmin/src/iocReleaseCreateDb.py @@ -76,8 +76,7 @@ def process_options(argv): if argv is None: argv = sys.argv[1:] - # usage = 'Usage: %prog RELEASE_FILE [options]' - usage = 'Usage: %prog RELEASE_FILE RELEASE_SITE_FILE [options]' + usage = 'Usage: %prog RELEASE_FILE [options]' version = '%prog 0.2' parser = optparse.OptionParser(usage=usage, version=version) @@ -89,11 +88,10 @@ def process_options(argv): (options, args) = parser.parse_args(argv) - if len(args) != 2: + if len(args) != 1: parser.error("incorrect number of arguments") options.release_file_path = os.path.normcase(args[0]) - options.release_site_file_path = os.path.normcase(args[1]) return options @@ -101,7 +99,7 @@ def main(argv=None): options = process_options(argv) # get the IOC dependents - topDir = os.path.abspath( os.path.dirname(options.release_site_file_path) ) + topDir = os.path.abspath( os.path.dirname( os.path.dirname(options.release_file_path) ) ) dependents = getEpicsPkgDependents( topDir ) # export the iocRelease.db file