Master Makefile linked multipathd with libmultipath objects built
without -DDAEMON ... wrong condlog define.
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)
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
rm -f $(DESTDIR)$(mandir)/$(EXEC).8.gz
clean:
- $(MAKE) -C $(multipathdir) prepare
+ $(MAKE) -C $(multipathdir) prepare DAEMON=1
rm -f core *.o $(EXEC) *.gz