diff options
-rw-r--r-- | Makefile | 30 | ||||
-rw-r--r-- | lib/sbin/CVSUpdate.pl | 8 | ||||
-rw-r--r-- | lib/sbin/MakeUtils.pl | 42 |
3 files changed, 74 insertions, 6 deletions
@@ -16,7 +16,7 @@ # # # @enddesc -# @version $Id: Makefile,v 1.117 2001-08-27 15:52:08 tradke Exp $ +# @version $Id: Makefile,v 1.118 2001-09-05 13:50:09 allen Exp $ # @@*/ ################################################################################## @@ -324,6 +324,7 @@ else @echo " -testsuite : run the test program." @echo " -thornlist : regenerates the ThornList file. " @echo " -ThornGuide : creates the thorn manual for a specific configuration. " + @echo " -cvsupdate : updates the files for a specific configuration." @echo " -examples : copies thorn parameter files to examples directory." endif @echo $(DIVIDER) @@ -881,8 +882,8 @@ endif %-ThornGuide: @echo $(DIVIDER) - @echo Configuration $(@:%-testsuite=%) does not exist. - @echo Test suite aborted. + @echo Configuration $(@:%-ThornGuide=%) does not exist. + @echo Thorn Guide creation aborted. ############################################################################### # End of documentation targets @@ -905,7 +906,28 @@ cvsstatus: .PHONY: cvsupdate: - $(PERL) -s $(CCTK_HOME)/lib/sbin/CVSUpdate.pl arrangements + $(PERL) -s $(CCTK_HOME)/lib/sbin/CVSUpdate.pl arrangements + +# run cvsudpate on a configuration +.PHONY cvsupdate: + +ifneq ($strip($(CONFIGURATIONS)),) +.PHONY $(addsuffix -cvsupdate,$(CONFIGURATIONS)): + +$(addsuffix -cvsupdate,$(CONFIGURATIONS)): + @echo $(DIVIDER) + @echo Updating files for configuration $(@:%-cvsupdate=%) + if test -r $(CONFIGS_DIR)/$(@:%-cvsupdate=%)/ThornList ; then \ + $(PERL) -s lib/sbin/CVSUpdate.pl arrangements $(CONFIGS_DIR)/$(@:%-cvsupdate=%)/ThornList; \ + cd $(CCTK_HOME); \ + fi + @echo " Done." +endif + +%-cvsupdate: + @echo $(DIVIDER) + @echo Configuration $(@:%-cvsupdate=%) does not exist. + @echo CVS Update aborted. .PHONY: cvsdiff: diff --git a/lib/sbin/CVSUpdate.pl b/lib/sbin/CVSUpdate.pl index ee3a1595..1dece7e6 100644 --- a/lib/sbin/CVSUpdate.pl +++ b/lib/sbin/CVSUpdate.pl @@ -47,9 +47,13 @@ if ($network) close (CS); } -$package_dir = shift(@ARGV); +($package_dir, $thornlist) = @ARGV; -%info = &buildthorns($package_dir,"thorns"); +if ($thornlist =~ /^$/) { + %info = &buildthorns($package_dir,"thorns"); +} else { + %info = &ReadThornlist($thornlist); +} $current_dir = `pwd`; chdir $package_dir; diff --git a/lib/sbin/MakeUtils.pl b/lib/sbin/MakeUtils.pl index d81f3c92..b306ebbb 100644 --- a/lib/sbin/MakeUtils.pl +++ b/lib/sbin/MakeUtils.pl @@ -206,5 +206,47 @@ sub ThornInfo return "$implementation ($inherits) [$friends] {$shares}"; } + +#/*@@ +# @routine ThornInfo +# @date Wed Sep 5 14:04:07 CEST 2001 +# @author Ian Kelley +# @desc +# Reads in a thornlist and returns the arrangements/thorns, +# strips out all the comments/etc. +# @enddesc +# @calls +# @calledby +# @history +# +# @endhistory +# +#@@*/ +sub ReadThornlist +{ + my ($thornlist) = shift; + my (@temp); + my (%tl); + + open (TL, "$thornlist") + || die "\nCannot open thornlist ($thornlist) for reading: $!"; + + while (<TL>) + { + s/(.*?)#.*/\1/; # read up to the first "#" + s/\s+//g; # replace any spaces with nothing + if (/\w+/) + { + push @temp, $_; # add to array if something is left + } + } + + foreach (@temp) # see if docs exist for these thorns + { + $tl{$_} = "thorn"; + } + + return %tl; +} 1; |