summaryrefslogtreecommitdiffstats
path: root/tmake/lib/unix/subdirs.t
blob: e2b58a7f76ba57d7d34c9c4530ec21703776d02b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#############################################################################
#!
#! This is a tmake template for creating a makefile that invokes make in
#! sub directories - for Unix.
#!
#${
    StdInit();
    Project('MAKEFILE') || Project('MAKEFILE = Makefile');
    Project('TMAKE') || Project('TMAKE = tmake');
#$}
#!
# Makefile for building targets in sub directories.
# Generated by tmake at #$ Now();
#     Project: #$ Expand("PROJECT");
#    Template: #$ Expand("TEMPLATE");
#############################################################################

MAKEFILE=	#$ Expand("MAKEFILE");
TMAKE	=	#$ Expand("TMAKE");

SUBDIRS	=	#$ ExpandList("SUBDIRS");

all: $(SUBDIRS)

$(SUBDIRS): FORCE
	cd $@; $(MAKE)

#$ TmakeSelf();

tmake_all:
#${
	$text = "\t" . 'for i in $(SUBDIRS); do ( cd $$i ; $(TMAKE) $$i.pro -o $(MAKEFILE); grep "TEMPLATE.*subdirs" $$i.pro 2>/dev/null >/dev/null && $(MAKE) -f $(MAKEFILE) tmake ) ; done';
#$}

clean:
	for i in $(SUBDIRS); do ( cd $$i ; $(MAKE) clean ) ; done

FORCE: