From 8d9dd818b1346a220f9ff31956203322d1e4e294 Mon Sep 17 00:00:00 2001 From: "Janet B. Anderson" Date: Tue, 20 Mar 2001 21:00:06 +0000 Subject: [PATCH] Changes to allow relative path for EPICS_BASE. --- configure/tools/makeConfigAppInclude.pl | 11 +++++++---- configure/tools/makeRulesInclude.pl | 9 ++++++--- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/configure/tools/makeConfigAppInclude.pl b/configure/tools/makeConfigAppInclude.pl index 477573026..81bfd0f90 100644 --- a/configure/tools/makeConfigAppInclude.pl +++ b/configure/tools/makeConfigAppInclude.pl @@ -9,6 +9,7 @@ $hostarch = $ARGV[0]; $arch = $ARGV[1]; $outfile = $ARGV[2]; $top = $ARGV[3]; +$applications{TOP} = $top; unlink("${outfile}"); open(OUT,">${outfile}") or die "$! opening ${outfile}"; @@ -34,11 +35,13 @@ foreach $file (@files) { # the following looks for # prefix = post ($prefix,$post) = /(.*)\s*=\s*(.*)/; + $app_post = $post; } else { $base = $applications{$macro}; if ($base eq "") { #print "error: $macro was not previously defined\n"; } else { + $app_post = "\$($macro)" . $post; $post = $base . $post; } } @@ -46,16 +49,16 @@ foreach $file (@files) { 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"; + print OUT "${prefix}_BIN = $app_post/bin/${arch}\n"; } if ( -d "$post/lib/$arch") { #check that directory exists - print OUT "${prefix}_LIB = $post/lib/${arch}\n"; + print OUT "${prefix}_LIB = $app_post/lib/${arch}\n"; } if ( -d "$post/include") { #check that directory exists - print OUT "INSTALL_INCLUDES += -I$post/include\n"; + print OUT "INSTALL_INCLUDES += -I$app_post/include\n"; } if ( -d "$post/dbd") { #check that directory exists - print OUT "INSTALL_DBDFLAGS += -I $post/dbd\n"; + print OUT "INSTALL_DBDFLAGS += -I $app_post/dbd\n"; } } } diff --git a/configure/tools/makeRulesInclude.pl b/configure/tools/makeRulesInclude.pl index 37fd7d60d..12f061ec6 100644 --- a/configure/tools/makeRulesInclude.pl +++ b/configure/tools/makeRulesInclude.pl @@ -9,6 +9,7 @@ $hostarch = $ARGV[0]; $arch = $ARGV[1]; $outfile = $ARGV[2]; $top = $ARGV[3]; +$applications{TOP} = $top; unlink("${outfile}"); open(OUT,">${outfile}") or die "$! opening ${outfile}"; @@ -34,20 +35,22 @@ foreach $file (@files) { # the following looks for # prefix = post ($prefix,$post) = /(.*)\s*=\s*(.*)/; - next if ( $prefix eq "EPICS_BASE" ); # skip epics base - next if ( $prefix eq "TEMPLATE_TOP" ); # skip epics base + $app_post = $post; } else { $base = $applications{$macro}; if ($base eq "") { #print "error: $macro was not previously defined\n"; } else { + $app_post = "\$($macro)" . $post; $post = $base . $post; } } + next if ( $prefix eq "EPICS_BASE" ); + next if ( $prefix eq "TEMPLATE_TOP" ); $applications{$prefix} = $post; if ( -d "$post") { #check that directory exists if ( -d "$post/configure") { #check that directory exists - print OUT "-include $post/configure/RULES_BUILD\n"; + print OUT "-include $app_post/configure/RULES_BUILD\n"; } } }