From 7a0890fb9714ac5b99415dcfe37a249d109ebd4d Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Wed, 25 Jun 1997 06:02:42 +0000 Subject: [PATCH] moved perl scripts here --- src/tools/Makefile.Host | 12 +----------- src/tools/findBase.pl | 13 +++++++++++++ src/tools/makeMakefile.pl | 30 ++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 11 deletions(-) create mode 100644 src/tools/findBase.pl create mode 100644 src/tools/makeMakefile.pl diff --git a/src/tools/Makefile.Host b/src/tools/Makefile.Host index f2e68df8c..90865eac6 100644 --- a/src/tools/Makefile.Host +++ b/src/tools/Makefile.Host @@ -6,17 +6,7 @@ include $(TOP)/config/CONFIG_BASE # install these scripts: # -# WIN32 also uses rm.pl, cp.pl, mkdir.pl, rmdir.pl -# byt they are called from here, not installed -SCRIPTS := installEpics.pl makeBaseApp.pl makeBaseApp installEpics - -# Before anything is done, installEpics has to be in place. -# The first action in a full build & install is 'make inc.host', -# that's where we hook into: -inc:: $(INSTALL_BIN)/installEpics.pl - -$(INSTALL_BIN)/installEpics.pl: ../installEpics.pl - $(PERL) ../installEpics.pl -d -m 555 ../installEpics.pl $(INSTALL_BIN) +SCRIPTS := makeBaseApp installEpics include $(TOP)/config/RULES.Host diff --git a/src/tools/findBase.pl b/src/tools/findBase.pl new file mode 100644 index 000000000..e714d7309 --- /dev/null +++ b/src/tools/findBase.pl @@ -0,0 +1,13 @@ +#!/usr/local/bin/perl + +use Cwd; + +$dir=cwd(); +# make sure $dir ends with '/' +# +$dir="$dir/" unless ($dir =~ m'/$'); + +if ($dir =~ m'(.*(/|\\)base)(/|\\)') +{ + print "$1"; +} diff --git a/src/tools/makeMakefile.pl b/src/tools/makeMakefile.pl new file mode 100644 index 000000000..aab403e46 --- /dev/null +++ b/src/tools/makeMakefile.pl @@ -0,0 +1,30 @@ +#!/usr/local/bin/perl +# +# makeMakefile.pl +# +# called from RULES_ARCHS +# +# +# Usage: perl makeMakefile.pl O.*-dir Makefile-Type + +$dir = $ARGV[0]; +$type= $ARGV[1]; +$makefile="$dir/Makefile"; + +if ($dir =~ m'O.(.+)') +{ + $t_a = $1; +} +else +{ + die "Cannot extract T_A from $dir"; +} + +mkdir ($dir, 0777) unless -d $dir; + +open OUT, "> $makefile" or die "Cannot create $makefile"; +print OUT "T_A=$t_a\n"; +print OUT "include ../Makefile.$type\n"; +close OUT; + +# EOF makeMakefile.pl