1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Make: exterminate 'clean' buildtarget

Closes #993.

We do not need to descend into the modules to know what to do on
`make clean BOARD=blub`. We can just invoke `rm -rf bin/blub`.

This PR only keeps the descending into the USEPKGs, since they might
want to delete cached/downloaded/extracted data.
This commit is contained in:
René Kijewski 2014-04-09 23:00:29 +02:00
parent 9f24ae2e62
commit 300d6b3e35
28 changed files with 3 additions and 102 deletions

View File

@ -21,8 +21,6 @@ ifeq ($(strip $(GIT_VERSION)),)
endif
export CFLAGS += -DVERSION=\"$(GIT_VERSION)\"
.PHONY: clean
$(BINDIR)$(MODULE).a: $(OBJ) $(ASMOBJ)
$(AD)$(AR) -rc $(BINDIR)$(MODULE).a $(OBJ) $(ASMOBJ)
@ -44,7 +42,3 @@ $(BINDIR)$(MODULE)/%.o: %.s
$(BINDIR)$(MODULE)/%.o: %.S
@mkdir -p $(BINDIR)$(MODULE)
$(AD)$(CC) -c $(CFLAGS) $*.S -o $(BINDIR)$(MODULE)/$*.o
# remove compilation products
clean::
$(AD)rm -f $(BINDIR)$(MODULE).a $(OBJ) $(DEP) $(ASMOBJ)

View File

@ -143,9 +143,7 @@ $(USEPKG:%=${BINDIR}%.a)::
"$(MAKE)" -C $(RIOTBASE)/pkg/$(patsubst ${BINDIR}%.a,%,$@)
clean:
@for i in $(USEPKG) ; do "$(MAKE)" -C $(RIOTBASE)/pkg/$$i clean || exit 1; done ;
"$(MAKE)" -C $(RIOTBOARD)/$(BOARD) clean
"$(MAKE)" -C $(RIOTBASE) clean
@for i in $(USEPKG) ; do "$(MAKE)" -C $(RIOTBASE)/pkg/$$i clean || exit 1; done
rm -rf $(BINDIR)
flash: all

View File

@ -3,4 +3,5 @@
all:
$(error Project $(PROJECT) currently not supported for $(BOARD))
clean: all
clean:
@true

View File

@ -6,6 +6,3 @@ all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -7,6 +7,3 @@ all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -6,6 +6,3 @@ all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -6,6 +6,3 @@ all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -6,6 +6,3 @@ all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -6,6 +6,3 @@ all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -7,6 +7,3 @@ all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -12,6 +12,3 @@ $(BINDIR)$(MODULE)/%.o: %.c
$(AD)$(CC) $(CFLAGS) $(NATIVEINCLUDES) -c $*.c -o $(BINDIR)$(MODULE)/$*.o
$(AD)$(CC) $(CFLAGS) $(NATIVEINCLUDES) -MM $*.c |\
sed -e "1s|^|$(BINDIR)$(MODULE)/|" > $(BINDIR)$(MODULE)/$*.d
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -7,6 +7,3 @@ all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -6,6 +6,3 @@ all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -6,6 +6,3 @@ all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -6,6 +6,3 @@ all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -6,6 +6,3 @@ all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -6,6 +6,3 @@ all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -11,9 +11,6 @@ all: $(BINDIR)$(MODULE).a
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;
# This is needed for NXP Cortex M devices
nxpsum:
$(CCLOCAL) nxpsum.c -std=c99 -o nxpsum

View File

@ -20,6 +20,3 @@ all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -12,6 +12,3 @@ all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -1,11 +1,3 @@
MODULE =msp430_common
DIRS =
all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -8,6 +8,3 @@ all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -18,6 +18,3 @@ $(BINDIR)$(MODULE)/%.o: %.c
$(AD)$(CC) $(CFLAGS) $(NATIVEINCLUDES) -c $*.c -o $(BINDIR)$(MODULE)/$*.o
$(AD)$(CC) $(CFLAGS) $(NATIVEINCLUDES) -MM $*.c |\
sed -e "1s|^|$(BINDIR)$(MODULE)/|" > $(BINDIR)$(MODULE)/$*.d
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -39,7 +39,3 @@ all:
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
# remove compilation products
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -1,11 +1,3 @@
MODULE =at86rf231
DIRS =
all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -15,6 +15,3 @@ all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -1,11 +1,3 @@
MODULE =cc2420
DIRS =
all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;

View File

@ -106,7 +106,3 @@ all: $(BINDIR)$(MODULE).a
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base
# remove compilation products
clean::
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean || exit 1; done ;