]> xenbits.xensource.com Git - xen.git/commitdiff
tools/libfsimage: Fix clean and distclean make targets
authorDaniel Kiper <daniel.kiper@oracle.com>
Fri, 10 May 2013 15:33:54 +0000 (17:33 +0200)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 17 Jul 2013 11:29:34 +0000 (12:29 +0100)
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 <daniel.kiper@oracle.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
(cherry picked from commit 667d8a84b244d02e9c6a2d02d6a02fc90c2efb4e)

tools/libfsimage/Rules.mk
tools/libfsimage/common/Makefile

index 0e29c25bb3d3a60eb17275ce95201fea0ffe94a3..81d79817cf595d8b879446c7b17c1db2b0ae5a32 100644 (file)
@@ -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)
index afb1e96e0dcea0ffde34551c1f236fd9174488f0..15b6379db68c175ae4c0cc74df74be548daab3e6 100644 (file)
@@ -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 $< $@