-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.in
159 lines (130 loc) · 4.34 KB
/
Makefile.in
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
## arguments we want to run parrot with
PARROT_ARGS :=
## configuration settings
VERSION := @versiondir@
BIN_DIR := @bindir@
LIB_DIR := @libdir@$(VERSION)
DOC_DIR := @docdir@$(VERSION)
MANDIR := @mandir@$(VERSION)
# Set up extensions
O := @o@
# Various paths
PERL6GRAMMAR := $(LIB_DIR)/library/PGE/Perl6Grammar.pbc
NQP := $(LIB_DIR)/languages/nqp/nqp.pbc
PCT := $(LIB_DIR)/library/PCT.pbc
## Setup some commands
PERL := @perl@
CAT := @cat@
CHMOD := @chmod@
CP := @cp@
MKPATH := @mkpath@
RM_F := @rm_f@
RM_RF := @rm_rf@
POD2MAN := pod2man
PARROT := $(BIN_DIR)/parrot@exe@
PBC_TO_EXE := $(BIN_DIR)/pbc_to_exe@exe@
#IF(darwin):
#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
SOURCES := \
src/hq9plus.pir \
src/gen_grammar.pir \
src/gen_actions.pir \
src/builtins/hello.pir \
src/builtins/nintynine_bottles_of_beer.pir \
src/builtins/plus.pir \
src/builtins/quine.pir
DOCS := README
BUILD_CLEANUPS := \
hq9plus.pbc \
"src/gen_*.pir" \
"*.c" \
"*$(O)" \
#IF(win32): parrot-hq9plus.exe \
#IF(win32): parrot-hq9plus.iss \
#IF(win32): "setup-parrot-*.exe" \
installable_hq9plus@exe@
TEST_CLEANUPS := \
"t/*.HQ9plus" \
"t/*.out"
# the default target
build: \
hq9plus/hq9plus.pbc \
hq9plus.pbc
all: build installable
hq9plus.pbc: hq9plus.pir
$(PARROT) $(PARROT_ARGS) -o hq9plus.pbc hq9plus.pir
hq9plus/hq9plus.pbc: $(SOURCES)
$(PARROT) $(PARROT_ARGS) -o hq9plus/hq9plus.pbc src/hq9plus.pir
src/gen_grammar.pir: $(PERL6GRAMMAR) src/parser/grammar.pg
$(PARROT) $(PARROT_ARGS) $(PERL6GRAMMAR) \
--output=src/gen_grammar.pir \
src/parser/grammar.pg
src/gen_actions.pir: $(NQP) src/parser/actions.pm
$(PARROT) $(PARROT_ARGS) $(NQP) --output=src/gen_actions.pir \
--target=pir src/parser/actions.pm
installable: installable_hq9plus@exe@
installable_hq9plus@exe@: hq9plus.pbc
$(PBC_TO_EXE) hq9plus.pbc --install
Makefile: Makefile.in
$(PARROT) Configure.pir
# This is a listing of all targets, that are meant to be called by users
help:
@echo ""
@echo "Following targets are available for the user:"
@echo ""
@echo " build: hq9plus.pbc"
@echo " This is the default."
@echo " hq9plus@exe@ Self-hosting binary not to be installed."
@echo " all: hq9plus.pbc hq9plus@exe@ installable"
@echo " installable: Create libs and self-hosting binaries to be installed."
@echo " install: Install the installable targets and docs."
@echo ""
@echo "Testing:"
@echo " test: Run the test suite."
@echo " test-installable: Test self-hosting targets."
@echo " testclean: Clean up test results."
@echo ""
@echo "Cleaning:"
@echo " clean: Basic cleaning up."
@echo " realclean: Removes also files generated by 'Configure.pl'"
@echo " distclean: Removes also anything built, in theory"
@echo ""
@echo "Misc:"
@echo " help: Print this help message."
@echo ""
test: build
prove -I $(LIB_DIR)/tools/lib t/*.t
install: installable
$(CP) installable_hq9plus@exe@ $(BIN_DIR)/parrot-hq9plus@exe@
$(CHMOD) 0755 $(BIN_DIR)/parrot-hq9plus@exe@
-$(MKPATH) $(LIB_DIR)/languages/hq9plus
$(CP) hq9plus/hq9plus.pbc $(LIB_DIR)/languages/hq9plus/hq9plus.pbc
-$(MKPATH) $(MANDIR)/man1
$(POD2MAN) doc/running.pod > $(MANDIR)/man1/parrot-hq9plus.1
-$(MKPATH) $(DOC_DIR)/languages/hq9plus
$(CP) $(DOCS) $(DOC_DIR)/languages/hq9plus
uninstall:
$(RM_F) $(BIN_DIR)/parrot-hq9plus@exe@
$(RM_RF) $(LIB_DIR)/languages/hq9plus
$(RM_F) $(MANDIR)/man1/parrot-hq9plus.1
$(RM_RF) $(DOC_DIR)/languages/hq9plus
win32-inno-installer: installable
-$(MKPATH) man/man1
$(POD2MAN) doc/running.pod > man/man1/parrot-hq9plus.1
-$(MKPATH) man/html
pod2html --infile doc/running.pod --outfile man/html/parrot-hq9plus.html
$(CP) installable_hq9plus@exe@ parrot-hq9plus.exe
$(PERL) -I$(LIB_DIR)/tools/lib $(LIB_DIR)/tools/dev/mk_inno_language.pl hq9plus
iscc parrot-hq9plus.iss
testclean:
$(RM_F) $(TEST_CLEANUPS)
clean:
$(RM_F) $(TEST_CLEANUPS) $(BUILD_CLEANUPS)
realclean:
$(RM_F) $(TEST_CLEANUPS) $(BUILD_CLEANUPS) Makefile
distclean: realclean
# Local variables:
# mode: makefile
# End:
# vim: ft=make: