Project

General

Profile

1
##### Vars/functions
2

    
3
# Make
4
pathParts = $(shell path="$(1)"; echo "$${path%%/*}" "$${path\#*/}")
5
topDir = $(word 1,$(pathParts))
6
subPath = $(word 2,$(pathParts))
7
subMake = $(MAKE) $(call subPath,$@) --directory=$(call topDir,$@) \
8
--makefile=../input.Makefile
9
# input.Makefile path is relative to subdir
10

    
11
##### General targets
12

    
13
all:
14

    
15
.SUFFIXES:
16

    
17
_always:
18
.PHONY: _always
19

    
20
subdirs := $(wildcard */)
21

    
22
define subdirTargets
23
$(subdir): _always
24
	+$$(subMake)
25

    
26
$(subdir)%: _always
27
	+$$(subMake)
28
endef
29
$(foreach subdir,$(subdirs),$(eval $(subdirTargets)))
30

    
31
Makefile: ;
32

    
33
%: $(addsuffix %,$(subdirs)) _always ;
34

    
35
##### SVN
36

    
37
%-add: _always
38
	svn mkdir $*
39
	$(MAKE) $*/svn_props
(1-1/2)