From af33afe8f7f759c7c98d4e7f3669ecc7cf2ae81e Mon Sep 17 00:00:00 2001 From: Steve Beattie Date: Sat, 4 Nov 2006 21:34:47 +0000 Subject: [PATCH] Convert the rest of the packages to symlinking in the common directory so that 'make dist' will work. --- changehat/libapparmor/Makefile | 8 ++++---- changehat/libapparmor/libapparmor.spec.in | 2 +- changehat/mod_apparmor/Makefile | 10 +++++----- changehat/tomcat_apparmor/tomcat_5_0/Makefile | 13 +++++-------- common/Make-po.rules | 3 +-- management/yastui/Makefile | 17 +++++------------ management/yastui/src/locale/Makefile | 12 +++--------- management/yastui/src/po/Makefile | 12 +++--------- parser/Makefile | 9 +++------ parser/po/Makefile | 13 +++---------- profiles/Makefile | 8 ++++---- profiles/apparmor-profiles.spec.in | 2 +- utils/Makefile | 17 +++++++---------- utils/apparmor-utils.spec.in | 2 +- utils/po/Makefile | 13 +++---------- 15 files changed, 49 insertions(+), 92 deletions(-) diff --git a/changehat/libapparmor/Makefile b/changehat/libapparmor/Makefile index 0902d769c..f726723e8 100644 --- a/changehat/libapparmor/Makefile +++ b/changehat/libapparmor/Makefile @@ -24,12 +24,12 @@ COMMONDIR:=$(strip $(shell if [ -d "../common/" ] ; then \ echo "/common_dir_not_found" ; \ fi)) -include Make.rules +include common/Make.rules COMMONDIR_EXISTS=$(strip $(shell [ -d ${COMMONDIR} ] && echo true)) ifeq ($(COMMONDIR_EXISTS), true) -Make.rules: $(COMMONDIR)/Make.rules - ln -f $(COMMONDIR)/Make.rules . +common/Make.rules: $(COMMONDIR)/Make.rules + ln -sf $(COMMONDIR) . endif SO_VERS = 1 @@ -113,5 +113,5 @@ install: $(SPECFILE) $(TARGETS) $(OLDTARGET) .PHONY: clean clean: - rm -f *.o $(TARGET)*.so* ${TARGETS} ${OLDTARGET} + rm -f *.o $(TARGET)*.so* ${TARGETS} ${OLDTARGET} Make.rules rm -f ${NAME}-${VERSION}*.tar.gz ${TESTS} $(NAME)-*.tgz ${SPECFILE} diff --git a/changehat/libapparmor/libapparmor.spec.in b/changehat/libapparmor/libapparmor.spec.in index 8569646c8..e3a3c3654 100644 --- a/changehat/libapparmor/libapparmor.spec.in +++ b/changehat/libapparmor/libapparmor.spec.in @@ -36,7 +36,7 @@ Name: libapparmor Summary: Library to provide key AppArmor symbols Version: @@immunix_version@@ -Release: 6 +Release: @@repo_version@@ %if %distro == "suse" Group: System/Libraries %else diff --git a/changehat/mod_apparmor/Makefile b/changehat/mod_apparmor/Makefile index 45a81836c..56e9ec27c 100644 --- a/changehat/mod_apparmor/Makefile +++ b/changehat/mod_apparmor/Makefile @@ -18,12 +18,12 @@ NAME:=apache2-mod_apparmor all: COMMONDIR=../../common/ -include Make.rules +include common/Make.rules COMMONDIR_EXISTS=$(strip $(shell [ -d ${COMMONDIR} ] && echo true)) ifeq ($(COMMONDIR_EXISTS), true) -Make.rules: $(COMMONDIR)/Make.rules - ln -f $(COMMONDIR)/Make.rules . +common/Make.rules: $(COMMONDIR)/Make.rules + ln -sf $(COMMONDIR) . endif TARGET:=mod_apparmor.so @@ -55,5 +55,5 @@ install: ${TARGET} .PHONY: clean clean: - rm -rf .libs - rm -f ${NAME}*.tar.gz *.la *.lo *.so *.o *.slo + rm -rf .libs + rm -f ${NAME}*.tar.gz *.la *.lo *.so *.o *.slo Make.rules diff --git a/changehat/tomcat_apparmor/tomcat_5_0/Makefile b/changehat/tomcat_apparmor/tomcat_5_0/Makefile index 2f37a176d..ed73e2e16 100644 --- a/changehat/tomcat_apparmor/tomcat_5_0/Makefile +++ b/changehat/tomcat_apparmor/tomcat_5_0/Makefile @@ -18,27 +18,24 @@ NAME = tomcat_apparmor all: COMMONDIR=../../../common/ -include Make.rules +include common/Make.rules COMMONDIR_EXISTS=$(strip $(shell [ -d ${COMMONDIR} ] && echo true)) ifeq ($(COMMONDIR_EXISTS), true) -Make.rules: $(COMMONDIR)/Make.rules - ln -f $(COMMONDIR)/Make.rules . - -po/Make.rules: $(COMMONDIR)/Make-po.rules - make -C po Make.rules +common/Make.rules: $(COMMONDIR)/Make.rules + ln -sf $(COMMONDIR) . endif LIB = lib CATALINA_HOME = /usr/share/tomcat5 # By default build 1.4 bytecode -all: +all: ant -Dtarget=1.4 jar jni_so clean: ant clean - rm -f tomcat_apparmor.spec tomcat_apparmor-*.tar.gz + rm -f tomcat_apparmor.spec ${NAME}-*.tar.gz Make.rules install: $(SPECFILE) ant -Dversion=$(VERSION) -Drelease=$(RELEASE) -Dcatalina_home=${CATALINA_HOME} -Dinstall_lib=${LIB} install_jar install_jni diff --git a/common/Make-po.rules b/common/Make-po.rules index 886259d6d..17219af63 100644 --- a/common/Make-po.rules +++ b/common/Make-po.rules @@ -41,5 +41,4 @@ install: ${TARGET_MOS} .PHONY: clean clean: - rm -f *.mo - + rm -f *.mo Make.rules diff --git a/management/yastui/Makefile b/management/yastui/Makefile index fcb9cbbca..635ab390a 100644 --- a/management/yastui/Makefile +++ b/management/yastui/Makefile @@ -16,22 +16,15 @@ all: COMMONDIR=../../common/ THEMEDIR= -include Make.rules +include common/Make.rules COMMONDIR_EXISTS=$(strip $(shell [ -d ${COMMONDIR} ] && echo true)) ifeq ($(COMMONDIR_EXISTS), true) -Make.rules: $(COMMONDIR)/Make.rules src/locale/Make.rules src/po/Make.rules - ln -f $(COMMONDIR)/Make.rules . - -src/po/Make.rules: $(COMMONDIR)/Make-po.rules - make -C src/po Make.rules - -src/locale/Make.rules: $(COMMONDIR)/Make-po.rules - make -C src/locale Make.rules - +common/Make.rules: $(COMMONDIR)/Make.rules + ln -sf $(COMMONDIR) . endif -SUBDIRS = clients include scrconf desktop agents perl icons bin +SUBDIRS = clients include scrconf desktop agents perl icons bin .PHONY: install install: @@ -63,4 +56,4 @@ install: .PHONY: clean clean: - rm -f $(TARBALL) ${NAME}-${VERSION}-*.tar.gz + rm -f $(TARBALL) ${NAME}-${VERSION}-*.tar.gz Make.rules diff --git a/management/yastui/src/locale/Makefile b/management/yastui/src/locale/Makefile index 38d375700..c2c5b1051 100644 --- a/management/yastui/src/locale/Makefile +++ b/management/yastui/src/locale/Makefile @@ -14,17 +14,11 @@ all: # made/installed. LANGS=de_DE es_ES fr_FR hu_HU it_IT ja_JP nb_NO pt_BR pt_PT zh_CN zh_TW -COMMONDIR=../../../../common/ +include ../../common/Make-po.rules -include Make.rules +../../common/Make-po.rules: + make -C ../.. common/Make.rules # This definition has to come after the inclusion of Make.rules in order # to override the definition of LOCALEDIR in it. LOCALEDIR=/usr/share/YaST2/locale - -COMMONDIR_EXISTS=$(strip $(shell [ -d ${COMMONDIR} ] && echo true)) -ifeq ($(COMMONDIR_EXISTS), true) -Make.rules: $(COMMONDIR)/Make-po.rules - ln -f $(COMMONDIR)/Make-po.rules $@ -endif - diff --git a/management/yastui/src/po/Makefile b/management/yastui/src/po/Makefile index fc621bf11..44fc973a4 100644 --- a/management/yastui/src/po/Makefile +++ b/management/yastui/src/po/Makefile @@ -14,17 +14,11 @@ all: # made/installed. LANGS=en_US de_DE es_ES fr_FR hu_HU it_IT ja_JP nb_NO pt_BR pt_PT zh_CN zh_TW -COMMONDIR=../../../../common/ +include ../../common/Make-po.rules -include Make.rules +../../common/Make-po.rules: + make -C ../.. common/Make.rules # This definition has to come after the inclusion of Make.rules in order # to override the definition of LOCALEDIR in it. LOCALEDIR=/usr/share/locale - -COMMONDIR_EXISTS=$(strip $(shell [ -d ${COMMONDIR} ] && echo true)) -ifeq ($(COMMONDIR_EXISTS), true) -Make.rules: $(COMMONDIR)/Make-po.rules - ln -f $(COMMONDIR)/Make-po.rules $@ -endif - diff --git a/parser/Makefile b/parser/Makefile index 59babfa3c..d589967fd 100644 --- a/parser/Makefile +++ b/parser/Makefile @@ -18,15 +18,12 @@ NAME=apparmor-parser all: COMMONDIR=../common/ -include Make.rules +include common/Make.rules COMMONDIR_EXISTS=$(strip $(shell [ -d ${COMMONDIR} ] && echo true)) ifeq ($(COMMONDIR_EXISTS), true) -Make.rules: $(COMMONDIR)/Make.rules - ln -f $(COMMONDIR)/Make.rules . - -po/Make.rules: $(COMMONDIR)/Make-po.rules - make -C po Make.rules +common/Make.rules: $(COMMONDIR)/Make.rules + ln -sf $(COMMONDIR) . endif DESTDIR=/ diff --git a/parser/po/Makefile b/parser/po/Makefile index c5ff9fd9a..be8f0f1a5 100644 --- a/parser/po/Makefile +++ b/parser/po/Makefile @@ -14,15 +14,8 @@ all: # DISABLED LANGS = ar LANGS=bg bn bs ca cs cy da de el en_GB en_US es et fi fr gl he hi hr hu id it ja ka km ko lo lt nb nl pa pl pt_BR pt ro ru sk sl sr sv ta tr uk vi zh_CN zh_TW - -COMMONDIR=../../common/ - -include Make.rules +include ../common/Make-po.rules +../common/Make-po.rules: + make -C .. common/Make.rules XGETTEXT_ARGS+=--language=C --keyword=_ $(shell if [ -f ${NAME}.pot ] ; then echo -n -j ; fi) - -COMMONDIR_EXISTS=$(strip $(shell [ -d ${COMMONDIR} ] && echo true)) -ifeq ($(COMMONDIR_EXISTS), true) -Make.rules: $(COMMONDIR)/Make-po.rules - ln -f $(COMMONDIR)/Make-po.rules $@ -endif diff --git a/profiles/Makefile b/profiles/Makefile index 58792f1d7..37ba4400c 100644 --- a/profiles/Makefile +++ b/profiles/Makefile @@ -24,12 +24,12 @@ NAME=apparmor-profiles ALL: COMMONDIR=../common/ -include Make.rules +include common/Make.rules COMMONDIR_EXISTS=$(strip $(shell [ -d ${COMMONDIR} ] && echo true)) ifeq ($(COMMONDIR_EXISTS), true) -Make.rules: $(COMMONDIR)/Make.rules - ln -f $(COMMONDIR)/Make.rules +common/Make.rules: $(COMMONDIR)/Make.rules + ln -sf $(COMMONDIR) . endif DESTDIR=/ @@ -51,7 +51,7 @@ install: .PHONY: clean clean: - -rm -f $(NAME)-$(VERSION)*.tar.gz + -rm -f $(NAME)-$(VERSION)*.tar.gz Make.rules ifndef VERBOSE Q=@ diff --git a/profiles/apparmor-profiles.spec.in b/profiles/apparmor-profiles.spec.in index 4e571f942..e46488a9f 100644 --- a/profiles/apparmor-profiles.spec.in +++ b/profiles/apparmor-profiles.spec.in @@ -24,7 +24,7 @@ Summary: AppArmor profiles Name: apparmor-profiles Version: @@immunix_version@@ -Release: 12 +Release: @@repo_version@@ Group: Productivity/Security Source0: %{name}-%{version}-@@repo_version@@.tar.gz License: GPL diff --git a/utils/Makefile b/utils/Makefile index 75f1680b0..5f7d07a0f 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -18,15 +18,12 @@ NAME = apparmor-utils all: COMMONDIR=../common/ -include Make.rules +include common/Make.rules COMMONDIR_EXISTS=$(strip $(shell [ -d ${COMMONDIR} ] && echo true)) ifeq ($(COMMONDIR_EXISTS), true) -Make.rules: $(COMMONDIR)/Make.rules - ln -f $(COMMONDIR)/Make.rules . - -po/Make.rules: $(COMMONDIR)/Make-po.rules - make -C po Make.rules +common/Make.rules: $(COMMONDIR)/Make.rules + ln -sf $(COMMONDIR) . endif TOOLS = genprof logprof autodep audit complain enforce \ @@ -42,7 +39,7 @@ po/${NAME}.pot: ${TOOLS} make -C po ${NAME}.pot NAME=${NAME} SOURCES="${TOOLS} SubDomain.pm Reports.pm" .PHONY: install -install: +install: install -d ${CONFDIR} install -m 644 logprof.conf severity.db ${CONFDIR} install -d ${BINDIR} @@ -61,8 +58,8 @@ install: mkdir -m 0700 -p $(DESTDIR)/var/log/apparmor .PHONY: clean -clean: po/Make.rules - rm -f core core.* *.o *.s *.a *~ - rm -f $(NAME)-$(VERSION)-*.tar.gz +clean: + rm -f core core.* *.o *.s *.a *~ + rm -f $(NAME)-$(VERSION)-*.tar.gz Make.rules make -C po clean diff --git a/utils/apparmor-utils.spec.in b/utils/apparmor-utils.spec.in index f2f6b48c5..d8c166779 100644 --- a/utils/apparmor-utils.spec.in +++ b/utils/apparmor-utils.spec.in @@ -25,7 +25,7 @@ Summary: AppArmor userlevel utilities that are useful in creating AppArmor profiles. Name: apparmor-utils Version: @@immunix_version@@ -Release: 7 +Release: @@repo_version@@ Group: Productivity/Security Source0: %{name}-%{version}-@@repo_version@@.tar.gz License: GPL diff --git a/utils/po/Makefile b/utils/po/Makefile index dd02df097..d57364ce2 100644 --- a/utils/po/Makefile +++ b/utils/po/Makefile @@ -20,15 +20,8 @@ all: # made/installed. LANGS=en_US de_DE es_ES fr_FR hu_HU it_IT ja_JP nb_NO pt_BR pt_PT zh_CN zh_TW -COMMONDIR=../../common/ - -include Make.rules +include ../common/Make-po.rules +../common/Make-po.rules: + make -C .. common/Make.rules XGETTEXT_ARGS+=--language=perl - -COMMONDIR_EXISTS=$(strip $(shell [ -d ${COMMONDIR} ] && echo true)) -ifeq ($(COMMONDIR_EXISTS), true) -Make.rules: $(COMMONDIR)/Make-po.rules - ln -f $(COMMONDIR)/Make-po.rules $@ -endif -