From 3ee0ea750a7c46cd79170b06e23de41972442c5c Mon Sep 17 00:00:00 2001 From: "Janet B. Anderson" Date: Thu, 7 Mar 2002 23:21:01 +0000 Subject: [PATCH] Added touch.pl for WIN32 builds (needed for newest cygwin make). --- src/makeBaseApp/Makefile.Host | 1 + src/makeBaseApp/top/config/RULES.Db | 2 +- src/makeBaseApp/top/config/touch.pl | 31 +++++++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100755 src/makeBaseApp/top/config/touch.pl diff --git a/src/makeBaseApp/Makefile.Host b/src/makeBaseApp/Makefile.Host index 4bd05f82c..830724187 100644 --- a/src/makeBaseApp/Makefile.Host +++ b/src/makeBaseApp/Makefile.Host @@ -20,6 +20,7 @@ TEMPLATES += top/config/RULES_TOP TEMPLATES += top/config/makeDbDepends.pl TEMPLATES += top/config/convertRelease.pl TEMPLATES += top/config/replaceVAR.pl +TEMPLATES += top/config/touch.pl TEMPLATES += top/exampleApp/Makefile TEMPLATES += top/exampleApp/Db/Makefile diff --git a/src/makeBaseApp/top/config/RULES.Db b/src/makeBaseApp/top/config/RULES.Db index 412ecfc32..83294762d 100644 --- a/src/makeBaseApp/top/config/RULES.Db +++ b/src/makeBaseApp/top/config/RULES.Db @@ -11,7 +11,7 @@ REPLACEVAR = $(PERL) $(TOP)/config/replaceVAR.pl ifndef WIN32 TOUCH = touch else -TOUCH = type NUL >> +TOUCH = $(PERL) $(TOP)/config/touch.pl endif #----------------------------------------------------------------- diff --git a/src/makeBaseApp/top/config/touch.pl b/src/makeBaseApp/top/config/touch.pl new file mode 100755 index 000000000..503dfa55f --- /dev/null +++ b/src/makeBaseApp/top/config/touch.pl @@ -0,0 +1,31 @@ +#!/usr/bin/perl +# +# unix touch in Perl + +use File::Copy; +use File::Basename; + +sub Usage +{ + my ($txt) = @_; + + print "Usage:\n"; + print "\ttouch file [ file2 file3 ...]\n"; + print "\nError: $txt\n" if $txt; + + exit 2; +} + +# need at least one arg: ARGV[0] +Usage("need more args") if $#ARGV < 0; + +@targets=@ARGV[0..$#ARGV]; + +foreach $file ( @targets ) +{ + open(OUT,">$file") or die "$! creating $file"; + #print OUT "NUL\n"; + close OUT; +} + +# EOF touch.pl