[riot-commits] [RIOT-OS/RIOT] 840c0f: make: detect their module name automatically

Martine Lenders authmillenon at gmail.com
Wed Jun 18 23:52:49 CEST 2014


  Branch: refs/heads/master
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: 840c0f0a5744ff1934646f5ad6f3a70ae7ae60de
      https://github.com/RIOT-OS/RIOT/commit/840c0f0a5744ff1934646f5ad6f3a70ae7ae60de
  Author: René Kijewski <rene.kijewski at fu-berlin.de>
  Date:   2014-06-17 (Tue, 17 Jun 2014)

  Changed paths:
    M Makefile.base
    M core/Makefile
    M cpu/arm_common/Makefile
    M cpu/cortex-m3_common/Makefile
    M cpu/lpc2387/gpioint/Makefile
    M cpu/lpc2387/i2c/Makefile
    M cpu/lpc2387/mci/Makefile
    M cpu/lpc2387/rtc/Makefile
    M cpu/lpc_common/Makefile
    M cpu/native/rtc/Makefile
    M cpu/sam3x8e/periph/Makefile
    M drivers/Makefile
    M drivers/at86rf231/Makefile
    M drivers/cc110x/Makefile
    M drivers/cc110x_ng/Makefile
    M drivers/cc2420/Makefile
    M drivers/lm75a/Makefile
    M drivers/ltc4150/Makefile
    M drivers/sht11/Makefile
    M drivers/srf02/Makefile
    M drivers/srf08/Makefile
    M sys/auto_init/Makefile
    M sys/bloom/Makefile
    M sys/config/Makefile
    M sys/crypto/Makefile
    M sys/hashes/Makefile
    M sys/lib/Makefile
    M sys/net/ccn_lite/Makefile
    M sys/net/crosslayer/net_help/Makefile
    M sys/net/link_layer/ieee802154/Makefile
    M sys/net/link_layer/net_if/Makefile
    M sys/net/network_layer/sixlowpan/Makefile
    M sys/net/routing/Makefile
    M sys/net/routing/rpl/Makefile
    M sys/net/transport_layer/destiny/Makefile
    M sys/ping/Makefile
    M sys/posix/Makefile
    M sys/posix/pnet/Makefile
    M sys/posix/pthread/Makefile
    M sys/ps/Makefile
    M sys/quad_math/Makefile
    M sys/random/Makefile
    M sys/shell/Makefile
    M sys/timex/Makefile
    M sys/transceiver/Makefile
    M sys/uart0/Makefile
    M sys/vtimer/Makefile
    M tests/unittests/tests-core/Makefile

  Log Message:
  -----------
  make: detect their module name automatically

For many modules the `Makefile` contains a line like
```
MODULE:=$(shell basename $(CURDIR))
```
This conclusively shows that we do not have to set the module name
manually.

This PR removes the need to set the module name manually, if it is the
same as the basename. E.g. for `…/sys/vtimer/Makefile` the variable
make `MODULE` will still be `vtimer`, because it is the basename of the
Makefile.


  Commit: 467b41ad4918a4d21bffac941deebee69f95f09e
      https://github.com/RIOT-OS/RIOT/commit/467b41ad4918a4d21bffac941deebee69f95f09e
  Author: René Kijewski <rene.kijewski at fu-berlin.de>
  Date:   2014-06-17 (Tue, 17 Jun 2014)

  Changed paths:
    M Makefile.base
    M boards/arduino-due/Makefile
    M boards/avsextrem/Makefile
    M boards/chronos/Makefile
    M boards/msb-430-common/Makefile
    M boards/msb-430/Makefile
    M boards/msb-430h/Makefile
    M boards/msba2-common/Makefile
    M boards/msba2/Makefile
    M boards/native/Makefile
    M boards/native/drivers/Makefile
    M boards/pttu/Makefile
    M boards/qemu-i386/Makefile
    M boards/redbee-econotag/Makefile
    M boards/udoo/Makefile
    M boards/wsn430-common/Makefile
    M boards/wsn430-v1_3b/Makefile
    M boards/wsn430-v1_4/Makefile
    M cpu/cc430/Makefile
    M cpu/lpc1768/Makefile
    M cpu/lpc2387/Makefile
    M cpu/mc1322x/Makefile
    M cpu/msp430x16x/Makefile
    M cpu/native/Makefile
    M cpu/sam3x8e/Makefile
    M drivers/Makefile
    M drivers/cc110x_ng/Makefile
    M sys/Makefile

  Log Message:
  -----------
  make: easifier usage of module subdirectories

Many modules have subdirectories. Often these subdirectories should only
be included under certain circumstances. Modules that use submodules
currently need to use this pattern:

```make
DIRS = …

all: $(BINDIR)$(MODULE).a
   @for i in $(DIRS) ; do $(MAKE) -C $$i ; done ;

include $(RIOTBASE)/Makefile.base

clean::
   @for i in $(DIRS) ; do $(MAKE) -C $$i clean ; done ;
```

This PR moves the `all:` and `clean::` boilerplate into `Makefile.base`.


  Commit: 6d1365c5d8a3268221a3f09ed19056685b590421
      https://github.com/RIOT-OS/RIOT/commit/6d1365c5d8a3268221a3f09ed19056685b590421
  Author: Martine Lenders <authmillenon at gmail.com>
  Date:   2014-06-18 (Wed, 18 Jun 2014)

  Changed paths:
    M Makefile.base
    M boards/arduino-due/Makefile
    M boards/avsextrem/Makefile
    M boards/chronos/Makefile
    M boards/msb-430-common/Makefile
    M boards/msb-430/Makefile
    M boards/msb-430h/Makefile
    M boards/msba2-common/Makefile
    M boards/msba2/Makefile
    M boards/native/Makefile
    M boards/native/drivers/Makefile
    M boards/pttu/Makefile
    M boards/qemu-i386/Makefile
    M boards/redbee-econotag/Makefile
    M boards/udoo/Makefile
    M boards/wsn430-common/Makefile
    M boards/wsn430-v1_3b/Makefile
    M boards/wsn430-v1_4/Makefile
    M core/Makefile
    M cpu/arm_common/Makefile
    M cpu/cc430/Makefile
    M cpu/cortex-m3_common/Makefile
    M cpu/lpc1768/Makefile
    M cpu/lpc2387/Makefile
    M cpu/lpc2387/gpioint/Makefile
    M cpu/lpc2387/i2c/Makefile
    M cpu/lpc2387/mci/Makefile
    M cpu/lpc2387/rtc/Makefile
    M cpu/lpc_common/Makefile
    M cpu/mc1322x/Makefile
    M cpu/msp430x16x/Makefile
    M cpu/native/Makefile
    M cpu/native/rtc/Makefile
    M cpu/sam3x8e/Makefile
    M cpu/sam3x8e/periph/Makefile
    M drivers/Makefile
    M drivers/at86rf231/Makefile
    M drivers/cc110x/Makefile
    M drivers/cc110x_ng/Makefile
    M drivers/cc2420/Makefile
    M drivers/lm75a/Makefile
    M drivers/ltc4150/Makefile
    M drivers/sht11/Makefile
    M drivers/srf02/Makefile
    M drivers/srf08/Makefile
    M sys/Makefile
    M sys/auto_init/Makefile
    M sys/bloom/Makefile
    M sys/config/Makefile
    M sys/crypto/Makefile
    M sys/hashes/Makefile
    M sys/lib/Makefile
    M sys/net/ccn_lite/Makefile
    M sys/net/crosslayer/net_help/Makefile
    M sys/net/link_layer/ieee802154/Makefile
    M sys/net/link_layer/net_if/Makefile
    M sys/net/network_layer/sixlowpan/Makefile
    M sys/net/routing/Makefile
    M sys/net/routing/rpl/Makefile
    M sys/net/transport_layer/destiny/Makefile
    M sys/ping/Makefile
    M sys/posix/Makefile
    M sys/posix/pnet/Makefile
    M sys/posix/pthread/Makefile
    M sys/ps/Makefile
    M sys/quad_math/Makefile
    M sys/random/Makefile
    M sys/shell/Makefile
    M sys/timex/Makefile
    M sys/transceiver/Makefile
    M sys/uart0/Makefile
    M sys/vtimer/Makefile
    M tests/unittests/tests-core/Makefile

  Log Message:
  -----------
  Merge pull request #1324 from Kijewski/make-automatic-module-name

make: much less clutter for "standard layout" modules


Compare: https://github.com/RIOT-OS/RIOT/compare/227f40cd9eb9...6d1365c5d8a3


More information about the commits mailing list