From 156a980c3055723984ae46210b6a1c9682e45f9a Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Fri, 27 May 2011 14:57:43 -0700 Subject: [PATCH] In some cases, it is desirable to build the parser without building the binary portions (Hurd). This patch splits up the build targets so this is possible: "main" becomes "arch" "indep" is created and depends on "docs" po building is moved from "main" to "indep" "all" has "tests" removed (standard build practices are to "make" then "make check" so I think "tests"/"check" should stay separate from "all"). redundant chunk is removed (this exists twice in the Makefile): -.SILENT: check -check: tests "install" is split into "install-indep" and "install-arch" "install-arch" requires "arch" and only installs the binaries "install-indep" requires "indep" and only install non-binaries Additionally, update the README to mention the "check" target both for the parser and the utils. Signed-off-by: Kees Cook Acked-by: Steve Beattie --- README | 4 ++-- parser/Makefile | 22 ++++++++++++++-------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/README b/README index b25ec7b24..02d5da1ba 100644 --- a/README +++ b/README @@ -74,14 +74,14 @@ $ make check Utilities: $ cd utils $ make +$ make check $ make install parser: $ cd parser $ make -$ make tests # not strictly necessary as they are run during the - # build by default +$ make check $ make install diff --git a/parser/Makefile b/parser/Makefile index 192f4c160..a12b4fc5e 100644 --- a/parser/Makefile +++ b/parser/Makefile @@ -130,8 +130,7 @@ techdoc.txt: techdoc/index.html # targets arranged this way so that people who don't want full docs can # pick specific targets they want. -main: $(TOOLS) - $(Q)make -C po all +arch: $(TOOLS) manpages: $(MANPAGES) @@ -141,7 +140,11 @@ pdf: techdoc.pdf docs: manpages htmlmanpages pdf -all: main docs tests +indep: docs + $(Q)make -C po all + +all: arch indep + .PHONY: libstdc++.a libstdc++.a: @@ -229,9 +232,6 @@ tests: ${TESTS} sh -e -c 'for test in ${TESTS} ; do echo "*** running $${test}" && ./$${test}; done' $(Q)make -s -C tst tests -.SILENT: check -check: tests - # always need to rebuild. .SILENT: $(AAREOBJECT) .PHONY: $(AAREOBJECT) @@ -270,15 +270,21 @@ install-debian: .PHONY: install-unknown install-unknown: -INSTALLDEPS=$(TOOLS) +INSTALLDEPS=arch ifdef DISTRO INSTALLDEPS+=install-$(DISTRO) endif .PHONY: install -install: $(INSTALLDEPS) +install: install-indep install-arch + +.PHONY: install-arch +install-arch: $(INSTALLDEPS) install -m 755 -d $(DESTDIR)/sbin install -m 755 ${TOOLS} $(DESTDIR)/sbin + +.PHONY: install-indep +install-indep: install -m 755 -d $(INSTALL_CONFDIR) install -m 644 subdomain.conf $(INSTALL_CONFDIR) install -m 755 -d ${DESTDIR}/var/lib/apparmor