]> rtime.felk.cvut.cz Git - orte.git/commitdiff
Modularize make dist target
authorMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 17 Sep 2013 09:18:23 +0000 (11:18 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 17 Sep 2013 09:18:23 +0000 (11:18 +0200)
Makefile.cvs
Makefile.omk

index 55da366ce9acf90b6e4c06d1786ac0f28832b4f2..37a650a0f3a23889b79a8ff8e736761b4f73081d 100644 (file)
@@ -10,8 +10,17 @@ all:
        automake
        autoconf
 
-dist: VER=$(shell git describe --match='v[0-9]*' | sed -e 's/^v\(.*\)/\1/')
+.PHONY: default cvs all dist dist-tarball
+
+VER=$(shell git describe --match='v[0-9]*' | sed -e 's/^v\(.*\)/\1/')
+
 dist:
+       $(MAKE) VER=$(VER) dist-tarball dist-check
+       @echo "Tarball stored as orte-$(VER).tar.gz"
+
+dist-tarball: orte-$(VER).tar.gz
+
+orte-$(VER).tar.gz: $(shell git ls-files)
 # Export clean sources and run autoreconf
        test ! -d orte-$(VER)
        git archive --format=tar --prefix=orte-$(VER)/ HEAD | tar x
@@ -24,12 +33,15 @@ dist:
        cp orte-$(VER)-doc/doc/orteman.pdf orte-$(VER)/doc
        rm -rf orte-$(VER)-doc
 # Create tarball
-       tar czf orte-$(VER).tar.gz orte-$(VER)
+       tar czf $@ orte-$(VER)
+       rm -rf orte-$(VER)
+       @echo "Tarball stored as orte-$(VER).tar.gz"
+
+dist-check: orte-$(VER).tar.gz
+       tar xf $<
 # Check that we can compile the content of the tarball
        mkdir orte-$(VER)/_build
        cd orte-$(VER)/_build && ../configure && make V=0
        mkdir orte-$(VER)/_win
        cd orte-$(VER)/_win && ../configure --host=i686-w64-mingw32 CC=i686-w64-mingw32-gcc && make V=0
-# Done
        rm -rf orte-$(VER)
-       @echo "Tarball stored as orte-$(VER).tar.gz"
index 9f55536fcfa3e960ccf688505a7b509dd2acd7eb..e9c54718e3221cf84e08d4b149828f49dcbf4b00 100644 (file)
@@ -1 +1,4 @@
 SUBDIRS = orte
+
+dist:
+       $(MAKE) -f Makefile.cvs dist