-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
116 lines (95 loc) · 2.43 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#Master Makefile for BINSYN
SHELL = /bin/sh
## For now, ignore make errors, so that the whole project can
## be compiled with a single make.
ifndef BINSYN_MOPT
BINSYN_MOPT := --ignore-errors
endif
MAKEOPTS := $(BINSYN_MOPT) $(MAKEOPTS)
# Find all Makefiles in this project directory
makeFiles = $(sort $(wildcard */Makefile))
#List of subsystems
subsystems = $(subst /Makefile,,$(makeFiles))
# Build Main
.PHONY: all
all: $(subsystems)
.PHONY: $(subsystems)
$(subsystems):
$(MAKE) $(MAKEOPTS) -C $@
# Helper Actions
.PHONY: prepB runGRPall
prepB:
@echo "Running scriptB..."
./scriptB
@echo "...Updating PGBX3/6SV.DAT..."
cd oa/; cp PGBX3.DAT PGBX3SV.DAT ; cp PGBX6.DAT PGBX6SV.DAT
@echo "...done."
runGRPall: runGRPA runGRPB runGRPC runGRPD runGRPE
runGRPA:
@echo "Running GRPA..."
cd grpa/; ./grpascr
@echo "...done"
runGRPB: runGRPA
@echo "Running GRPB..."
cd grpb/; ./grpbscr
runGRPC: runGRPB
@echo "Running GRPC..."
cd grpc/; ./grpcscr
@echo "...done"
runGRPD: runGRPA runGRPB runGRPC
@echo "Running GRPD..."
cd grpd/; ./grpdscr
@echo "...done"
runGRPE:runGRPA runGRPB runGRPC runGRPD
@echo "Running GRPE..."
cd grpe/; ./grpescr
@echo "...done"
iabackup:
mkdir iabackup
oabackup:
mkdir oabackup
backupIA: iabackup
rsync --verbose --times --inplace --delete --delete-excluded --exclude=".?*" --dirs ./ia/ ./iabackup
backupOA: oabackup
rsync --verbose --times --inplace --delete --delete-excluded --exclude=".?*" --dirs ./oa/ ./oabackup
backup: backupIA backupOA
restoreIA: iabackup
rsync --verbose --times --inplace --delete --exclude=".?*" --dirs ./iabackup/ ./ia
restoreOA: oabackup
rsync --verbose --times --inplace --delete --exclude=".?*" --dirs ./oabackup/ ./oa
restore: restoreIA restoreOA
cleanIO:
cd ia/; git clean -f *
cd oa/; git clean -f *
# Test Actions
workingDataDir = IA
testDataDir = SYSTEMS
testDataFiles = $(wildcard $(testDataDir)/$^/* )
# loads the test data into IA $(workingDataDir)
define loadTest
rm $(workingDataDir)/*
cp $(testDataDir)/$@/* $(workingDataDir)/.
endef
# Test Rules
testDirs = $(wildcard systems/*)
.PHONY: $(testDirs)
$(testDirs):
$(MAKE) $(MAKEOPTS) -C $@
# Clean Actions
cleanSubs = $(subsystems)
.PHONY: cleanall cleanobj
cleanall:
for dir in $(subsystems); \
do \
$(MAKE) -C $$dir cleanall; \
done
cleanobj:
for dir in $(subsystems); \
do \
$(MAKE) -C $$dir cleanobj; \
done
.PHONY: show
show:
@echo "MAKEOPTS: "$(MAKEOPTS)
@echo "FFLAGS: " $(FFLAGS)
$(MAKE) -C calpt show