make-release: Create output directory if needed 15/14115/5
authorMichael Meffie <mmeffie@sinenomine.net>
Fri, 27 Mar 2020 15:29:24 +0000 (11:29 -0400)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 19 Jun 2020 00:57:54 +0000 (20:57 -0400)
Automatically create the --dir directory if it does not already exist,
which makes this script slightly easier to use. Remove the now
uneeded mkdir from the top-level makefile.

Change-Id: I1f4561120a70263b0b2b194e65fec55fb5666f40
Reviewed-on: https://gerrit.openafs.org/14115
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>

Makefile.in
build-tools/make-release

index 49298f2..c647888 100644 (file)
@@ -781,7 +781,6 @@ clean2:
        -/bin/rm -rf libafs_tree ${SYS_NAME}
 
 dist:
-       mkdir -p packages
        ./build-tools/make-release --dir=packages HEAD
 
 srpm:
index 34a23ea..0617d28 100755 (executable)
@@ -57,6 +57,9 @@ system ("git archive --format=tar --prefix=$name/ $tagName ".
         " | tar -C $tempDir -x") == 0
     or die "Git archive failed with: $?";
 
+# Make the output path, if not already present.
+File::Path::mkpath($outDir);
+
 # Construct the ChangeLog
 if ($last) {
     system("git log $last..$tagName > $outDir/ChangeLog");
@@ -167,7 +170,7 @@ changes between I<object> and the current tag
 =item B<--dir> I<directory>
 
 Instead of generating all of the output in the current directory, place it
-in <directory>, which must already exist.
+in <directory>, which is created if it does not already exist.
 
 =item B<--tagpoint> I<commit|branch>