/
Makefile
97 lines (65 loc) · 1.92 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
.PRECIOUS: %.4gl
export FGLPROFILE=fglprofile
%.42f: %.per
fglform -M $<
%.42m: %.4gl
fglcomp -r -M -Wall -Wno-stdsql $*
ALLMODULES = $(patsubst %.4gl, %.42m, $(wildcard *.4gl))
MODULES=$(filter-out utils.42m,$(ALLMODULES))
ALLFORMS = $(patsubst %.per, %.42f, $(wildcard *.per))
FORMS=$(filter-out customers.42f,$(ALLFORMS))
all: stores.sch customers.42f cols_customer.4gl $(FORMS) utils.42m $(MODULES)
$(FORMS) $(MODULES): stores.sch cols_customer.4gl
run: all stores.sch $(MODULES) $(FORMS)
fglrun stores.42m
crun: all stores.sch $(MODULES) $(FORMS)
fglrun cstores.42m
test.42m: utils.42m
cols_customer.4gl: customers.42f
#tools/gen_col_names stores.sch customer cols_customer.4gl
tools/gen_form_names customers.42f cols_customer.4gl
aui_const.4gl:
tools/gen_aui_const
sDAdyn.42m: utils.42m sql2array.42m
customers.42m: sDAdyn.42m utils.42m customers.42f customers_singlerow.42f
cust_ex.42m: cust_ex.4gl sDAdyn.42m utils.42m
#by intention we ignore column name warnings to provoke an SQL error at runtime
fglcomp -Wall -Wno-stdsql -Wno-colname cust_ex.4gl
customers: customers.42m
fglrun $@
ccustomers.42m: utils.42m
ccustomers: ccustomers.42m
fglrun $@
corders.42m: utils.42m
corders: corders.42m
fglrun $@
citems.42m: utils.42m items.42f
citems: citems.42m
fglrun $@
items.42m: utils.42m
items: items.42m
fglrun $@
orders.42m: sDAdyn.42m utils.42m
orders: orders.42m orders.42f
fglrun orders
test: stores.sch $(MODULES)
fglrun test
sql2array: stores.sch sql2array.42m utils.42m
fglrun sql2array
stores.sch: utils.42m
stores/mkstores
utils.42m: aui_const.4gl
format:
tools/fglformat
make -C tools format
make -C stores format
clean::
$(MAKE) -C stores clean
$(MAKE) -C tools clean
$(RM) -f stores.dbs stores.sch
$(RM) -f *.42? *.4gl~ cols_customer.4gl aui_const.4gl *.fgldeb
echo:
@echo "ALLMODULES:$(ALLMODULES)"
@echo "MODULES:$(MODULES)"
@echo "ALLFORMS:$(ALLFORMS)"
@echo "FORMS:$(FORMS)"