Commit f19eb31f authored by Steve Beattie's avatar Steve Beattie

Entire tree: makefile cruft removal

- drop the symlink magic of the common/ directory, and just include
  files directly from there.
- update comments indicating required steps to take when including
  common/Make.rules
- drop make clean steps that refer to no longer generated tarballs,
  specfiles, and symlinks to the common directory/Make.rules.
- don't silence clean steps if VERBOSE is set
Signed-off-by: Steve Beattie's avatarSteve Beattie <steve@nxnw.org>
Acked-by: Christian Boltz's avatarChristian "Ghostbuster" Boltz <apparmor@cboltz.de>
parent 0da2be84
......@@ -7,7 +7,8 @@ all:
@echo "*** See README for information how to build AppArmor ***"
exit 1
include common/Make.rules
COMMONDIR=common
include ${COMMONDIR}/Make.rules
DIRS=parser \
profiles \
......
......@@ -17,13 +17,7 @@ NAME:=apache2-mod_apparmor
all:
COMMONDIR=../../common/
include common/Make.rules
COMMONDIR_EXISTS=$(strip $(shell [ -d ${COMMONDIR} ] && echo true))
ifeq ($(COMMONDIR_EXISTS), true)
common/Make.rules: $(COMMONDIR)/Make.rules
ln -sf $(COMMONDIR) .
endif
include $(COMMONDIR)/Make.rules
TARGET:=mod_apparmor.so
MANPAGES=mod_apparmor.8
......@@ -94,7 +88,7 @@ install: ${TARGET} ${MANPAGES}
.PHONY: clean
clean: _clean
rm -rf .libs
rm -f *.la *.lo *.so *.o *.slo Make.rules
rm -f *.la *.lo *.so *.o *.slo
.PHONY: check
check: check_pod_files
......@@ -16,15 +16,8 @@
NAME=pam_apparmor
all:
COMMONDIR=../../common/
MAKE_RULES=common/Make.rules
include ${MAKE_RULES}
COMMONDIR_EXISTS=$(strip $(shell [ -d ${COMMONDIR} ] && echo true))
ifeq ($(COMMONDIR_EXISTS), true)
common/Make.rules: $(COMMONDIR)/Make.rules
ln -sf $(COMMONDIR) .
endif
include $(COMMONDIR)/Make.rules
ifdef USE_SYSTEM
LIBAPPARMOR = $(shell if pkg-config --exists libapparmor ; then \
......@@ -87,7 +80,5 @@ install: $(NAME).so
install -m 555 $(NAME).so $(SECDIR)/
.PHONY: clean
clean: ${MAKE_RULES}
clean:
rm -f core core.* *.so *.o *.s *.a *~
rm -f ${NAME}-*.tar.gz Make.rules
......@@ -17,13 +17,7 @@ NAME = tomcat_apparmor
all:
COMMONDIR=../../../common/
include common/Make.rules
COMMONDIR_EXISTS=$(strip $(shell [ -d ${COMMONDIR} ] && echo true))
ifeq ($(COMMONDIR_EXISTS), true)
common/Make.rules: $(COMMONDIR)/Make.rules
ln -sf $(COMMONDIR) .
endif
include $(COMMONDIR)/Make.rules
LIB = lib
CATALINA_HOME = /usr/share/tomcat5
......@@ -34,7 +28,6 @@ all:
clean:
ant clean
rm -f tomcat_apparmor.spec ${NAME}-*.tar.gz Make.rules
install: $(SPECFILE)
install:
ant -Dversion=$(VERSION) -Drelease=$(MAN_RELEASE) -Dcatalina_home=${CATALINA_HOME} -Dinstall_lib=${LIB} install_jar install_jni
......@@ -17,13 +17,7 @@ NAME = tomcat_apparmor
all:
COMMONDIR=../../../common/
include common/Make.rules
COMMONDIR_EXISTS=$(strip $(shell [ -d ${COMMONDIR} ] && echo true))
ifeq ($(COMMONDIR_EXISTS), true)
common/Make.rules: $(COMMONDIR)/Make.rules
ln -sf $(COMMONDIR) .
endif
include $(COMMONDIR)/Make.rules
LIB = lib
CATALINA_HOME = /usr/share/tomcat55
......@@ -34,7 +28,6 @@ all:
clean:
ant clean
rm -f tomcat_apparmor.spec ${NAME}-*.tar.gz Make.rules
install: $(SPECFILE)
install:
ant -Dversion=$(VERSION) -Drelease=$(MAN_RELEASE) -Dcatalina_home=${CATALINA_HOME} -Dinstall_lib=${LIB} install_jar install_jni
......@@ -15,14 +15,13 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, contact Novell, Inc.
# ------------------------------------------------------------------
# Make.rules - common make targets and variables for building the SHASS
# product.
# Make.rules - common make targets and variables for building AppArmor
#
# NOTES:
# - must define the package NAME before including this file.
# - After checking in to cvs, you'll need to delele the hardlinked
# Make.rules files that already exist in the individual application
# directories
# Before including this file in your Makefile, you should
# - define COMMONDIR (the location of the common/ directory)
# - define the default rule (usually 'all:'). (Note: you can redefine
# it later in your Makefile)
.PHONY: common_Make.rules_is_a_bad_target
common_Make.rules_is_a_bad_target:
......@@ -30,7 +29,7 @@ common_Make.rules_is_a_bad_target:
exit 1
DISTRIBUTION=AppArmor
VERSION=$(shell cat common/Version)
VERSION=$(shell cat $(COMMONDIR)/Version)
# Convenience functions
pathsearch = $(firstword $(wildcard $(addsuffix /$(1),$(subst :, ,$(PATH)))))
......@@ -175,9 +174,10 @@ $(BUILDRPMSUBDIRS):
mkdir -p $(BUILDRPMSUBDIRS)
.PHONY: _clean
ifndef VERBOSE
.SILENT: _clean
endif
_clean:
-[ -z "${NAME}" ] || rm -f ${NAME}-${VERSION}-*.tar.gz
-rm -f ${MANPAGES} *.[0-9].gz ${HTMLMANPAGES} pod2htm*.tmp
# =====================
......
......@@ -24,13 +24,7 @@ NAME = apparmor-utils
all:
COMMONDIR=../../common/
include common/Make.rules
COMMONDIR_EXISTS=$(strip $(shell [ -d ${COMMONDIR} ] && echo true))
ifeq ($(COMMONDIR_EXISTS), true)
common/Make.rules: $(COMMONDIR)/Make.rules
ln -sf $(COMMONDIR) .
endif
include $(COMMONDIR)/Make.rules
MODDIR = Immunix
PERLTOOLS = aa-genprof aa-logprof aa-autodep aa-audit aa-complain aa-enforce \
......@@ -58,7 +52,6 @@ ifndef VERBOSE
endif
clean: _clean
rm -f core core.* *.o *.s *.a *~
rm -f Make.rules
rm -rf staging/ build/
.PHONY: check
......
......@@ -18,13 +18,7 @@ NAME=apparmor-parser
all:
COMMONDIR=../common/
include common/Make.rules
COMMONDIR_EXISTS=$(strip $(shell [ -d ${COMMONDIR} ] && echo true))
ifeq ($(COMMONDIR_EXISTS), true)
common/Make.rules: $(COMMONDIR)/Make.rules
ln -sf $(COMMONDIR) .
endif
include $(COMMONDIR)/Make.rules
DESTDIR=/
APPARMOR_BIN_PREFIX=${DESTDIR}/lib/apparmor
......@@ -357,7 +351,9 @@ install-indep:
$(MAKE) -C po install NAME=${NAME} DESTDIR=${DESTDIR}
$(MAKE) install_manpages DESTDIR=${DESTDIR}
ifndef VERBOSE
.SILENT: clean
endif
.PHONY: clean
clean: _clean
rm -f core core.* *.o *.s *.a *~ *.gcda *.gcno
......@@ -373,7 +369,6 @@ clean: _clean
$(MAKE) -s -C $(AAREDIR) clean
$(MAKE) -s -C po clean
$(MAKE) -s -C tst clean
rm -f common
.SILENT: dist_clean
dist_clean:
......
......@@ -12,9 +12,8 @@ all:
DISABLED_LANGS=
include ../common/Make-po.rules
../common/Make-po.rules:
make -C .. common/Make.rules
COMMONDIR=../../common
include $(COMMONDIR)/Make-po.rules
XGETTEXT_ARGS+=--language=C --keyword=_ $(shell if [ -f ${NAME}.pot ] ; then echo -n -j ; fi)
......@@ -20,16 +20,10 @@
# Makefile for LSM-based AppArmor profiles
NAME=apparmor-profiles
ALL: local
all: local
COMMONDIR=../common/
include common/Make.rules
COMMONDIR_EXISTS=$(strip $(shell [ -d ${COMMONDIR} ] && echo true))
ifeq ($(COMMONDIR_EXISTS), true)
common/Make.rules: $(COMMONDIR)/Make.rules
ln -sf $(COMMONDIR) .
endif
include $(COMMONDIR)/Make.rules
DESTDIR=/
PROFILES_DEST=${DESTDIR}/etc/apparmor.d
......@@ -63,7 +57,7 @@ install: local
LOCAL_ADDITIONS=$(filter-out ${PROFILES_SOURCE}/local/README, $(wildcard ${PROFILES_SOURCE}/local/*))
.PHONY: clean
clean:
-rm -f $(NAME)-$(VERSION)*.tar.gz Make.rules ${LOCAL_ADDITIONS} common
-rm -f ${LOCAL_ADDITIONS}
ifndef VERBOSE
Q=@
......
......@@ -18,13 +18,7 @@ NAME = apparmor-utils
all:
COMMONDIR=../common/
include common/Make.rules
COMMONDIR_EXISTS=$(strip $(shell [ -d ${COMMONDIR} ] && echo true))
ifeq ($(COMMONDIR_EXISTS), true)
common/Make.rules: $(COMMONDIR)/Make.rules
ln -sf $(COMMONDIR) .
endif
include $(COMMONDIR)/Make.rules
PERLTOOLS = aa-exec aa-notify
PYTOOLS = aa-easyprof aa-genprof aa-logprof aa-cleanprof aa-mergeprof \
......@@ -71,14 +65,12 @@ ifndef VERBOSE
endif
clean: _clean
rm -f core core.* *.o *.s *.a *~
rm -f Make.rules
$(MAKE) -C po clean
$(MAKE) -C vim clean
$(MAKE) -C test clean
rm -rf staging/ build/
rm -f apparmor/*.pyc
rm -rf apparmor/__pycache__/
rm -f common
# ${CAPABILITIES} is defined in common/Make.rules
.PHONY: check_severity_db
......
......@@ -19,9 +19,8 @@ all:
# the lang is explicitly added to DISABLED_LANGS; e.g. DISABLED_LANGS=en es
DISABLED_LANGS=
COMMONDIR=../../common
include ../common/Make-po.rules
../common/Make-po.rules:
make -C .. common/Make.rules
include $(COMMONDIR)/Make-po.rules
XGETTEXT_ARGS+=--language=perl --language=python
......@@ -18,13 +18,7 @@ NAME = apparmor-utils
all:
COMMONDIR=../../common/
include common/Make.rules
COMMONDIR_EXISTS=$(strip $(shell [ -d ${COMMONDIR} ] && echo true))
ifeq ($(COMMONDIR_EXISTS), true)
common/Make.rules: $(COMMONDIR)/Make.rules
ln -sf $(COMMONDIR) .
endif
include $(COMMONDIR)/Make.rules
COVERAGE_OMIT=test-*.py,common_test.py
ifneq ($(COVERAGE_OUT), )
......@@ -43,8 +37,8 @@ ifndef VERBOSE
.SILENT: clean check .coverage coverage coverage-report coverage-html
endif
clean: _clean
rm -rf __pycache__/ common .coverage htmlcov
clean:
rm -rf __pycache__/ .coverage htmlcov
check:
export PYTHONPATH=.. ; $(foreach test, $(wildcard test-*.py), $(call pyalldo, $(test)))
......
COMMONDIR=../../common/
all:
include common/Make.rules
COMMONDIR_EXISTS=$(strip $(shell [ -d ${COMMONDIR} ] && echo true))
ifeq ($(COMMONDIR_EXISTS), true)
common/Make.rules: $(COMMONDIR)/Make.rules
ln -sf $(COMMONDIR) .
endif
include $(COMMONDIR)/Make.rules
MANPAGES=apparmor.vim.5
VIM_INSTALL_PATH=${DESTDIR}/usr/share/apparmor
......@@ -32,4 +26,4 @@ check: check_pod_files
$(call pyalldo, create-apparmor.vim.py > /dev/null)
clean: _clean
rm -f apparmor.vim common
rm -f apparmor.vim
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment