[build] will I have the build optimization right this time ?
authorroot <root@xa-s05.(none)>
Tue, 27 Sep 2005 14:42:03 +0000 (16:42 +0200)
committerroot <root@xa-s05.(none)>
Tue, 27 Sep 2005 14:42:03 +0000 (16:42 +0200)
Master Makefile linked multipathd with libmultipath objects built
without -DDAEMON ... wrong condlog define.

Makefile
libmultipath/Makefile
multipathd/Makefile

index c76c0c9..ad8d643 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -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)
 
index 163271b..c1664a4 100644 (file)
@@ -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
 
index 50cd897..21da4ea 100644 (file)
@@ -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