Browse Source

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.
dev/timer
René Kijewski 9 years ago
parent
commit
300d6b3e35
  1. 6
      Makefile.base
  2. 4
      Makefile.include
  3. 3
      Makefile.unsupported
  4. 3
      boards/avsextrem/Makefile
  5. 3
      boards/chronos/Makefile
  6. 3
      boards/msb-430-common/Makefile
  7. 3
      boards/msb-430/Makefile
  8. 3
      boards/msb-430h/Makefile
  9. 3
      boards/msba2-common/Makefile
  10. 3
      boards/msba2/Makefile
  11. 3
      boards/native/Makefile
  12. 3
      boards/pttu/Makefile
  13. 3
      boards/redbee-econotag/Makefile
  14. 3
      boards/wsn430-common/Makefile
  15. 3
      boards/wsn430-v1_3b/Makefile
  16. 3
      boards/wsn430-v1_4/Makefile
  17. 3
      cpu/cc430/Makefile
  18. 3
      cpu/lpc1768/Makefile
  19. 3
      cpu/lpc2387/Makefile
  20. 3
      cpu/mc1322x/Makefile
  21. 8
      cpu/msp430-common/Makefile
  22. 3
      cpu/msp430x16x/Makefile
  23. 3
      cpu/native/Makefile
  24. 4
      drivers/Makefile
  25. 8
      drivers/at86rf231/Makefile
  26. 3
      drivers/cc110x_ng/Makefile
  27. 8
      drivers/cc2420/Makefile
  28. 4
      sys/Makefile

6
Makefile.base

@ -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)

4
Makefile.include

@ -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

3
Makefile.unsupported

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

3
boards/avsextrem/Makefile

@ -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 ;

3
boards/chronos/Makefile

@ -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 ;

3
boards/msb-430-common/Makefile

@ -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 ;

3
boards/msb-430/Makefile

@ -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 ;

3
boards/msb-430h/Makefile

@ -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 ;

3
boards/msba2-common/Makefile

@ -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 ;

3
boards/msba2/Makefile

@ -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 ;

3
boards/native/Makefile

@ -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 ;

3
boards/pttu/Makefile

@ -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 ;

3
boards/redbee-econotag/Makefile

@ -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 ;

3
boards/wsn430-common/Makefile

@ -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 ;

3
boards/wsn430-v1_3b/Makefile

@ -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 ;

3
boards/wsn430-v1_4/Makefile

@ -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 ;

3
cpu/cc430/Makefile

@ -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 ;

3
cpu/lpc1768/Makefile

@ -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

3
cpu/lpc2387/Makefile

@ -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 ;

3
cpu/mc1322x/Makefile

@ -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 ;

8
cpu/msp430-common/Makefile

@ -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 ;

3
cpu/msp430x16x/Makefile

@ -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 ;

3
cpu/native/Makefile

@ -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 ;

4
drivers/Makefile

@ -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 ;

8
drivers/at86rf231/Makefile

@ -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 ;

3
drivers/cc110x_ng/Makefile

@ -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 ;

8
drivers/cc2420/Makefile

@ -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 ;

4
sys/Makefile

@ -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 ;

Loading…
Cancel
Save