* Makefile.inc: Add clean rule.

* scripts/mod/Makefile: Fix clean rule.

svn path=/dists/trunk/linux-kbuild-2.6/; revision=13235
This commit is contained in:
Bastian Blank 2009-03-24 09:32:39 +00:00
parent 030e970a25
commit 96625f03bb
2 changed files with 9 additions and 7 deletions

View File

@ -6,19 +6,22 @@ CFLAGS += -Wall -O2
CXXFLAGS = $(CFLAGS)
all: all-local all-recursive
clean: clean-local clean-recursive
install: install-local install-recursive
all-recursive install-recursive:
+@target=$(shell echo $@ | sed s/-recursive//); \
list='$(SUBDIRS)'; \
%-recursive:
+@list='$(SUBDIRS)'; \
for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
$(MAKE) -C $$subdir $$target \
echo "Making $* in $$subdir"; \
$(MAKE) -C $$subdir $* \
|| exit 1; \
done
all-local: $(PROGS)
clean-local::
rm -f $(PROGS) *.o
install-local: install-local-progs install-local-scripts install-local-data
install-local-progs: $(PROGS)

View File

@ -23,5 +23,4 @@ modpost.h: $(top_srcdir)/kbuild/scripts/mod/modpost.c
modpost.o: modpost.c modpost.h
clean:
rm $(PROGS) modpost.h *.o
rm -f modpost.h