-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.in
214 lines (198 loc) · 6.7 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
# Main constants.
prefix=@prefix@
exec_prefix=@prefix@
datarootdir=@datarootdir@
PACKAGE_TARNAME=@PACKAGE_TARNAME@
INSTALL_BIN=@bindir@
INSTALL_TOOL=@libexecdir@/@PACKAGE_TARNAME@
INSTALL_LIB=@datarootdir@/@PACKAGE_TARNAME@
INSTALL_DOC=@docdir@
SAVED_INSTALLATION_DIR=~/.config/ginger/saved-installation
# By default snapcraft uses $DESTDIR rather than --prefix. These
# variables allow the targets to work correctly with snapcraft.
USESNAP=@usesnap@
DD_INSTALL_TOOL=$(DESTDIR)$(INSTALL_TOOL)
DD_INSTALL_LIB=$(DESTDIR)$(INSTALL_LIB)
DD_INSTALL_BIN=$(DESTDIR)$(INSTALL_BIN)
DD_INSTALL_TOOL=$(DESTDIR)$(INSTALL_TOOL)
DD_INSTALL_TOOL=$(DESTDIR)$(INSTALL_TOOL)
DD_INSTALL_TOOL=$(DESTDIR)$(INSTALL_TOOL)
.PHONEY: all
all:
make -C apps $@
make -C autodocs $@
make -C projects $@
.PHONEY: clean
clean:
rm -rf _build/
make -C apps $@
make -C autodocs $@
make -C projects $@
.PHONEY: distclean
distclean: clean
rm -f Makefile
rm -f apps/Makefile
rm -f apps/appginger/Makefile
rm -f apps/appginger/cpp/Makefile
rm -f apps/appginger/unittest/Makefile
rm -f apps/autodocs/Makefile
rm -f apps/automatic/machine/Makefile
rm -f apps/automatic/metainfo/Makefile
rm -f apps/automatic/simple/Makefile
rm -f apps/automatic/sys/Makefile
rm -f apps/automatic/sysfn/Makefile
rm -f apps/common2gnx/Makefile
rm -f apps/common2gnx/cpp/Makefile
rm -f apps/fetchgnx/Makefile
rm -f apps/fetchgnx/cpp/Makefile
rm -f apps/fetchgnx/unittest/Makefile
rm -f apps/file2gnx/Makefile
rm -f apps/file2gnx/cpp/Makefile
rm -f apps/file2gnx/unittest/Makefile
rm -f apps/ginger/Makefile
rm -f apps/ginger/cpp/Makefile
rm -f apps/ginger-admin/Makefile
rm -f apps/ginger-admin/cpp/Makefile
rm -f apps/ginger-help/Makefile
rm -f apps/ginger-help/cpp/Makefile
rm -f apps/gprojlibtool/Makefile
rm -f apps/gprojlibtool/cpp/Makefile
rm -f apps/gvmtest/Makefile
rm -f apps/gvmtest/cpp/Makefile
rm -f apps/ivylibtool/cpp/Makefile
rm -f apps/libgng/Makefile
rm -f apps/libgng/cpp/Makefile
rm -f apps/libgng/unittest/Makefile
rm -f apps/libmetainfo/Makefile
rm -f apps/libmetainfo/cpp/Makefile
rm -f apps/libmetainfo/unittest/Makefile
rm -f apps/lisp2gnx/Makefile
rm -f apps/lisp2gnx/lsp/Makefile
rm -f apps/tidymnx/Makefile
rm -f apps/tidymnx/cpp/Makefile
rm -f apps/shebang/Makefile
rm -f apps/shebang/cpp/Makefile
rm -f apps/simplifygnx/Makefile
rm -f apps/simplifygnx/cpp/Makefile
rm -f apps/simplifygnx/unittest/Makefile
rm -f apps/gson2gnx/Makefile
rm -f apps/gson2gnx/cpp/Makefile
rm -f apps/lnx2mnx/Makefile
rm -f apps/lnx2mnx/cpp/Makefile
rm -f apps/src2lnx/Makefile
rm -f apps/src2lnx/cpp/Makefile
rm -f apps/lnx2csv/Makefile
rm -f apps/lnx2csv/cpp/Makefile
rm -f autodocs/Makefile
rm -f projects/Makefile
rm -f config.h
rm -f config.status
rm -f config.log
rm -f autom4te.cache/*.* autom4te.cache/requests
rmdir -p autom4te.cache
rm -f configure
# These will be installed in /usr/local/bin and will be available
# on the programmer's path.
USEREXECUTABLES=\
apps/appginger/cpp/ginger-cgi \
apps/appginger/cpp/ginger-script \
apps/appginger/cpp/ginger-info \
apps/appginger/cpp/ginger-cli \
apps/ginger/cpp/ginger \
apps/ginger-admin/cpp/ginger-admin
# These will be installed in /usr/local/libexec/ginger and will not be
# available on the programmer's path. They are helper functions.
LIBEXECUTABLES=\
apps/common2gnx/cpp/common2gnx \
apps/common2gnx/cpp/cstyle2gnx \
apps/fetchgnx/cpp/fetchgnx \
apps/file2gnx/cpp/file2gnx \
apps/ginger-help/cpp/ginger-help \
apps/gprojlibtool/cpp/gprojlibtool \
apps/ivylibtool/cpp/ivylibtool \
apps/lisp2gnx/lsp/lisp2gnx \
apps/shebang/cpp/shebang \
apps/simplifygnx/cpp/simplifygnx \
apps/tidymnx/cpp/tidymnx \
apps/gson2gnx/cpp/gson2gnx \
apps/src2lnx/cpp/src2lnx \
apps/lnx2csv/cpp/lnx2csv \
apps/lnx2mnx/cpp/lnx2mnx \
apps/gvmtest/cpp/gvmtest
.PHONEY: install
install: all
$(MAKE) install-as-is
.PHONEY: install-as-is
install-as-is:
# Installing user binaries into $(DESTDIR)$(INSTALL_BIN)
# Installing toolchain binaries into $(DESTDIR)$(INSTALL_TOOL)
# Installing support files $(DESTDIR)$(INSTALL_LIB)
mkdir -p $(DD_INSTALL_TOOL)
chmod a+rx,u+w $(DD_INSTALL_TOOL)
mkdir -p $(DD_INSTALL_LIB)
chmod a+rx,u+w $(DD_INSTALL_LIB)
mkdir -p $(DD_INSTALL_LIB)/ginger
chmod a+rx,u+w $(DD_INSTALL_LIB)/ginger
mkdir -p $(DD_INSTALL_BIN)
chmod a+rx,u+w $(DD_INSTALL_BIN)
mkdir -p $(DD_INSTALL_LIB)/lisp2gnx
chmod a+rx,u+w $(DD_INSTALL_LIB)/lisp2gnx
mkdir -p $(DD_INSTALL_LIB)/gvmtest
chmod a+rx,u+w $(DD_INSTALL_LIB)/gvmtest
mkdir -p $(DD_INSTALL_LIB)/autodocs
chmod a+rx,u+w $(DD_INSTALL_LIB)/autodocs
#
cp -r apps/ginger/usage $(DD_INSTALL_LIB)/ginger/
cp -r apps/ginger-admin/admin-templates $(DD_INSTALL_LIB)
( cd projects; tar cf - standard_library ) | ( cd $(DD_INSTALL_LIB); tar xf - )
#echo Installing docs into $(DD_INSTALL_DOC)
/usr/bin/install -m a=r AUTHORS BUGS COPYING NEWS THANKS $(DD_INSTALL_LIB)
/usr/bin/install -m a=r apps/lisp2gnx/lsp/lisp2gnx.lsp $(DD_INSTALL_LIB)/lisp2gnx
cp -r apps/gvmtest/cpp/help $(DD_INSTALL_LIB)/gvmtest
/usr/bin/install $(LIBEXECUTABLES) $(DD_INSTALL_TOOL)
/usr/bin/install $(USEREXECUTABLES) $(DD_INSTALL_BIN)
# Copy the autodocs
( cd autodocs/_build ; tar cf - . ) | ( cd $(DD_INSTALL_LIB)/autodocs ; tar xf - )
# N.B. The rm -rf commands are guarded by code that checks the
# paths end '/ginger'
.PHONEY: uninstall
uninstall:
# Removing user binaries from $(DESTDIR)$(INSTALL_BIN)
rm -f $(DESTDIR)$(INSTALL_BIN)/ginger
rm -f $(DESTDIR)$(INSTALL_BIN)/ginger-*
ifeq (ginger,$(notdir $(DESTDIR)$(INSTALL_TOOL)))
# Removing the toolchain binaries from $(DESTDIR)$(INSTALL_TOOL)
rm -rf $(DESTDIR)$(INSTALL_TOOL)
endif
ifeq (ginger,$(notdir $(DESTDIR)$(INSTALL_LIB)))
# Removing the support files from $(DESTDIR)$(INSTALL_LIB)
rm -rf $(DESTDIR)$(INSTALL_LIB)
endif
.PHONEY: save-installation
save-installation:
mkdir -p $(SAVED_INSTALLATION_DIR)/bin
mkdir -p $(SAVED_INSTALLATION_DIR)/libexec/ginger
mkdir -p $(SAVED_INSTALLATION_DIR)/share/ginger
cp $(INSTALL_BIN)/ginger $(SAVED_INSTALLATION_DIR)/bin
cp $(INSTALL_BIN)/ginger-* $(SAVED_INSTALLATION_DIR)/bin
( cd $(INSTALL_TOOL); tar cf - . ) | ( cd $(SAVED_INSTALLATION_DIR)/libexec/ginger; tar xf - )
( cd $(INSTALL_LIB); tar cf - . ) | ( cd $(SAVED_INSTALLATION_DIR)/share/ginger; tar xf - )
.PHONEY: restore-saved-installation
restore-saved-installation:
cp $(SAVED_INSTALLATION_DIR)/bin/* $(INSTALL_BIN)
( cd $(SAVED_INSTALLATION_DIR)/libexec/ginger; tar cf - ) | ( cd $(INSTALL_TOOL); tar xf - . )
( cd $(SAVED_INSTALLATION_DIR)/share/ginger; tar cf - ) | ( cd $(INSTALL_LIB); tar xf - . )
.PHONEY: unitcheck
unitcheck:
# To be done
.PHONEY: funccheck
funccheck:
(cd functests; nosetests)
.PHONEY: syscheck
syscheck:
(cd systests; nosetests)
.PHONEY: check
check:
make unitcheck
make funccheck
make syscheck