From ede071d56bb9947ee6bcf2b78f7614ae6bec4dd1 Mon Sep 17 00:00:00 2001 From: Daniel Kiper Date: Fri, 10 May 2013 17:33:54 +0200 Subject: tools/libfsimage: Fix clean and distclean make targets If there is a single colon for a given target and the target is redefined in another place (e.g. in included file) then make executes only new target and displays following warning: Makefile:35: warning: overriding commands for target `clean' tools/libfsimage/common/../../../tools/libfsimage/Rules.mk:25: warning: ignoring old commands for target `clean' To cope with that issue define all required targets as double-colon rules. Additionally, remove some redundant stuff. Signed-off-by: Daniel Kiper Acked-by: Ian Campbell (cherry picked from commit 667d8a84b244d02e9c6a2d02d6a02fc90c2efb4e) --- tools/libfsimage/Rules.mk | 2 +- tools/libfsimage/common/Makefile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/libfsimage/Rules.mk b/tools/libfsimage/Rules.mk index 0e29c25bb3..81d79817cf 100644 --- a/tools/libfsimage/Rules.mk +++ b/tools/libfsimage/Rules.mk @@ -26,7 +26,7 @@ fs-install: fs-all $(FSLIB): $(PIC_OBJS) $(CC) $(CFLAGS) $(LDFLAGS) $(SHLIB_LDFLAGS) -o $@ $^ -lfsimage $(FS_LIBDEPS) -clean distclean: +clean distclean:: rm -f $(PIC_OBJS) $(FSLIB) $(DEPS) -include $(DEPS) diff --git a/tools/libfsimage/common/Makefile b/tools/libfsimage/common/Makefile index afb1e96e0d..15b6379db6 100644 --- a/tools/libfsimage/common/Makefile +++ b/tools/libfsimage/common/Makefile @@ -28,8 +28,8 @@ install: all $(INSTALL_DATA) fsimage_plugin.h $(DESTDIR)$(INCLUDEDIR) $(INSTALL_DATA) fsimage_grub.h $(DESTDIR)$(INCLUDEDIR) -clean distclean: - rm -f $(PIC_OBJS) $(LIB) $(DEPS) +clean distclean:: + rm -f $(LIB) libfsimage.so: libfsimage.so.$(MAJOR) ln -sf $< $@ -- cgit v1.2.3