Fix configurations such as 'dist' and tar building
authorRichard Levitte <levitte@openssl.org>
Tue, 8 Mar 2016 10:49:26 +0000 (11:49 +0100)
committerRichard Levitte <levitte@openssl.org>
Tue, 8 Mar 2016 11:32:00 +0000 (12:32 +0100)
For config targets such as 'dist', which doesn't have a BASE template,
we still need to have a default build scheme.

Additionally, the unified Makefile template's target 'tar' wasn't
quite as flexible as the unixmake one.

Finally, .travis-create-release.sh can be somewhat simplified now that
it builds with the unified build scheme.

Reviewed-by: Matt Caswell <matt@openssl.org>
.travis-create-release.sh
Configurations/00-base-templates.conf
Configurations/unix-Makefile.tmpl

index a153a928b87afbbd532844a6f174cd391aa5daf8..08dcf18f403305f979c102b7c50ee0b02c52e7b4 100644 (file)
@@ -5,8 +5,7 @@
 ./Configure dist
 if [ "$1" == osx ]; then
     make NAME='_srcdist' TARFLAGS='-n' TARFILE='_srcdist.tar' \
-        TAR_COMMAND='$(TAR) $(TARFLAGS) -s "|^|$(NAME)/|" -T $(TARFILE).list -cvf -' \
-        SHELL='sh -vx' tar
+        TAR_COMMAND='$(TAR) $(TARFLAGS) -cvf -' tar
 else
-    make TARFILE='_srcdist.tar' NAME='_srcdist' SHELL='sh -v' dist
+    make TARFILE='_srcdist.tar' NAME='_srcdist' dist
 fi
index b7dcde0b68d70ff6b9d8cd1e09c9d8d8c2af9218..026cdab077b57d5a1e9b89fd6a09b4d841087e0e 100644 (file)
@@ -35,6 +35,9 @@
        shared_ldflag   => "",
        shared_rcflag   => "",
        shared_extension        => "",
+
+        build_scheme    => [ "unified", "unix" ],
+        build_file      => "Makefile",
     },
 
     BASE_common => {
index 226f5bdfa88d46257570e403cbe55183e0178dcd..9f4c1f228f6c995ea7300cc9307b08a30b5a1529 100644 (file)
@@ -660,9 +660,11 @@ tags TAGS: FORCE
 
 # Release targets (note: only available on Unix) #####################
 
+TAR_COMMAND=$(TAR) $(TARFLAGS) --owner 0 --group 0 -cvf - 
+PREPARE_CMD=:
 tar:
        TMPDIR=/var/tmp/openssl-copy.$$$$; \
-       DISTDIR=openssl-$(VERSION); \
+       DISTDIR=$(NAME); \
        mkdir -p $$TMPDIR/$$DISTDIR; \
        (cd $(SRCDIR); \
         git ls-tree -r --name-only --full-tree HEAD \
@@ -671,11 +673,11 @@ tar:
               cp $$F $$TMPDIR/$$DISTDIR/$$F; \
           done); \
        (cd $$TMPDIR; \
-        [ -n "$(PREPARE_CMD)" ] && $(PREPARE_CMD); \
+        $(PREPARE_CMD); \
         find $$TMPDIR/$$DISTDIR -type d -print | xargs chmod 755; \
         find $$TMPDIR/$$DISTDIR -type f -print | xargs chmod a+r; \
         find $$TMPDIR/$$DISTDIR -type f -perm -0100 -print | xargs chmod a+x; \
-        $(TAR) $(TARFLAGS) --owner 0 --group 0 -cvf - $$DISTDIR) \
+        $(TAR_COMMAND) $$DISTDIR) \
        | (cd $(SRCDIR); gzip --best > $(TARFILE).gz); \
        rm -rf $$TMPDIR
        cd $(SRCDIR); ls -l $(TARFILE).gz