diff options
-rw-r--r-- | ChangeLog-99b | 23 | ||||
-rw-r--r-- | Makefile | 40 | ||||
-rw-r--r-- | TAO/ChangeLog-99c | 13 | ||||
-rw-r--r-- | TAO/Makefile | 22 | ||||
-rwxr-xr-x | bin/make_release | 444 |
5 files changed, 364 insertions, 178 deletions
diff --git a/ChangeLog-99b b/ChangeLog-99b index f17498e3b9d..54fa75db2f5 100644 --- a/ChangeLog-99b +++ b/ChangeLog-99b @@ -1,14 +1,19 @@ +Thu Aug 12 15:49:00 1999 David L. Levine <levine@cs.wustl.edu> + + * Makefile,bin/make_release: build kits in /tmp staging + area, and copy to ace's ftp pub/ACE directory. + Thu Aug 12 11:36:46 1999 Carlos O'Ryan <coryan@cs.wustl.edu> - * ace/OS.h: - * ace/Svc_Handler.cpp: - * ace/Future.cpp: - Some platforms require arguments in the exception thrown from - operator new. The standard (std::bad_alloc) does not require - any. - Added a new macro (ACE_throw_bad_alloc) that takes care of these - differences, including platforms that don't throw exceptions but - return something. + * ace/OS.h: + * ace/Svc_Handler.cpp: + * ace/Future.cpp: + Some platforms require arguments in the exception thrown from + operator new. The standard (std::bad_alloc) does not require + any. + Added a new macro (ACE_throw_bad_alloc) that takes care of these + differences, including platforms that don't throw exceptions but + return something. Wed Aug 11 17:00:00 1999 Kirthika Parameswaran <kirthika@cs.wustl.edu> @@ -150,25 +150,32 @@ RELEASE_LIB_FILES = \ ACE_wrappers/tests \ ACE_wrappers/websvcs -.PHONY: release releasetao releaseall +.PHONY: release releasetao releaseall tag REL = beta CHECK = -GENERATE_MAN_PAGES = $(ACE_ROOT)/bin/generate_man_pages +GENERATE_MAN_PAGES = -g #### The release target creates the ACE (only) kit. -release: ACE-INSTALL - @$(GENERATE_MAN_PAGES) - @$(ACE_ROOT)/bin/make_release $(CHECK) -k ace -t $(REL) \ - -c "$(CONTROLLED_FILES)" -r "$(RELEASE_FILES)" \ - -l "$(RELEASE_LIB_FILES)" -u +release: tag + @$(ACE_ROOT)/bin/make_release $(CHECK) -i -k ace -v $(REL) \ + $(GENERATE_MAN_PAGES) \ + -ta `head -1 VERSION | perl -ne \ + 's/.* ([\d\.]+),.*\n/$$1/; tr/./_/; print "ACE-$$_";'` + +tag: + @$(ACE_ROOT)/bin/make_release $(CHECK) -k ace -v $(REL) -u #### The following target is for use by the TAO Makefile. It should not #### be called directly from the command line. The releasetao target #### creates the combined ACE-TAO kit. releasetao: - @$(ACE_ROOT)/bin/make_release $(CHECK) -k ace+tao -t $(REL) \ - -c "$(CONTROLLED_FILES)" -r "$(ALL_RELEASE_FILES)" -u + @$(ACE_ROOT)/bin/make_release $(CHECK) -i -k ace+tao -v $(REL) \ + $(GENERATE_MAN_PAGES) \ + -ta `head -1 VERSION | perl -ne \ + 's/.* ([\d\.]+),.*\n/$$1/; tr/./_/; print "ACE-$$_";'` \ + -tt `head -1 TAO/VERSION | perl -ne \ + 's/.* ([\d\.]+),.*\n/$$1/; tr/./_/; print "TAO-$$_";'` #### The releaseall target: #### 1) Creates the ACE kit. @@ -176,8 +183,19 @@ releasetao: #### recursively invoking make release in the TAO directory. #### The make then recursively invokes make releasetao in this #### directory to create the combined ACE-TAO kit. -releaseall: release - @cd TAO && $(MAKE) release REL=$(REL) +releaseall: tag + @cd TAO && $(MAKE) -s release REL=$(REL) + +.PHONY: show_controlled_files show_release_files show_release_lib_files + +show_controlled_files: + @echo $(CONTROLLED_FILES) + +show_release_files: + @echo $(RELEASE_FILES) + +show_release_lib_files: + @echo $(RELEASE_LIB_FILES) ACE-INSTALL: ACE-INSTALL.html @lynx -dump $< > $@ diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c index f94820cb64d..1fc9cc4b22a 100644 --- a/TAO/ChangeLog-99c +++ b/TAO/ChangeLog-99c @@ -1,9 +1,14 @@ +Thu Aug 12 15:49:00 1999 David L. Levine <levine@cs.wustl.edu> + + * Makefile,bin/make_release: build kits in /tmp staging + area, and copy to ace's ftp pub/ACE directory. + Thu Aug 12 11:45:21 1999 Carlos O'Ryan <coryan@cs.wustl.edu> - * tests/IDL_Test/Makefile: - Sometimes the canonical rule for reopened_modules.idl was - invoked, and not our special one, this resulted in some annoying - warnings that we want to silence. + * tests/IDL_Test/Makefile: + Sometimes the canonical rule for reopened_modules.idl was + invoked, and not our special one, this resulted in some annoying + warnings that we want to silence. Wed Aug 11 13:35:11 1999 Nanbor Wang <nanbor@cs.wustl.edu> diff --git a/TAO/Makefile b/TAO/Makefile index 169784a4efc..82b5d792666 100644 --- a/TAO/Makefile +++ b/TAO/Makefile @@ -93,7 +93,7 @@ INSTALL: TAO-INSTALL.html orbsvcs/README: docs/orbsvcs.html @lynx -dump $^ > $@; chmod a+r $@ -.PHONY: release +.PHONY: release tag REL = beta CHECK = @@ -102,7 +102,19 @@ CHECK = #### If creating a release in /project/adaptive/ACE_wrappers/TAO, it #### just updates the VERSION and ChangeLog files, and tags the release. #### Then, make releasetao is invoked to actually create the kit. -release: INSTALL - @$(ACE_ROOT)/bin/make_release $(CHECK) -k tao -t $(REL) \ - -c "$(CONTROLLED_FILES)" -r "$(RELEASE_FILES)" -u && \ - cd .. && $(MAKE) releasetao +release: tag + @cd .. && $(MAKE) -s releasetao + +tag: + @$(ACE_ROOT)/bin/make_release $(CHECK) -k tao -v $(REL) -u + +.PHONY: show_controlled_files show_release_files show_release_lib_files + +show_controlled_files: + @echo $(CONTROLLED_FILES) + +show_release_files: + @echo $(RELEASE_FILES) + +show_release_lib_files: + @echo "" diff --git a/bin/make_release b/bin/make_release index cecab1730ed..8e56fc04eec 100755 --- a/bin/make_release +++ b/bin/make_release @@ -1,5 +1,5 @@ -eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' - & eval 'exec perl -w -S $0 $argv:q' +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' if 0; # $Id$ @@ -11,21 +11,44 @@ eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' # full path to perl, as long as it is in the user's PATH. # Taken from perlrun man page. -$usage="usage: $0 [-?] [-k <kit>] [-n] [-t <type>] " . - "[-c <controlled files>] [-r <release files>] " . - "[-l <release lib files] [-u]\n"; -$long_usage=" -? option prints this message\n" . +use strict; + +my $usage="usage: $0 [-?] [-i] [-g] [-k <kit>] [-n] [-v <version>] " . + "[-ta <ACE tag>] [-tt <TAO tag>] " . + "[-c <controlled files>] [-r <release files>] [-l <release lib files] " . + "[-u] [-z]\n"; +my $long_usage=" -? option prints this message\n" . + " -i to install to public web server directory\n" . + " -g to generate the man pages\n" . " -k <kit>, where <kit> is ace, tao, or ace+tao\n" . " -n option prints what would be done, but doesn't do it\n" . - " -t <type>, where <type> is major, minor, or beta (default)\n" . + " -v <version>, where <version> is major, minor, or beta (default)\n" . + " -ta <ACE tag>, to specify ACE tag to be use for checkout (export)\n" . + " -tt <TAO tag>, to specify TAO tag to be use for checkout (export)\n" . " -c <controlled files> lists the CVS-controlled files\n" . " -r <release files> lists the files to be released\n" . " -l <release lib files> list the files to put in the lib kit\n" . - " -u to update versions\n"; + " -u to update versions\n" . + " -z to suppress creation of .zip files\n"; + + +######## +######## Sanity checks. +######## +$ENV{'SIGNATURE'} || + die "$0: must set your SIGNATURE environment variable\n"; + +my $hostname; +chomp ($hostname = $ENV{'HOSTNAME'} || `uname -n`); +unless ("$hostname" eq 'ace') { + die "$0: must run on host ace\n"; +} + ######## ######## Configuration parameters. ######## +my $gnu; if (-d '/pkg/gnu/bin') { $gnu = '/pkg/gnu/bin/'; #### Insert it at head of PATH, so that cvs diff uses GNU diff. @@ -35,22 +58,31 @@ if (-d '/pkg/gnu/bin') { $gnu = ''; } -$exec_prefix = $exec_suffix = ''; -$kit = ''; -$release_type = 'beta'; -$controlled_files = ''; -$release_files = ''; -$release_filter = '\\( -name CVS -o -name build \\) -prune -o ' . - '! -name \'.\#*\' ! -name \'\#*\' ! -name \'*~\' ' . - '! -name \'*.MAK\' -print'; -$update_versions = 0; +my $export_dir = '/export2/project/ftp-doc/pub/ACE'; +my $diffs_dir = "$export_dir/diffs"; +my $exec_prefix = ''; +my $generate_man_pages = 0; +my $install = 0; +my $kit = ''; +my $release_type = 'beta'; +my $ace_tag = my $tao_tag = ''; +my $controlled_files = my $release_files = my $release_lib_files = ''; +my $release_filter = '\\( -name CVS -o -name build \\) -prune -o ' . + '! -name \'.\#*\' ! -name \'\#*\' ! -name \'*~\' ' . + '! -name \'*.MAK\' -print'; +my $update_versions = 0; +my $create_zips = 1; ######## ######## Process command line args. ######## while ($#ARGV >= $[ && $ARGV[0] =~ /^-/) { - if ($ARGV[0] eq '-k') { + if ($ARGV[0] eq '-i') { + $install = 1; + } elsif ($ARGV[0] eq '-g') { + $generate_man_pages = 1; + } elsif ($ARGV[0] eq '-k') { if ($ARGV[1] =~ /^[^-]+/ && ($ARGV[1] eq 'ace' || $ARGV[1] eq 'tao' || $ARGV[1] eq 'ace+tao')) { $kit = $ARGV[1]; shift; @@ -59,15 +91,28 @@ while ($#ARGV >= $[ && $ARGV[0] =~ /^-/) { die "$usage$long_usage"; } } elsif ($ARGV[0] eq '-n') { - $exec_prefix = 'echo \''; - $exec_suffix = '\''; - } elsif ($ARGV[0] eq '-t') { + $exec_prefix = 'echo '; + } elsif ($ARGV[0] eq '-v') { if ($ARGV[1] =~ /^[^-]+/ && ($ARGV[1] eq 'major' || $ARGV[1] eq 'minor' || $ARGV[1] eq 'beta')) { $release_type = $ARGV[1]; shift; } else { - print STDERR "$0: must provide argument for -t option\n"; + print STDERR "$0: must provide argument for -v option\n"; + die "$usage$long_usage"; + } + } elsif ($ARGV[0] eq '-ta') { + if ($ARGV[1] =~ /^[^-]+/) { + $ace_tag = $ARGV[1]; shift; + } else { + print STDERR "$0: must provide argument for -ta option\n"; + die "$usage$long_usage"; + } + } elsif ($ARGV[0] eq '-tt') { + if ($ARGV[1] =~ /^[^-]+/) { + $tao_tag = $ARGV[1]; shift; + } else { + print STDERR "$0: must provide argument for -tt option\n"; die "$usage$long_usage"; } } elsif ($ARGV[0] eq '-c') { @@ -93,6 +138,8 @@ while ($#ARGV >= $[ && $ARGV[0] =~ /^-/) { } } elsif ($ARGV[0] eq '-u') { $update_versions = 1; + } elsif ($ARGV[0] eq '-z') { + $create_zips = 0; } elsif ($ARGV[0] eq '-?') { print "$usage$long_usage"; exit; @@ -103,7 +150,8 @@ while ($#ARGV >= $[ && $ARGV[0] =~ /^-/) { shift; } -die "must specify a -k option\n" unless "$kit"; +die "$0: must specify a -k option\n" unless "$kit"; +my $KIT; if ($kit eq 'ace') { $KIT = 'ACE'; } elsif ($kit eq 'tao') { @@ -112,21 +160,35 @@ if ($kit eq 'ace') { #### Creating combined ACE+TAO kit. Don't use $KIT. }; -$chmod = '/bin/chmod'; -$cpio = "${gnu}cpio"; -$cvs = "${exec_prefix}${gnu}cvs"; -$date = "${gnu}date"; -$egrep = "${gnu}egrep"; -$find = "${gnu}find"; -$gzip = "${gnu}gzip"; -$mv = '/bin/mv'; -chop ($now = `$date +"%a %b %d %T %Y"`); +my $chmod = '/bin/chmod'; +my $cpio = "${gnu}cpio"; +my $cvs = "${gnu}cvs"; +my $date = "${gnu}date"; +my $egrep = "${gnu}egrep"; +my $find = "${gnu}find"; +my $gzip = "${gnu}gzip"; +my $make = "${gnu}make -s"; +my $mv = '/bin/mv'; +my $rm = "/bin/rm -f"; +chop (my $now = `$date +"%a %b %d %T %Y"`); + +unless ("$controlled_files") { + chomp ($controlled_files = `$make show_controlled_files`); +} + +unless ("$release_files") { + chomp ($release_files = `$make show_release_files`); +} + +unless ("$release_lib_files") { + chomp ($release_lib_files = `$make show_release_lib_files`); +} ######## ######## Setup signal handlers. ######## -$status = 1; #### Must get set to 0 explicitly to indicate success. +my $status = 1; #### Must get set to 0 explicitly to indicate success. $SIG{'HUP'} = $SIG{'INT'} = $SIG{'QUIT'} = $SIG{'TERM'} = 'cleanup'; @@ -136,23 +198,78 @@ $SIG{'HUP'} = $SIG{'INT'} = $SIG{'QUIT'} = $SIG{'TERM'} = 'cleanup'; umask 022; +my $major_version = my $minor_version = my $beta_version = 0; +my $previous_version = my $version = ''; +my $ace_version = ''; + ######## ######## Main execution thread. ######## if ($update_versions && "$kit" ne 'ace+tao') { - $major_version = $minor_version = $beta_version = 0; - $previous_version = $version = ''; + #### Update versions and tag, but don't create the kit. $status = &check_workspace () || &get_versions () || &update_version_files () || &update_changelog () || - &tag () || - &diff () || - &create_kit (); + &tag (); } else { + #### Create the kit. + + #### If a tag was specified, export using the tag from a staging area. + #### Default: create a kit from the current directory. + my $stage_dir = '..'; + if ("$ace_tag" || "$tao_tag") { + $stage_dir = "/tmp/ACE_wrappers_stage-$$/"; + unless ("$exec_prefix") { + mkdir "$stage_dir", 0755 || + die "$0: unable to mkdir $stage_dir\n"; + } + } + + if ("$exec_prefix") { + print "chdir $stage_dir\n"; + } else { + chdir $stage_dir || die "$0: unable to chdir $stage_dir\n"; + } + + if ("$ace_tag") { + &ex ("$cvs -q export -r$ace_tag -kv ACE_wrappers > /dev/null") && + die "$0: failed cvs export of $ace_tag in $stage_dir\n"; + unless ("$exec_prefix") { + mkdir "ACE_wrappers/man", 0755 || + die "$0: unable to mkdir $stage_dir/ACE_wrappers/man\n"; + mkdir "ACE_wrappers/man/man3", 0755 || + die "$0: unable to mkdir $stage_dir/ACE_wrappers/man/man3\n"; + mkdir "ACE_wrappers/man/html", 0755 || + die "$0: unable to mkdir $stage_dir/ACE_wrappers/man/html\n"; + } + &ex ("cd ACE_wrappers && bin/generate_man_pages") && + die "$0: failed to generate man pages in $stage_dir/ACE_wrappers\n"; + &ex ("cd ACE_wrappers && $make ACE-INSTALL") && + die "$0: failed make ACE-INSTALL in $stage_dir/ACE_wrappers\n"; + } + + if ("$tao_tag") { + &ex ("$cvs -q export -r$tao_tag -kv ACE_wrappers/TAO > /dev/null") && + die "$0: failed cvs export of $tao_tag in $stage_dir\n"; + &ex ("cd ACE_wrappers/TAO && $make INSTALL orbsvcs/README") && + die "$0: failed make INSTALL TAO/orbsvcs/README in " . + "$stage_dir/ACE_wrappers/TAO\n"; + + $release_files .= ' ACE_wrappers/TAO'; + } + $status = &create_kit (); + unless ($status) { + &diff (); + } + + if ("$ace_tag" || "$tao_tag") { + &ex ("$rm -r $stage_dir") && + warn "$0: failed to remove $stage_dir\n"; + } } &cleanup; @@ -197,7 +314,7 @@ sub check_workspace () { chdir 'ACE_wrappers/TAO' || die "$0: unable to chdir ACE_wrappers/TAO\n"; } - if (! "$exec_prefix" && @out_of_date) { + if (@out_of_date) { warn "ERROR: workspace must be updated (with cvs -q up -d) or " . "cleaned:\n " . join ("\n ", @out_of_date) . "\n"; @@ -255,7 +372,7 @@ sub get_versions () { print "new $KIT version: $version\n"; if ($kit =~ /tao/) { - $ace_minor_version = $ace_beta_version = 0; + my $ace_major_version = my $ace_minor_version = my $ace_beta_version = 0; open (ACE_VERSION, '< ../VERSION') || die "$0: unable to open ../VERSION\n"; while (<ACE_VERSION>) { @@ -292,49 +409,55 @@ sub get_versions () { ######## Update VERSION file(s). ######## sub update_version_files () { - system ("$exec_prefix" . - "perl -pi -e 's/$KIT version .*/$KIT version $version, released $now./' " . - "VERSION $exec_suffix"); + &ex ("perl -pi -e " . + "'s/$KIT version .*/$KIT version $version, released $now./' VERSION"); return 1 if $? >> 8; - system ("$exec_prefix" . - "perl -pi -e 's/$KIT VERSION:.*/$KIT VERSION: $version/' " . - "PROBLEM-REPORT-FORM $exec_suffix"); + &ex ("perl -pi -e 's/$KIT VERSION:.*/$KIT VERSION: $version/' " . + "PROBLEM-REPORT-FORM"); return 1 if $? >> 8; - if (! "$exec_prefix" && $kit =~ /^tao/) { - system ("$exec_prefix" . - "perl -pi -e 's/ACE VERSION:.*/ACE VERSION: $ace_version/' " . - "PROBLEM-REPORT-FORM $exec_suffix"); + if ($kit =~ /^tao/) { + &ex ("perl -pi -e 's/ACE VERSION:.*/ACE VERSION: $ace_version/' " . + "PROBLEM-REPORT-FORM"); return 1 if $? >> 8; - open (TAO_VERSION_H, "> tao/Version.h") || - die "$0: unable to open tao/Version.h\n"; - - print TAO_VERSION_H - "// \$Id\$\n" . - "// This is an automatically generated file.\n\n" . - "\#define TAO_MAJOR_VERSION ${major_version}\n" . - "\#define TAO_MINOR_VERSION ${minor_version}\n" . - "\#define TAO_BETA_VERSION ${beta_version}\n" . - "\#define TAO_VERSION \"${version}\"\n"; - - close TAO_VERSION_H; + if ("$exec_prefix") { + print "TAO version ${major_version}.${minor_version}.${beta_version}\n"; + } else { + open (TAO_VERSION_H, "> tao/Version.h") || + die "$0: unable to open tao/Version.h\n"; + + print TAO_VERSION_H + "// \$Id\$\n" . + "// This is an automatically generated file.\n\n" . + "\#define TAO_MAJOR_VERSION ${major_version}\n" . + "\#define TAO_MINOR_VERSION ${minor_version}\n" . + "\#define TAO_BETA_VERSION ${beta_version}\n" . + "\#define TAO_VERSION \"${version}\"\n"; + + close TAO_VERSION_H; + } } - if (! "$exec_prefix" && $kit =~ /^ace/) { - open (ACE_VERSION_H, "> ace/Version.h") || - die "$0: unable to open ace/Version.h\n"; - - print ACE_VERSION_H - "// \$Id\$\n" . - "// This is an automatically generated file.\n\n" . - "\#define ACE_MAJOR_VERSION ${major_version}\n" . - "\#define ACE_MINOR_VERSION ${minor_version}\n" . - "\#define ACE_BETA_VERSION ${beta_version}\n" . - "\#define ACE_VERSION \"${version}\"\n"; - - close ACE_VERSION_H; + if ($kit =~ /^ace/) { + if ("$exec_prefix") { + print "ACE version ${major_version}.${minor_version}.${beta_version}\n"; + } else { + + open (ACE_VERSION_H, "> ace/Version.h") || + die "$0: unable to open ace/Version.h\n"; + + print ACE_VERSION_H + "// \$Id\$\n" . + "// This is an automatically generated file.\n\n" . + "\#define ACE_MAJOR_VERSION ${major_version}\n" . + "\#define ACE_MINOR_VERSION ${minor_version}\n" . + "\#define ACE_BETA_VERSION ${beta_version}\n" . + "\#define ACE_VERSION \"${version}\"\n"; + + close ACE_VERSION_H; + } } 0; @@ -350,29 +473,24 @@ sub update_changelog () { my $signature = $ENV{'SIGNATURE'} || $logname; my $message = "$now $signature <$logname\\\@cs.wustl.edu>\n\n" . " * $KIT version $version released.\n\n"; - my $message_insert = - "perl -pi -e 'BEGIN {\$message_printed = 0;} - if (! \$message_printed) { - print \"$message\"; - ++\$message_printed; }' ChangeLog"; - if ("$exec_prefix") { - print "$message_insert\n"; - } else { - system ($message_insert); - } + &ex ("perl -pi -e 'BEGIN {\$message_printed = 0;} + if (! \$message_printed) { + print \"$message\"; + ++\$message_printed; + }' ChangeLog"); + return 1 if $? >> 8; + my $version_h; if ($kit =~ /^ace/) { - system ("$cvs commit -m'$version' " . - "VERSION PROBLEM-REPORT-FORM ChangeLog ace/Version.h " . - "&& chmod 0644 VERSION PROBLEM-REPORT-FORM ChangeLog " . - "ace/Version.h"); + $version_h = 'ace/Version.h'; } elsif ($kit =~ /tao/) { - system ("$cvs commit -m'$version' VERSION PROBLEM-REPORT-FORM ChangeLog " . - "tao/Version.h " . - "&& chmod 0644 VERSION PROBLEM-REPORT-FORM ChangeLog " . - "tao/Version.h"); + $version_h = 'tao/Version.h'; } + + &ex ("$cvs commit -m'$version' " . + "VERSION PROBLEM-REPORT-FORM ChangeLog $version_h && " . + "chmod 0644 VERSION PROBLEM-REPORT-FORM ChangeLog $version_h"); return 1 if $? >> 8; 0; @@ -388,7 +506,7 @@ sub tag () { $tag =~ tr/./_/; print "start tagging $tag\n"; - system ("$cvs -q tag $tag $controlled_files > /dev/null"); + &ex ("$cvs -q tag $tag $controlled_files > /dev/null"); return 1 if $? >> 8; print "finished tagging $tag\n"; @@ -405,7 +523,6 @@ sub diff () { my $previous_tag = "$KIT-$previous_version"; my $tag = "$KIT-$version"; - my $diffs_dir = "$kit" eq 'ace' ? 'diffs' : '../diffs'; #### cvs tag does not allow dots. $previous_tag =~ tr/./_/; @@ -413,18 +530,11 @@ sub diff () { my $module = "$kit" eq 'ace' ? 'ACE_wrappers' : 'ACE_wrappers/TAO'; - if ("$exec_prefix") { - print "nice -15 $cvs -q rdiff -u -r $previous_tag -r $tag " . - "$module 2>/dev/null | " . - "nice -15 sed 's%ACE_wrappers-repository/%ACE_wrappers/%g' | " . - "nice -15 $gzip -9 > $diffs_dir/$previous_tag-$tag.diff.gz &"; - } else { - system ("sleep 60; " . - "nice -15 $cvs -q rdiff -u -r $previous_tag -r $tag " . - "$module 2>/dev/null | " . - "nice -15 sed 's%ACE_wrappers-repository/%ACE_wrappers/%g' | " . - "nice -15 $gzip -9 > $diffs_dir/$previous_tag-$tag.diff.gz &"); - } + &ex ("sleep 60; nice -15 $cvs -q rdiff -u -r $previous_tag -r $tag " . + "$module 2>/dev/null | " . + "nice -15 sed 's%ACE_wrappers-repository/%ACE_wrappers/%g' | " . + "nice -15 $gzip -9 > $diffs_dir/$previous_tag-$tag.diff.gz") + if -d "$diffs_dir"; } #### Ignore return value. No promises on diffs. @@ -436,52 +546,88 @@ sub diff () { ######## Create the tar file(s) and move to their proper location. ######## sub create_kit () { - if ("$exec_prefix") { - print "chdir '..'\n"; + my $dest; + + if ($install) { + $dest = "$export_dir"; } else { - chdir '..' || die "$0: unable to chdir ..\n"; + $dest = 'ACE_wrappers/'; } # These files don't get LF->CRLF conversions done when making the zip. - $bin_files = - "\"\\.dsp|\\.dsw|\\.mak|\\.mdp|\\.ide|\\.exe\|\\.ico\|\\.gz\|\\.zip\|\\.gif\""; - - if ($kit eq 'ace') { - system ("$exec_prefix" . - "/bin/rm -f ACE.zip ACE-lib.zip; " . - "$find $release_files $release_filter | " . - "$egrep $bin_files | " . - "zip ACE.zip -q9@ &&" . - "$find $release_files $release_filter | " . - "$egrep -v $bin_files | " . - "zip ACE.zip -qlg9@ &&" . - "$find $release_lib_files $release_filter | " . - "$egrep $bin_files | " . - "zip ACE-lib.zip -q9@ &&" . - "$find $release_lib_files $release_filter | " . - "$egrep -v $bin_files | " . - "zip ACE-lib.zip -qlg9@ &&" . - "$find $release_files $release_filter | $cpio -o -H tar | " . - "$gzip -9 > ACE.tar.gz && " . - "$find $release_lib_files $release_filter | $cpio -o -H tar | " . - "$gzip -9 > ACE-lib.tar.gz && " . - "$chmod a+r ACE.tar.gz ACE-lib.tar.gz ACE.zip ACE-lib.zip && " . - "$mv ACE.zip ACE-lib.zip ACE_wrappers/ &&" . - "$mv ACE.tar.gz ACE-lib.tar.gz ACE_wrappers/ $exec_suffix"); - } elsif ($kit eq 'ace+tao') { - system ("$exec_prefix" . - "/bin/rm -f ACE+TAO.zip; " . - "$find $release_files $release_filter | " . - "$egrep $bin_files | " . - "zip ACE+TAO.zip -q9@ &&" . - "$find $release_files $release_filter | " . - "$egrep -v $bin_files | " . - "zip ACE+TAO.zip -qlg9@ &&" . - "$find $release_files $release_filter | $cpio -o -H tar | " . - "$gzip -9 > ACE+TAO.tar.gz && " . - "$chmod a+r ACE+TAO.tar.gz ACE+TAO.zip && " . - "$mv ACE+TAO.tar.gz ACE+TAO.zip ACE_wrappers/ $exec_suffix"); + my $bin_files = + "\"\\.dsp|\\.dsw|\\.mak|\\.mdp|\\.ide|\\.exe\|\\.ico\|\\.gz\|\\.zip\|" . + "\\.gif\""; + + my $build_command; + + if ($kit eq 'ace' || $kit eq 'ace+tao') { + if ("$create_zips") { + $build_command = + "$rm ACE.zip ACE-lib.zip; " . + "$find $release_files $release_filter | $egrep $bin_files | " . + "zip ACE.zip -q9@ &&" . + "$find $release_files $release_filter | $egrep -v $bin_files | " . + "zip ACE.zip -qlg9@ &&" . + "$find $release_lib_files $release_filter | $egrep $bin_files | " . + "zip ACE-lib.zip -q9@ &&" . + "$find $release_lib_files $release_filter | $egrep -v $bin_files | " . + "zip ACE-lib.zip -qlg9@ &&" . + "$find $release_files $release_filter | $cpio -o -H tar | " . + "$gzip -9 > ACE.tar.gz && " . + "$find $release_lib_files $release_filter | $cpio -o -H tar | " . + "$gzip -9 > ACE-lib.tar.gz && " . + "$chmod a+r ACE.tar.gz ACE-lib.tar.gz ACE.zip ACE-lib.zip && " . + "$mv -f ACE.zip ACE-lib.zip $dest &&" . + "$mv -f ACE.tar.gz ACE-lib.tar.gz $dest"; + } else { + $build_command = + "$find $release_files $release_filter | $cpio -o -H tar | " . + "$gzip -9 > ACE.tar.gz && " . + "$find $release_lib_files $release_filter | $cpio -o -H tar | " . + "$gzip -9 > ACE-lib.tar.gz && " . + "$chmod a+r ACE.tar.gz ACE-lib.tar.gz && " . + "$mv -f ACE.tar.gz ACE-lib.tar.gz $dest"; + } + } + + if ($kit eq 'ace+tao') { + if ("$create_zips") { + $build_command = + "$rm ACE+TAO.zip; " . + "$find $release_files $release_filter | $egrep $bin_files | " . + "zip ACE+TAO.zip -q9@ &&" . + "$find $release_files $release_filter | $egrep -v $bin_files | " . + "zip ACE+TAO.zip -qlg9@ &&" . + "$find $release_files $release_filter | $cpio -o -H tar | " . + "$gzip -9 > ACE+TAO.tar.gz && " . + "$chmod a+r ACE+TAO.tar.gz ACE+TAO.zip && " . + "$mv -f ACE+TAO.tar.gz ACE+TAO.zip $dest"; + } else { + $build_command = + "$find $release_files $release_filter | $cpio -o -H tar | " . + "$gzip -9 > ACE+TAO.tar.gz && " . + "$chmod a+r ACE+TAO.tar.gz && " . + "$mv -fACE+TAO.tar.gz $dest"; + } } - 0; + &ex ($build_command); +} + + +######## +######## Execute a command, unless -n had been specified. Return value +######## of 0 indicates success. +######## +sub ex () +{ + my ($command) = @_; + + if ("$exec_prefix") { + print $command . "\n"; + 0; + } else { + system ("$command"); + } } |