From a7b52e44e3a04edbcabf4fb52fac9f10a2589523 Mon Sep 17 00:00:00 2001 From: Steve Beattie Date: Thu, 16 Aug 2007 22:11:01 +0000 Subject: [PATCH] Vaguely make the toplevel target 'make tarball' work. It's good (if slow) for getting a clean export of the source. But too many of the packages make some assumptions that they're in a checked out svn tree that a lot of the auto-rpm building infrastructure breaks. Use at your own risk. --- Makefile | 20 ++++++++++++++++---- common/Make.rules | 2 ++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index f4ec9cf0a..4112d26b5 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ # # $Id$ # +OVERRIDE_TARBALL=yes include common/Make.rules @@ -10,17 +11,28 @@ DIRS=parser \ changehat/libapparmor \ changehat/mod_apparmor \ changehat/pam_apparmor \ + management/apparmor-dbus \ + management/applets/apparmorapplet-gnome \ management/yastui \ common \ tests RELEASE_DIR=apparmor-${VERSION}-${REPO_VERSION} -_dist: clean +.PHONY: tarball +tarball: _dist + tar cvzf ${RELEASE_DIR}.tar.gz ${RELEASE_DIR} + +${RELEASE_DIR}: mkdir ${RELEASE_DIR} - for dir in ${DIRS} ; do \ - svn export -r $(REPO_VERSION) $(REPO_URL)/$${dir} $(RELEASE_DIR)/$${dir} ; \ - done + +.PHONY: _dist +.PHONY: ${DIRS} + +_dist: clean ${DIRS} +${DIRS}: ${RELEASE_DIR} + svn export -r $(REPO_VERSION) $(REPO_URL)/$@ $(RELEASE_DIR)/$@ ; \ + clean: -rm -rf ${RELEASE_DIR} diff --git a/common/Make.rules b/common/Make.rules index 184a9e14e..3ecaed0d2 100644 --- a/common/Make.rules +++ b/common/Make.rules @@ -140,8 +140,10 @@ ${TARBALL}: clean ${SPECFILE} $(TAR) -f $@ $(RELEASE_DIR) rm -rf $(RELEASE_DIR) +ifndef OVERRIDE_TARBALL .PHONY: tarball tarball: clean $(TARBALL) +endif .PHONY: dist dist: clean $(SPECFILE)