forked from epics_driver_modules/motorBase
R3.14.x conversion from config to configure
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
#CONFIG
|
||||
# Add any changes to make rules here
|
||||
# CROSS_COMPILER_TARGET_ARCHS = mv167
|
||||
@@ -1,20 +0,0 @@
|
||||
#CONFIG_APP
|
||||
include $(TOP)/config/RELEASE
|
||||
-include $(TOP)/config/RELEASE.$(HOST_ARCH)
|
||||
include $(EPICS_BASE)/config/CONFIG
|
||||
INSTALL_LOCATION = $(TOP)
|
||||
ifdef INSTALL_LOCATION_APP
|
||||
INSTALL_LOCATION = $(INSTALL_LOCATION_APP)
|
||||
endif
|
||||
|
||||
ifdef T_A
|
||||
-include $(TOP)/config/O.$(T_A)/CONFIG_APP_INCLUDE
|
||||
endif
|
||||
|
||||
# Where to install databases
|
||||
INSTALL_DB = $(INSTALL_LOCATION)/db
|
||||
# dbst based database optimization (default: NO)
|
||||
DB_OPT = NO
|
||||
# May be overridden if not all databases should be installed
|
||||
INSTALLDB = $(DB)
|
||||
include $(TOP)/config/CONFIG
|
||||
@@ -1,9 +0,0 @@
|
||||
#
|
||||
# $Id: Makefile,v 1.1 2000-02-08 22:17:42 sluiter Exp $
|
||||
#
|
||||
|
||||
TOP=..
|
||||
include $(TOP)/config/CONFIG_APP
|
||||
|
||||
include $(TOP)/config/RULES_ARCHS
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
#
|
||||
# $Id: Makefile.Host,v 1.1 2000-02-08 22:17:42 sluiter Exp $
|
||||
#
|
||||
|
||||
TOP=../..
|
||||
include $(TOP)/config/CONFIG_APP
|
||||
|
||||
TARGETS = CONFIG_APP_INCLUDE
|
||||
|
||||
include $(TOP)/config/RULES.Host
|
||||
|
||||
inc:: $(TARGETS)
|
||||
|
||||
ifeq ($(wildcard $(TOP)/config/RELEASE.$(HOST_ARCH)),$(TOP)/config/RELEASE.$(HOST_ARCH))
|
||||
CONFIG_APP_INCLUDE: $(TOP)/config/RELEASE.$(HOST_ARCH)
|
||||
endif
|
||||
|
||||
CONFIG_APP_INCLUDE: $(TOP)/config/RELEASE $(TOP)/config/CONFIG_APP
|
||||
$(RM) $@
|
||||
@$(PERL) $(TOP)/config/makeConfigAppInclude.pl $(T_A) $@ $(TOP)
|
||||
@@ -1,20 +0,0 @@
|
||||
#
|
||||
# $Id: Makefile.Vx,v 1.1 2000-02-08 22:17:43 sluiter Exp $
|
||||
#
|
||||
|
||||
TOP=../..
|
||||
include $(TOP)/config/CONFIG_APP
|
||||
|
||||
TARGETS = CONFIG_APP_INCLUDE
|
||||
|
||||
include $(TOP)/config/RULES.Vx
|
||||
|
||||
inc:: $(TARGETS)
|
||||
|
||||
ifeq ($(wildcard $(TOP)/config/RELEASE.$(HOST_ARCH)),$(TOP)/config/RELEASE.$(HOST_ARCH))
|
||||
CONFIG_APP_INCLUDE: $(TOP)/config/RELEASE.$(HOST_ARCH)
|
||||
endif
|
||||
|
||||
CONFIG_APP_INCLUDE: $(TOP)/config/RELEASE $(TOP)/config/CONFIG_APP
|
||||
$(RM) $@
|
||||
@$(PERL) $(TOP)/config/makeConfigAppInclude.pl $(T_A) $@ $(TOP)
|
||||
@@ -1,39 +0,0 @@
|
||||
# RELEASE - Location of external products
|
||||
#
|
||||
# (Architecture dependent declarations should go into RELEASE.<arch>)
|
||||
#
|
||||
# Note: This file will be scanned to automatically generate
|
||||
# include path definitions etc.
|
||||
# The order of the following declarations will be retained
|
||||
# within those definitions.
|
||||
#
|
||||
# Add your declarations here
|
||||
|
||||
#SUPPORT=
|
||||
|
||||
# Define the following if MPF is defined (i.e., if either serial
|
||||
# or GPIB motor controller support is required).
|
||||
#MPF_SERIAL=$(SUPPORT)/mpfSerial/mpfSerial1-3
|
||||
include $(TOP)/../config/MPFSERIAL_RELEASE
|
||||
|
||||
# If the EPICS GPIB Module from Benjamin Franksen is used, then remove the '#'
|
||||
# from the following and modify the motorApp/CommSrc/Makefile.Vx file per
|
||||
# instructions found there. If GPIB driver support is from EPICS base, then
|
||||
# leave this line commented out.
|
||||
#GPIB=$(SUPPORT)/gpib
|
||||
|
||||
# If any motor controller communication mechanism besides the VME backplane is
|
||||
# required, then MPF must be defined.
|
||||
#MPF=$(SUPPORT)/mpf/mpf1-8
|
||||
include $(TOP)/../config/MPF_RELEASE
|
||||
|
||||
#EPICS_BASE=$(SUPPORT)/base/3-13-5
|
||||
include $(TOP)/../config/RELEASE
|
||||
|
||||
# The following must be defined if motorExApp is to be built.
|
||||
#TEMPLATE_TOP=$(EPICS_BASE)/templates/makeBaseApp/top
|
||||
#MSITOP=/usr/local/epics/extensions
|
||||
|
||||
# The following must be defined if the "WithMPF" example in motorExApp is to
|
||||
# be built.
|
||||
#MPF_GPIB=$(SUPPORT)/mpfGpib/mpfGpib1-4
|
||||
-202
@@ -1,202 +0,0 @@
|
||||
# RULES.Db,v 1.9.6.4 2001/08/20 16:36:50 jba Exp
|
||||
#
|
||||
# Rules for making things related to databases
|
||||
#
|
||||
MAKEBPT = $(EPICS_BASE_HOST_BIN)/makeBpt$(EXE)
|
||||
DBLOADTEMPLATE = $(EPICS_BASE_HOST_BIN)/dbLoadTemplate$(EXE)
|
||||
DBEXPAND = $(EPICS_BASE_HOST_BIN)/dbExpand$(EXE)
|
||||
DBST = dbst
|
||||
MAKEDBDEPENDS = $(PERL) $(TOP)/config/makeDbDepends.pl
|
||||
REPLACEVAR = $(PERL) $(TOP)/config/replaceVAR.pl
|
||||
ifndef WIN32
|
||||
TOUCH = touch
|
||||
else
|
||||
TOUCH = type NUL >>
|
||||
endif
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
# if we are not building base add base dbd dirs
|
||||
|
||||
ifneq ($(EPICS_BASE),$(TOP))
|
||||
ifneq ($(EPICS_BASE),$(INSTALL_LOCATION))
|
||||
EPICS_DBDFLAGS += -I $(EPICS_BASE)/dbd
|
||||
endif
|
||||
endif
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# ----------------------------------------------------
|
||||
# create names (lists) for installed things
|
||||
# ----------------------------------------------------
|
||||
|
||||
INSTALL_BPTS = $(BPTS:%= $(INSTALL_DBD)/%)
|
||||
INSTALL_DBDS = $(DBDINSTALL:%= $(INSTALL_DBD)/%)
|
||||
INSTALL_DBDNAME = $(DBDNAME:%= $(INSTALL_DBD)/%)
|
||||
INSTALL_DATA = $(INSTALLDB:%=$(INSTALL_DB)/%)
|
||||
INSTALL_TEMPLATES = $(filter %.template,$(INSTALL_DATA))
|
||||
|
||||
#---------------------------------------------------------------
|
||||
# Main targets
|
||||
|
||||
all:: install
|
||||
|
||||
inc:: $(INSTALL_DBDS) $(INSTALL_BPTS) $(INSTALL_TEMPLATES)
|
||||
|
||||
rebuild:: clean install
|
||||
|
||||
install:: inc buildInstall
|
||||
|
||||
buildInstall:: build $(INSTALL_DATA)
|
||||
|
||||
depends::
|
||||
|
||||
clean::
|
||||
@echo "Cleaning"
|
||||
@$(RM) $(DB) $(DBDNAME) *.template *.substitutions *.db.raw \
|
||||
*.db-stamp *.edf esiread.cnf
|
||||
|
||||
##################################################### "Foreign" templates
|
||||
|
||||
TEMPLATE_LINKS = $(filter-out $(notdir $(USES_TEMPLATE)), $(USES_TEMPLATE))
|
||||
TEMPLATE_FILES = $(filter $(notdir $(USES_TEMPLATE)), $(USES_TEMPLATE))
|
||||
DB_STAMP = $(patsubst %.db, %.db-stamp, $(DB))
|
||||
DB_REALTARGET = $(patsubst %.db-stamp, %.db, $@)
|
||||
|
||||
ifneq '$(TEMPLATE_LINKS)' ''
|
||||
build:: $(notdir $(TEMPLATE_LINKS))
|
||||
endif
|
||||
build:: $(INSTALL_DBDNAME) $(TEMPLATE_FILES) $(DB_STAMP)
|
||||
|
||||
$(notdir $(TEMPLATE_LINKS)): %.template:
|
||||
ifndef WIN32
|
||||
@$(RM) $(notdir $(TEMPLATE_LINKS))
|
||||
ln -s $(TEMPLATE_LINKS) .
|
||||
# Workaround for dbLoadTemplate bug: terminate here if link target doesn't exist
|
||||
@cat $(TEMPLATE_LINKS) > /dev/null
|
||||
else
|
||||
@$(RM) $(notdir $(TEMPLATE_LINKS))
|
||||
$(CP) $(TEMPLATE_LINKS) .
|
||||
endif
|
||||
|
||||
##################################################### Inflated or plain databases
|
||||
|
||||
$(INSTALL_DB)/%.db: %.db-stamp
|
||||
@echo "Installing database $@"
|
||||
@$(INSTALL) -d -m 644 $(patsubst %.db-stamp, %.db, $<) $(@D)
|
||||
|
||||
# Must have DBDNAME defined to use dbst optimization
|
||||
ifndef DBDNAME
|
||||
DB_OPT = NO
|
||||
endif
|
||||
|
||||
# dbst based database optimization
|
||||
ifeq '$(DB_OPT)' 'YES'
|
||||
.PRECIOUS: %.db.raw
|
||||
%.db-stamp: %.db.raw $(INSTALL_DBD)/$(DBDNAME)
|
||||
@echo "Optimizing database $@"
|
||||
$(DBST) $(INSTALL_DBD)/$(DBDNAME) $< -d > $(DB_REALTARGET)
|
||||
@$(TOUCH) $@
|
||||
%.db-stamp: %.t.db.raw $(INSTALL_DBD)/$(DBDNAME)
|
||||
@echo "Optimizing database $@"
|
||||
$(DBST) $(INSTALL_DBD)/$(DBDNAME) $< -d > $(DB_REALTARGET)
|
||||
@$(TOUCH) $@
|
||||
else
|
||||
# NO optimization => move it and keep a stamp
|
||||
%.db-stamp: %.db.raw
|
||||
@$(MV) $< $(DB_REALTARGET)
|
||||
@$(TOUCH) $@
|
||||
@$(TOUCH) $<
|
||||
%.db-stamp: %.t.db.raw
|
||||
@$(MV) $< $(DB_REALTARGET)
|
||||
@$(TOUCH) $@
|
||||
@$(TOUCH) $<
|
||||
endif
|
||||
|
||||
%.t.db.raw: %.substitutions
|
||||
@echo "Inflating database from $<"
|
||||
@$(RM) $@
|
||||
@$(DBLOADTEMPLATE) $< > $@
|
||||
|
||||
##################################################### CapFast filter
|
||||
|
||||
%.edf:: ../%.sch $(DEPSCHS)
|
||||
@if [ ! -f cad.rc -a -r ../cad.rc ] ; then ln -s ../cad.rc ; fi
|
||||
$(SCH2EDIF) $(SCH2EDIF_SYSFLAGS) $(SCH2EDIF_FLAGS) $<
|
||||
|
||||
##################################################### Substitution files
|
||||
|
||||
$(INSTALL_DB)/%.substitutions: %.substitutions
|
||||
@echo "Installing $@"
|
||||
@$(INSTALL) -d -m 644 $(@F) $(@D)
|
||||
|
||||
%.substitutions:: ../%.substitutions
|
||||
@$(CP) $< $@
|
||||
|
||||
ifdef CREATESUBSTITUTIONS
|
||||
%.substitutions:: $(word $(words $(CREATESUBSTITUTIONS)),$(CREATESUBSTITUTIONS))
|
||||
@$(CREATESUBSTITUTIONS) $*
|
||||
endif
|
||||
|
||||
# Better make it PRECIOUS (to get around make bug)
|
||||
.PRECIOUS: %.substitutions
|
||||
|
||||
##################################################### Template databases
|
||||
|
||||
# Installed template files (dbLoadTemplate() on IOC side)
|
||||
$(INSTALL_DB)/%.template: %.template
|
||||
@echo "Installing $@"
|
||||
@$(INSTALL) -d -m 644 $(@F) $(@D)
|
||||
|
||||
%.template:: ../%.template
|
||||
@$(CP) $< $@
|
||||
|
||||
%.template: %.edf
|
||||
$(E2DB) $(E2DB_SYSFLAGS) $(E2DB_FLAGS) -n $@.VAR $<
|
||||
@$(REPLACEVAR) < $@.VAR > $@
|
||||
@$(RM) $@.VAR
|
||||
|
||||
##################################################### Flat databases
|
||||
|
||||
%.db.raw:: ../%.db
|
||||
$(CP) $< $@
|
||||
|
||||
%.db.raw: %.edf
|
||||
$(E2DB) $(E2DB_SYSFLAGS) $(E2DB_FLAGS) -n $@.VAR $<
|
||||
@$(REPLACEVAR) < $@.VAR > $@
|
||||
@$(RM) $@.VAR
|
||||
|
||||
##################################################### DBD stuff
|
||||
|
||||
$(INSTALL_DBD)/%: %
|
||||
@echo "Installing $@"
|
||||
@$(INSTALL) -d -m 644 $< $(@D)
|
||||
|
||||
$(INSTALL_DBD)/%:: ../%
|
||||
@echo "Installing $@"
|
||||
@$(INSTALL) -d -m 644 $< $(@D)
|
||||
|
||||
bpt%.dbd: bpt%.data
|
||||
$(RM) $@
|
||||
$(MAKEBPT) $<
|
||||
|
||||
bpt%.dbd:: ../bpt%.data
|
||||
$(RM) $@
|
||||
$(MAKEBPT) $<
|
||||
|
||||
# Patch for old applications
|
||||
ifdef USER_DBDFLAGS
|
||||
DBDFLAGS = $(USER_DBDFLAGS)
|
||||
endif
|
||||
|
||||
ifdef DBDEXPAND
|
||||
$(DBDNAME): ../$(DBDEXPAND)
|
||||
@echo "Expanding dbd"
|
||||
@$(RM) $@
|
||||
$(DBEXPAND) $(DBDFLAGS) $< > $@
|
||||
endif
|
||||
|
||||
##################################################### Dependencies
|
||||
|
||||
DEPENDS: $(filter $(patsubst %.db, %.substitutions, $(DB)), $(wildcard *.substitutions))
|
||||
@$(MAKEDBDEPENDS) $^
|
||||
|
||||
-include DEPENDS
|
||||
@@ -1,3 +0,0 @@
|
||||
#RULES.Host
|
||||
|
||||
include $(EPICS_BASE)/config/RULES.Host
|
||||
@@ -1,14 +0,0 @@
|
||||
#RULES.Vx
|
||||
include $(EPICS_BASE)/config/RULES.Vx
|
||||
inc:: $(INSTALL_INCREC)
|
||||
#
|
||||
# turn off implicit rules search for all binaries in base
|
||||
#
|
||||
#Jeff says this turned off all dependency checking
|
||||
#????? What to do????
|
||||
#$(EPICS_BASE_BIN)/* : ;
|
||||
|
||||
|
||||
# Library should be rebuilt because LIBOBJS may have changed.
|
||||
$(LIBNAME): ../Makefile.Vx
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
#RULES.ioc
|
||||
include $(EPICS_BASE)/config/RULES_DIRS
|
||||
buildInstall:: cdCommands
|
||||
|
||||
cdCommands: Makefile
|
||||
$(PERL) $(TOP)/config/makeIocCdCommands.pl $(ARCH)
|
||||
|
||||
clean::
|
||||
@$(RM) cdCommands
|
||||
@@ -1,4 +0,0 @@
|
||||
#RULES.iocBoot
|
||||
DIRS += $(wildcard ioc*)
|
||||
DIRS += $(wildcard as*)
|
||||
include $(EPICS_BASE)/config/RULES_DIRS
|
||||
@@ -1,2 +0,0 @@
|
||||
#RULES_ARCHS
|
||||
include $(EPICS_BASE)/config/RULES_ARCHS
|
||||
@@ -1,2 +0,0 @@
|
||||
#RULES_DIRS
|
||||
include $(EPICS_BASE)/config/RULES_DIRS
|
||||
@@ -1,5 +0,0 @@
|
||||
#RULES_TOP
|
||||
include $(EPICS_BASE)/config/RULES_TOP
|
||||
|
||||
uninstall::
|
||||
@$(RMDIR) $(INSTALL_DB)
|
||||
@@ -1,96 +0,0 @@
|
||||
# makeConfigAppInclude.pl,v 1.1.2.3 1999/07/30 21:14:18 lange Exp
|
||||
|
||||
eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*-
|
||||
if $running_under_some_shell; # makeConfigAppInclude.pl
|
||||
|
||||
use Cwd;
|
||||
|
||||
$arch = $ARGV[0];
|
||||
$outfile = $ARGV[1];
|
||||
$top = $ARGV[2];
|
||||
# Get the absolute path name of $(TOP)
|
||||
$savedir = Cwd::getcwd();
|
||||
Cwd::chdir($top);
|
||||
$top_abs = Cwd::getcwd();
|
||||
Cwd::chdir($savedir);
|
||||
# Add TOP to macro list.
|
||||
$applications{TOP} = $top_abs;
|
||||
|
||||
unlink("${outfile}");
|
||||
open(OUT,">${outfile}") or die "$! opening ${outfile}";
|
||||
print OUT "#Do not modify this file.\n";
|
||||
print OUT "#This file is created during the build.\n";
|
||||
|
||||
@files =();
|
||||
push(@files,"$top/config/RELEASE");
|
||||
push(@files,"$top/config/RELEASE.${arch}");
|
||||
foreach $file (@files) {
|
||||
if (-r "$file") {
|
||||
open(IN, "$file") or die "Cannot open $file\n";
|
||||
while ($line = <IN>) {
|
||||
next if ( $line =~ /\s*#/ );
|
||||
chomp($line);
|
||||
$_ = $line;
|
||||
($prefix,$macro,$post) = /(.*)\s* \s*\$\((.*)\)(.*)/;
|
||||
#test for "include" command
|
||||
if ($prefix eq "include") {
|
||||
if ($macro eq "") {
|
||||
# true if no macro is present
|
||||
#the following looks for
|
||||
#prefix = post
|
||||
($prefix,$post) = /(.*)\s* \s*(.*)/;
|
||||
}
|
||||
else
|
||||
{
|
||||
$base = $applications{$macro};
|
||||
if ($base eq "")
|
||||
{
|
||||
#print "error: $macro was not previously defined\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$post = $base . $post;
|
||||
}
|
||||
}
|
||||
push(@files,"$post")
|
||||
}
|
||||
else {
|
||||
#the following looks for
|
||||
# prefix = $(macro)post
|
||||
($prefix,$macro,$post) = /(.*)\s*=\s*\$\((.*)\)(.*)/;
|
||||
if ($macro eq "") { # true if no macro is present
|
||||
# the following looks for
|
||||
# prefix = post
|
||||
($prefix,$post) = /(.*)\s*=\s*(.*)/;
|
||||
} else {
|
||||
$base = $applications{$macro};
|
||||
if ($base eq "") {
|
||||
#print "error: $macro was not previously defined\n";
|
||||
} else {
|
||||
$post = $base . $post;
|
||||
}
|
||||
}
|
||||
|
||||
$prefix =~ s/^\s+|\s+$//g; # strip leading and trailing whitespace.
|
||||
$applications{$prefix} = $post;
|
||||
if ( -d "$post") { #check that directory exists
|
||||
print OUT "\n";
|
||||
if ( -d "$post/bin/$arch") { #check that directory exists
|
||||
print OUT "${prefix}_BIN = $post/bin/${arch}\n";
|
||||
}
|
||||
if ( -d "$post/lib/$arch") { #check that directory exists
|
||||
print OUT "${prefix}_LIB = $post/lib/${arch}\n";
|
||||
}
|
||||
if ( -d "$post/include") { #check that directory exists
|
||||
print OUT "EPICS_INCLUDES += -I$post/include\n";
|
||||
}
|
||||
if ( -d "$post/dbd") { #check that directory exists
|
||||
print OUT "EPICS_DBDFLAGS += -I $post/dbd\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
close IN;
|
||||
}
|
||||
}
|
||||
close OUT;
|
||||
@@ -1,23 +0,0 @@
|
||||
eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*-
|
||||
if $running_under_some_shell; # makeDbDepends.pl
|
||||
|
||||
# Called from within the object directory.
|
||||
# Searches the .substitutions files (from the command line) for
|
||||
# "file xxx {" entries to create a .DEPENDS file
|
||||
|
||||
open(OUT, ">.DEPENDS") or die "Cannot open .DEPENDS: $!";
|
||||
|
||||
foreach $file (@ARGV) {
|
||||
open(IN, "<$file") or die "Cannot open $file: $!";
|
||||
@substfile = <IN>;
|
||||
close IN or die "Cannot close $file: $!";
|
||||
|
||||
@depends = grep { s/^\s*file\s*(.*)\s*\{.*$/\1/ } @substfile;
|
||||
chomp @depends;
|
||||
|
||||
if (@depends) {
|
||||
$file =~ s/\.substitutions/\.t.db.raw/;
|
||||
print OUT "${file}:: @depends\n";
|
||||
}
|
||||
}
|
||||
close OUT or die "Cannot close $file: $!";
|
||||
@@ -1,90 +0,0 @@
|
||||
eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*-
|
||||
if $running_under_some_shell; # makeIocCdCommands.pl
|
||||
|
||||
use Cwd;
|
||||
|
||||
$cwd = cwd();
|
||||
#hack for sun4
|
||||
$cwd =~ s|/tmp_mnt||;
|
||||
$arch = $ARGV[0];
|
||||
|
||||
unlink("cdCommands");
|
||||
open(OUT,">cdCommands") or die "$! opening cdCommands";
|
||||
print OUT "startup = \"$cwd\"\n";
|
||||
|
||||
#appbin is kept for compatibility with 3.13.1
|
||||
$appbin = $cwd;
|
||||
$appbin =~ s/iocBoot.*//;
|
||||
$appbin = $appbin . "/bin/${arch}";
|
||||
print OUT "appbin = \"$appbin\"\n";
|
||||
|
||||
$top = $cwd;
|
||||
$top =~ s/\/iocBoot.*//;
|
||||
print OUT "top = \"$top\"\n";
|
||||
$topbin = "${top}/bin/${arch}";
|
||||
#skip check that top/bin/${arch} exists; src may not have been builT
|
||||
print OUT "topbin = \"$topbin\"\n";
|
||||
# Add TOP to macro list.
|
||||
$applications{TOP} = $top;
|
||||
|
||||
@files =();
|
||||
push(@files,"$top/config/RELEASE");
|
||||
foreach $file (@files) {
|
||||
if (-r "$file") {
|
||||
open(IN, "$file") or die "Cannot open $file\n";
|
||||
while ($line = <IN>) {
|
||||
next if ( $line =~ /\s*#/ );
|
||||
chomp($line);
|
||||
$_ = $line;
|
||||
($prefix,$macro,$post) = /(.*)\s* \s*\$\((.*)\)(.*)/;
|
||||
#test for "include" command
|
||||
if ($prefix eq "include") {
|
||||
if ($macro eq "") {
|
||||
# true if no macro is present
|
||||
#the following looks for
|
||||
#prefix = post
|
||||
($prefix,$post) = /(.*)\s* \s*(.*)/;
|
||||
}
|
||||
else {
|
||||
$base = $applications{$macro};
|
||||
if ($base eq "") {
|
||||
#print "error: $macro was not previously defined\n";
|
||||
}
|
||||
else {
|
||||
$post = $base . $post;
|
||||
}
|
||||
}
|
||||
push(@files,"$post")
|
||||
}
|
||||
else {
|
||||
#the following looks for
|
||||
# prefix = $(macro)post
|
||||
($prefix,$macro,$post) = /(.*)\s*=\s*\$\((.*)\)(.*)/;
|
||||
if ($macro eq "") { # true if no macro is present
|
||||
# the following looks for
|
||||
# prefix = post
|
||||
($prefix,$post) = /(.*)\s*=\s*(.*)/;
|
||||
} else {
|
||||
$base = $applications{$macro};
|
||||
if ($base eq "") {
|
||||
#print "error: $macro was not previously defined\n";
|
||||
} else {
|
||||
$post = $base . $post;
|
||||
}
|
||||
}
|
||||
|
||||
$prefix =~ s/^\s+|\s+$//g; # strip leading and trailing whitespace.
|
||||
$applications{$prefix} = $post;
|
||||
$app = lc($prefix);
|
||||
if ( -d "$post") { #check that directory exists
|
||||
print OUT "$app = \"$post\"\n";
|
||||
}
|
||||
if ( -d "$post/bin/$arch") { #check that directory exists
|
||||
print OUT "${app}bin = \"$post/bin/$arch\"\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
close IN;
|
||||
}
|
||||
}
|
||||
close OUT;
|
||||
@@ -1,12 +0,0 @@
|
||||
eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*-
|
||||
if $running_under_some_shell; # replaceVAR.pl
|
||||
|
||||
# Called from within the object directory
|
||||
# Replaces VAR(xxx) with $(xxx)
|
||||
# and VAR_xxx_ with $(xxx)
|
||||
|
||||
while (<STDIN>) {
|
||||
s/VAR\(/\$\(/g;
|
||||
s/VAR_([^_]*)_/\$\($1\)/g;
|
||||
print;
|
||||
}
|
||||
Reference in New Issue
Block a user