forked from amber-smalltalk/amber
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (41 loc) · 1.05 KB
/
Makefile
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Makefile for sub directories
AMBER = st
SERVER = server
REPL = repl
EXAMPLES = examples
# REST is all except AMBER
REST = $(SERVER) $(EXAMPLES) $(REPL)
# And these are all
DIRS = $(AMBER) $(REST)
# The sets of directories to do various things in
BUILDDIRS = $(DIRS:%=build-%)
EXAMPLESDIRS = $(EXAMPLES:%=build-%)
INSTALLDIRS = $(AMBER:%=install-%)
CLEANDIRS = $(REST:%=clean-%)
CLEANALLDIRS = $(DIRS:%=clean-%)
all: $(BUILDDIRS)
$(DIRS): $(BUILDDIRS)
$(BUILDDIRS):
$(MAKE) -C $(@:build-%=%)
amber: build-st
# Examples and server need Amber first
build-server: build-st
build-examples: build-st
examples: $(EXAMPLESDIRS)
$(EXAMPLESDIRS):
$(MAKE) -C $(@:build-%=%)
install: $(INSTALLDIRS)
$(INSTALLDIRS):
$(MAKE) -C $(@:install-%=%) install
clean: $(CLEANDIRS)
$(CLEANDIRS):
$(MAKE) -C $(@:clean-%=%) clean
cleanall: $(CLEANALLDIRS)
$(CLEANALLDIRS):
$(MAKE) -C $(@:clean-%=%) clean
.PHONY: subdirs $(DIRS)
.PHONY: subdirs $(BUILDDIRS)
.PHONY: subdirs $(INSTALLDIRS)
.PHONY: subdirs $(CLEANDIRS)
.PHONY: subdirs $(CLEANALLDIRS)
.PHONY: all install clean