2007-04-12 20:07:50 +00:00
|
|
|
#
|
|
|
|
#
|
2007-08-16 22:11:01 +00:00
|
|
|
OVERRIDE_TARBALL=yes
|
2007-04-12 20:07:50 +00:00
|
|
|
|
|
|
|
include common/Make.rules
|
|
|
|
|
|
|
|
DIRS=parser \
|
|
|
|
profiles \
|
|
|
|
utils \
|
|
|
|
changehat/libapparmor \
|
|
|
|
changehat/mod_apparmor \
|
|
|
|
changehat/pam_apparmor \
|
|
|
|
tests
|
|
|
|
|
2011-02-16 09:41:14 -08:00
|
|
|
REPO_URL?=lp:apparmor
|
2010-10-07 15:25:21 -07:00
|
|
|
# alternate possibilities to export from
|
|
|
|
#REPO_URL=.
|
|
|
|
#REPO_URL="bzr+ssh://bazaar.launchpad.net/~sbeattie/+junk/apparmor-dev/"
|
|
|
|
|
|
|
|
RELEASE_DIR=apparmor-${VERSION}
|
2011-02-08 07:05:39 -08:00
|
|
|
__SETUP_DIR?=.
|
2007-04-12 20:07:50 +00:00
|
|
|
|
2007-08-16 22:11:01 +00:00
|
|
|
.PHONY: tarball
|
2010-10-07 15:25:21 -07:00
|
|
|
tarball: clean
|
2010-10-18 12:12:37 -07:00
|
|
|
REPO_VERSION=`$(value REPO_VERSION_CMD)` ; \
|
|
|
|
make export_dir __EXPORT_DIR=${RELEASE_DIR} __REPO_VERSION=$${REPO_VERSION} ; \
|
|
|
|
make setup __SETUP_DIR=${RELEASE_DIR} ; \
|
2011-04-18 18:09:29 -07:00
|
|
|
tar --exclude deprecated -cvzf ${RELEASE_DIR}.tar.gz ${RELEASE_DIR}
|
2007-08-16 22:11:01 +00:00
|
|
|
|
2010-10-07 15:25:21 -07:00
|
|
|
.PHONY: snapshot
|
|
|
|
snapshot: clean
|
2010-10-18 12:12:37 -07:00
|
|
|
REPO_VERSION=`$(value REPO_VERSION_CMD)` ; \
|
2011-02-16 09:41:14 -08:00
|
|
|
SNAPSHOT_DIR=apparmor-${VERSION}~$${REPO_VERSION} ;\
|
2010-10-18 12:12:37 -07:00
|
|
|
make export_dir __EXPORT_DIR=$${SNAPSHOT_DIR} __REPO_VERSION=$${REPO_VERSION} ; \
|
|
|
|
make setup __SETUP_DIR=$${SNAPSHOT_DIR} ; \
|
2011-04-18 18:09:29 -07:00
|
|
|
tar --exclude deprecated -cvzf $${SNAPSHOT_DIR}.tar.gz $${SNAPSHOT_DIR} ;
|
2007-08-16 22:11:01 +00:00
|
|
|
|
|
|
|
|
2010-10-07 15:25:21 -07:00
|
|
|
.PHONY: export_dir
|
|
|
|
export_dir:
|
|
|
|
mkdir $(__EXPORT_DIR)
|
2011-02-24 01:32:08 -08:00
|
|
|
/usr/bin/bzr export --per-file-timestamps -r $(__REPO_VERSION) $(__EXPORT_DIR) $(REPO_URL)
|
2010-10-18 12:12:37 -07:00
|
|
|
echo "$(REPO_URL) $(__REPO_VERSION)" > $(__EXPORT_DIR)/common/.stamp_rev
|
2007-08-16 22:11:01 +00:00
|
|
|
|
2010-10-07 15:25:21 -07:00
|
|
|
.PHONY: clean
|
2007-04-12 20:07:50 +00:00
|
|
|
clean:
|
2011-02-16 09:41:14 -08:00
|
|
|
-rm -rf ${RELEASE_DIR} ./apparmor-${VERSION}~*
|
[v2: added clean-ups, backed off on some of the build silencing]
This is a rather large rearrangement of how a subset of the parser global
variables are defined. Right now, there are unit tests built without
linking against parser_main.c. As a result, none of the globals defined in
parser_main.c could be used in the code that is built for unit tests
(misc, regex, symtab, variable). To get a clean build, either stubs needed
to be added to "#ifdef UNIT_TEST" blocks in each .c file, or we had to
depend on link-time optimizations that would throw out the unused routines.
First, this is a problem because all the compile-time warnings had to be
explicitly silenced, so reviewing the build logs becomes difficult on
failures, and we can potentially (in really unlucky situations) test
something that isn't actually part of the "real" parser.
Second, not all compilers will allow this kind of linking (e.g. mips gcc),
and the missing symbols at link time will fail the entire build even though
they're technically not needed.
To solve all of this, I've moved all of the global variables used in lex,
yacc, and main to parser_common.c, and adjusted the .h files. On top of
this, I made sure to fully link the tst builds so all symbols are resolved
(including aare lib) and removedonly tst build-log silencing (for now,
deferring to another future patchset to consolidate the build silencing).
Signed-off-by: Kees Cook <kees.cook@canonical.com>
2011-05-13 02:12:49 -07:00
|
|
|
for dir in $(DIRS); do \
|
|
|
|
make -C $$dir clean; \
|
|
|
|
done
|
2010-10-07 15:25:21 -07:00
|
|
|
|
|
|
|
.PHONY: setup
|
|
|
|
setup:
|
|
|
|
cd $(__SETUP_DIR)/libraries/libapparmor && ./autogen.sh
|
2010-10-07 15:33:11 -07:00
|
|
|
|
|
|
|
.PHONY: tag
|
|
|
|
tag:
|
|
|
|
bzr tag apparmor_${VERSION}
|