From ea6e99b6ff29bcb2679383c02e5b69a3ad30138c Mon Sep 17 00:00:00 2001 From: MarkRivers <rivers@cars.uchicago.edu> Date: Fri, 7 Sep 2001 04:18:08 +0000 Subject: [PATCH] Changes to support relative paths to RELEASE, eliminate EPICS_SUPPORT_PATH --- config/RELEASE | 31 +++++++++++++++--------------- config/makeConfigAppInclude.pl | 27 +++++++++++++++----------- config/makeIocCdCommands.pl | 35 ++++++++++++++-------------------- 3 files changed, 45 insertions(+), 48 deletions(-) diff --git a/config/RELEASE b/config/RELEASE index bb1f72c..cbc7625 100644 --- a/config/RELEASE +++ b/config/RELEASE @@ -9,20 +9,19 @@ # # Add your declarations here -EPICS_SUPPORT_PATH=<Complete pathname to Support directory> +include $(TOP)/../config/IP_RELEASE +include $(TOP)/../config/IP330_RELEASE +include $(TOP)/../config/MCA_RELEASE +include $(TOP)/../config/LOVE_RELEASE +include $(TOP)/../config/IPUNIDIG_RELEASE +include $(TOP)/../config/DAC128V_RELEASE +include $(TOP)/../config/MOTOR_RELEASE +include $(TOP)/../config/STD_RELEASE +include $(TOP)/../config/BITBUS_RELEASE +include $(TOP)/../config/MPFGPIB_RELEASE +include $(TOP)/../config/MPFSERIAL_RELEASE +include $(TOP)/../config/MPF_RELEASE +include $(TOP)/../config/CAMAC_RELEASE +#include $(TOP)/../config/ALLEN_BRADLEY_RELEASE +include $(TOP)/../config/RELEASE -include $(EPICS_SUPPORT_PATH)/config/IP_RELEASE -include $(EPICS_SUPPORT_PATH)/config/IP330_RELEASE -include $(EPICS_SUPPORT_PATH)/config/MCA_RELEASE -include $(EPICS_SUPPORT_PATH)/config/LOVE_RELEASE -include $(EPICS_SUPPORT_PATH)/config/IPUNIDIG_RELEASE -include $(EPICS_SUPPORT_PATH)/config/DAC128V_RELEASE -include $(EPICS_SUPPORT_PATH)/config/MOTOR_RELEASE -include $(EPICS_SUPPORT_PATH)/config/STD_RELEASE -include $(EPICS_SUPPORT_PATH)/config/BITBUS_RELEASE -include $(EPICS_SUPPORT_PATH)/config/MPFGPIB_RELEASE -include $(EPICS_SUPPORT_PATH)/config/MPFSERIAL_RELEASE -include $(EPICS_SUPPORT_PATH)/config/MPF_RELEASE -include $(EPICS_SUPPORT_PATH)/config/EPICS_BASE_RELEASE - -TEMPLATE_TOP=$(EPICS_SUPPORT_PATH)/../base/templates/makeBaseApp/top diff --git a/config/makeConfigAppInclude.pl b/config/makeConfigAppInclude.pl index 075b197..f8d52a9 100644 --- a/config/makeConfigAppInclude.pl +++ b/config/makeConfigAppInclude.pl @@ -8,7 +8,11 @@ use Cwd; $arch = $ARGV[0]; $outfile = $ARGV[1]; $top = $ARGV[2]; -$applications{EPICS_SUPPORT_PATH} = $ENV{EPICS_SUPPORT_PATH}; +# Get the absolute path name of $(TOP) +$savedir = Cwd::getcwd(); +Cwd::chdir($top); +$top_abs = Cwd::getcwd(); +Cwd::chdir($savedir); unlink("${outfile}"); open(OUT,">${outfile}") or die "$! opening ${outfile}"; @@ -35,12 +39,13 @@ foreach $file (@files) { ($prefix,$post) = /(.*)\s* \s*(.*)/; } else { - $base = $applications{$macro}; - if ($base eq "") { - #print "error: $macro was not previously defined\n"; - } - else { +# $base = $applications{$macro}; + if ($macro eq "TOP") { + $base = $top; $post = $base . $post; + #print "info: \$macro= $macro \$base= $base \$post= $post\n"; + } else { + print "error: $macro is not TOP\n"; } } push(@files,"$post") @@ -54,14 +59,14 @@ foreach $file (@files) { # prefix = post ($prefix,$post) = /(.*)\s*=\s*(.*)/; } else { - $base = $applications{$macro}; - if ($base eq "") { - #print "error: $macro was not previously defined\n"; - } else { + if ($macro eq "TOP") { + $base = $top_abs; $post = $base . $post; + #print "info: \$macro= $macro \$base= $base \$post= $post\n"; + } else { + print "error: $macro is not TOP\n"; } } - $applications{$prefix} = $post; if ( -d "$post") { #check that directory exists print OUT "\n"; if ( -d "$post/bin/$arch") { #check that directory exists diff --git a/config/makeIocCdCommands.pl b/config/makeIocCdCommands.pl index bdf200c..79a8565 100644 --- a/config/makeIocCdCommands.pl +++ b/config/makeIocCdCommands.pl @@ -4,13 +4,6 @@ eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*- use Cwd; use Env; -$post = $ENV{"EPICS_SUPPORT_PATH"}; -if ($post ne "") -{ - $prefix = "EPICS_SUPPORT_PATH"; - $applications{$prefix} = $post; -} - $cwd = cwd(); #hack for sun4 $cwd =~ s|/tmp_mnt||; @@ -52,13 +45,13 @@ foreach $file (@files) { ($prefix,$post) = /(.*)\s* \s*(.*)/; } else { - $base = $applications{$macro}; - if ($base eq "") { - #print "error: $macro was not previously defined\n"; - } - else { - $post = $base . $post; - } + if ($macro eq "TOP") { + $base = $top; + $post = $base . $post; + #print "info: \$macro= $macro \$base= $base \$post= $post\n"; + } else { + print "error: $macro is not TOP\n"; + } } push(@files,"$post") } @@ -71,14 +64,14 @@ foreach $file (@files) { # 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; - } + if ($macro eq "TOP") { + $base = $top; + $post = $base . $post; + #print "info: \$macro= $macro \$base= $base \$post= $post\n"; + } else { + print "error: $macro is not TOP\n"; + } } - $applications{$prefix} = $post; $app = lc($prefix); if ( -d "$post") { #check that directory exists print OUT "$app = \"$post\"\n"; -- GitLab