diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | libmultipath/Makefile | 8 | ||||
-rw-r--r-- | multipathd/Makefile | 2 |
3 files changed, 8 insertions, 4 deletions
@@ -20,7 +20,7 @@ endif export KRNLSRC export KRNLOBJ -BUILDDIRS = $(shell find . -mindepth 2 -name Makefile -exec dirname {} \;) +BUILDDIRS = $(shell find . -mindepth 2 -name Makefile -exec dirname {} \; | grep -v ^lib) VERSION = $(shell basename ${PWD} | cut -d'-' -f3) diff --git a/libmultipath/Makefile b/libmultipath/Makefile index 163271b..c1664a4 100644 --- a/libmultipath/Makefile +++ b/libmultipath/Makefile @@ -14,14 +14,18 @@ OBJS = memory.o parser.o vector.o devmapper.o callout.o \ CFLAGS = -pipe -g -Wall -Wunused -Wstrict-prototypes +PREVBUILD = $(shell nm debug.o|grep log_safe) + ifeq ($(strip $(DAEMON)),1) CFLAGS += -DDAEMON + CLEAN = $(shell if [ "x$(PREVBUILD)" = "x" ]; then echo clean; fi) +else + CLEAN = $(shell if [ ! "x$(PREVBUILD)" = "x" ]; then echo clean; fi) endif all: $(BUILD) -prepare: - @rm -f debug.o +prepare: $(CLEAN) @file *-$(BUILD).a >/dev/null 2>&1 || rm -f core *.o *.gz @rm -f *-$(BUILD).a diff --git a/multipathd/Makefile b/multipathd/Makefile index 50cd897..21da4ea 100644 --- a/multipathd/Makefile +++ b/multipathd/Makefile @@ -65,6 +65,6 @@ uninstall: rm -f $(DESTDIR)$(mandir)/$(EXEC).8.gz clean: - $(MAKE) -C $(multipathdir) prepare + $(MAKE) -C $(multipathdir) prepare DAEMON=1 rm -f core *.o $(EXEC) *.gz |