[build] be smarter at guessing when libs rebuild is needed
authorroot <root@potab.(none)>
Thu, 18 Aug 2005 18:43:04 +0000 (20:43 +0200)
committerroot <root@potab.(none)>
Thu, 18 Aug 2005 18:43:04 +0000 (20:43 +0200)
Without breaking the klibc stuff.
Total build time shortened a lot on small systems.

libcheckers/Makefile
libmultipath/Makefile
multipath/Makefile
multipathd/Makefile

index 0230039..c737da1 100644 (file)
@@ -11,7 +11,7 @@ OBJS = readsector0.o tur.o selector.o emc_clariion.o hp_sw.o
 all: $(BUILD)
 
 prepare:
-       rm -f core *.o *.gz
+       @file *-$(BUILD).a >/dev/null 2>&1 || rm -f core *.o *.gz
 
 klibc: prepare $(OBJS)
        ar rs libcheckers-klibc.a *.o
index 8e35abe..c3c2ee3 100644 (file)
@@ -21,7 +21,7 @@ endif
 all: $(BUILD)
 
 prepare:
-       rm -f core *.o *.gz
+       @file *-$(BUILD).a >/dev/null 2>&1 || rm -f core *.o *.gz
 
 klibc: prepare $(OBJS)
        ar rs libmultipath-klibc.a *.o
index de6ef30..17cefa7 100644 (file)
@@ -21,7 +21,7 @@ EXEC = multipath
 all: $(BUILD)
 
 prepare:
-       make -C $(multipathdir) clean
+       make -C $(multipathdir) prepare
        rm -f core *.o *.gz
 
 glibc: prepare $(OBJS)
index bd2f4f6..50cd897 100644 (file)
@@ -65,6 +65,6 @@ uninstall:
        rm -f $(DESTDIR)$(mandir)/$(EXEC).8.gz
 
 clean:
-       $(MAKE) -C $(multipathdir) clean
+       $(MAKE) -C $(multipathdir) prepare
        rm -f core *.o $(EXEC) *.gz