RIOT-OS/RIOT — pull request #1324 by Kijewski (2014-06-17 02:25:19+00:00)
Title: make: much less clutter for "standard layout" modules

Please see the individual commit messages:

----

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.

----

Make 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`.

----

After the previous two changes many module `Makefile`s only contained
the line
```make
include $(RIOTBASE)/Makefile.base
```

This PR removes the need for makefile for "standard layout" modules. The
module name is deduced from the basename, and no subdirectories are
included.