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)
$(FSLIB): $(PIC_OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) $(SHLIB_LDFLAGS) -o $@ $^ -lfsimage $(FS_LIBDEPS)
-clean distclean:
+clean distclean::
rm -f $(PIC_OBJS) $(FSLIB) $(DEPS)
-include $(DEPS)
$(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 $< $@