OSDN Git Service

add a basic .depend target to better catch updates in source files
[uclinux-h8/uClibc.git] / extra / config / Makefile
index b377d43..6bd5bf6 100644 (file)
@@ -7,6 +7,10 @@ include $(top_builddir)Rules.mak
 
 include Makefile.kconfig
 
+-include .depend
+.depend: $(wildcard *.h *.c)
+       $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) -MM *.c > .depend 2>/dev/null || :
+
 __hostprogs := $(sort $(hostprogs-y) $(hostprogs-m))
 host-csingle    := $(foreach m,$(__hostprogs),$(if $($(m)-objs),,$(m)))
 host-cmulti := $(foreach m,$(__hostprogs),\