]> cygwin.com Git - cygwin-apps/setup.git/blob - Makefile.am
Suppress bogus free-nonheap-object warning in iniparse.cc
[cygwin-apps/setup.git] / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2 #
3 # Copyright (c) 2000, Red Hat, Inc.
4 # Copyright (c) 2002, Robert Collins
5 #
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
10 #
11 # A copy of the GNU General Public License can be found at
12 # http://www.gnu.org/
13 #
14 # Makefile for Cygwin installer
15
16 SUBDIRS := @subdirs@ tests
17
18 ## DISTCLEANFILES = include/stamp-h include/stamp-h[0-9]*
19
20 # We would like to use -Winline for C++ as well, but some STL code triggers
21 # this warning. (Bug verified present in gcc-3.3)
22 BASECXXFLAGS = -Werror -Wall -Wpointer-arith -Wcomments \
23 -Wcast-align -Wwrite-strings -fno-builtin-sscanf \
24 -Wno-attributes
25 AM_CXXFLAGS = $(BASECXXFLAGS) -std=gnu++11 ${$(*F)_CXXFLAGS}
26 AM_CFLAGS = $(BASECXXFLAGS) -Wmissing-declarations -Winline \
27 -Wstrict-prototypes -Wmissing-prototypes
28 AM_YFLAGS = -d
29 AM_LFLAGS = -8
30 WINDRES = @WINDRES@
31 AM_CPPFLAGS = -D__USE_MINGW_ANSI_STDIO=1 -DLZMA_API_STATIC\
32 -I$(srcdir)/libgetopt++/include \
33 $(ZLIB_CFLAGS) $(LZMA_CFLAGS) $(ZSTD_CFLAGS) $(LIBCRYPT_CFLAGS) $(LIBSOLV_CFLAGS)
34
35 inilex_CXXFLAGS:=-Wno-sign-compare
36 iniparse_CXXFLAGS:=-Wno-free-nonheap-object
37
38 noinst_PROGRAMS = @SETUP@$(EXEEXT) inilint
39
40 EXTRA_DIST = \
41 CHANGES \
42 CONTRIBUTORS \
43 COPYING \
44 bootstrap.sh \
45 cygwin.ico \
46 cygwin-setup.ico \
47 cygwin-terminal.ico \
48 setup.exe.manifest \
49 tree-minus.ico \
50 tree-plus.ico
51
52 # iniparse.hh is generated from iniparse.yy via bison -d, so it needs to be
53 # included here for proper tracking (but not iniparse.cc, since automake
54 # knows about that already)
55 BUILT_SOURCES = \
56 setup_version.c \
57 iniparse.hh
58
59 CLEANFILES = setup_version.c
60
61 inilint_LDADD = \
62 libgetopt++/libgetopt++.la \
63 -lntdll -luuid
64
65 inilint_SOURCES = \
66 filemanip.cc \
67 filemanip.h \
68 CliParseFeedback.cc \
69 CliParseFeedback.h \
70 LogSingleton.cc \
71 LogSingleton.h \
72 IniDBBuilder.h \
73 inilintmain.cc \
74 inilex.ll \
75 iniparse.yy \
76 io_stream.cc \
77 io_stream.h \
78 io_stream_file.cc \
79 io_stream_file.h \
80 mkdir.cc \
81 mkdir.h \
82 mklink2.cc \
83 mklink2.h \
84 PackageTrust.h \
85 String++.cc \
86 String++.h \
87 win32.cc \
88 win32.h
89
90 @SETUP@_LDADD = \
91 libgetopt++/libgetopt++.la \
92 $(LIBGCRYPT_LIBS) \
93 $(ZSTD_LIBS) \
94 $(LZMA_LIBS) \
95 $(BZ2_LIBS) \
96 $(ZLIB_LIBS) \
97 $(LIBSOLV_LIBS) -lregex \
98 -lshlwapi -lcomctl32 -lole32 -lpsapi -luuid -lntdll -lwininet -lws2_32 \
99 -lmingw32 -lssp
100 @SETUP@_LDFLAGS = -mwindows -Wc,-static -static-libtool-libs
101 @SETUP@_SOURCES = \
102 actionlist.h \
103 AntiVirus.cc \
104 AntiVirus.h \
105 archive.cc \
106 archive.h \
107 archive_tar.cc \
108 archive_tar.h \
109 archive_tar_file.cc \
110 choose.cc \
111 choose.h \
112 compactos.cc \
113 compactos.h \
114 compress.cc \
115 compress.h \
116 compress_bz.cc \
117 compress_bz.h \
118 compress_gz.cc \
119 compress_gz.h \
120 compress_xz.cc \
121 compress_xz.h \
122 compress_zstd.cc \
123 compress_zstd.h \
124 confirm.cc \
125 confirm.h \
126 ConnectionSetting.cc \
127 ConnectionSetting.h \
128 ControlAdjuster.cc \
129 ControlAdjuster.h \
130 crypto.cc \
131 crypto.h \
132 cyg-pubkey.h \
133 desktop.cc \
134 desktop.h \
135 dialog.cc \
136 dialog.h \
137 diskfull.cc \
138 diskfull.h \
139 download.cc \
140 download.h \
141 Exception.cc \
142 Exception.h \
143 find.cc \
144 find.h \
145 FindVisitor.cc \
146 FindVisitor.h \
147 filemanip.cc \
148 filemanip.h \
149 fromcwd.cc \
150 Generic.h \
151 geturl.cc \
152 geturl.h \
153 gpg-packet.cc \
154 gpg-packet.h \
155 ini.cc \
156 ini.h \
157 IniDBBuilder.h \
158 IniDBBuilderPackage.cc \
159 IniDBBuilderPackage.h \
160 inilex.ll \
161 iniparse.yy \
162 IniParseFeedback.h \
163 install.cc \
164 io_stream.cc \
165 io_stream.h \
166 io_stream_cygfile.cc \
167 io_stream_cygfile.h \
168 io_stream_file.cc \
169 io_stream_file.h \
170 io_stream_memory.cc \
171 io_stream_memory.h \
172 IOStreamProvider.h \
173 KeysSetting.cc \
174 KeysSetting.h \
175 libsolv.cc \
176 libsolv.h \
177 ListView.cc \
178 ListView.h \
179 localdir.cc \
180 localdir.h \
181 LogFile.cc \
182 LogFile.h \
183 LogSingleton.cc \
184 LogSingleton.h \
185 main.cc \
186 mkdir.cc \
187 mkdir.h \
188 mklink2.cc \
189 mklink2.h \
190 mount.cc \
191 mount.h \
192 msg.cc \
193 msg.h \
194 net.cc \
195 net.h \
196 netio.cc \
197 netio.h \
198 nio-ie5.cc \
199 nio-ie5.h \
200 package_db.cc \
201 package_db.h \
202 package_depends.h \
203 package_depends.cc \
204 package_meta.cc \
205 package_meta.h \
206 package_source.cc \
207 package_source.h \
208 package_version.h \
209 PackageSpecification.cc \
210 PackageSpecification.h \
211 PackageTrust.h \
212 PickCategoryLine.cc \
213 PickCategoryLine.h \
214 PickPackageLine.cc \
215 PickPackageLine.h \
216 PickView.cc \
217 PickView.h \
218 postinstall.cc \
219 postinstallresults.cc \
220 postinstallresults.h \
221 prereq.cc \
222 prereq.h \
223 processlist.cc \
224 processlist.h \
225 proppage.cc \
226 proppage.h \
227 propsheet.cc \
228 propsheet.h \
229 RECTWrapper.h \
230 res.rc \
231 resource.h \
232 root.cc \
233 root.h \
234 script.cc \
235 script.h \
236 setup_version.h \
237 setup_version.c \
238 sha2.h \
239 sha2.c \
240 site.cc \
241 site.h \
242 source.cc \
243 source.h \
244 SourceSetting.cc \
245 SourceSetting.h \
246 splash.cc \
247 splash.h \
248 state.cc \
249 state.h \
250 String++.cc \
251 String++.h \
252 threebar.cc \
253 threebar.h \
254 UserSettings.cc \
255 UserSettings.h \
256 win32.cc \
257 win32.h \
258 window.cc \
259 window.h \
260 csu_util/MD5Sum.cc \
261 csu_util/MD5Sum.h \
262 csu_util/rfc1738.cc \
263 csu_util/rfc1738.h \
264 csu_util/version_compare.cc \
265 csu_util/version_compare.h
266
267 GITVER := $(shell cd $(srcdir) && git describe --match release_\* --abbrev=6 --dirty || echo "N/A")
268 VER := $(subst release_,,$(GITVER))
269 ARCH := @ARCH@
270
271 setup_version.c : Makefile
272 @echo "Setup version: " $(VER)
273 $(AM_V_GEN)(echo '#define VERSION_PREFIX "%%% setup-version"';\
274 echo 'static const char version_store[] = VERSION_PREFIX " '$(VER)'";';\
275 echo 'const char *setup_version = version_store + sizeof (VERSION_PREFIX);') > version.tmp && \
276 mv version.tmp setup_version.c
277
278 # rules for translation maintenance
279 .PHONY: pot rc2po po2rc
280
281 pot:
282 cd $(srcdir) && rc2po -P res/en/res.rc res.pot
283
284 LINGUAS=fr
285
286 rc2po:
287 cd $(srcdir) && \
288 for l in $(LINGUAS) ; do \
289 rc2po -t res/en/res.rc --charset=utf-8 res/$$l/res.rc po/$$l/ ; \
290 done
291
292 po2rc:
293 cd $(srcdir) && \
294 for l in $(LINGUAS) ; do \
295 po2rc -t res/en/res.rc --charset-output=utf-8 $$(./langopts $$l) po/$$l/ res/$$l && \
296 d2u -q res/$$l/res.rc ; \
297 done
298
299 # files included by res.rc
300 res.o: setup.exe.manifest res/en/res.rc $(foreach l,$(LINGUAS),res/$l/res.rc)
301
302 .rc.o:
303 $(AM_V_GEN)$(WINDRES) --codepage 65001 --include-dir $(srcdir) -o $@ $<
304
305 setup-src:
306 @ver=setup-$(VER);\
307 cd ${srcdir}; rm -f $$ver; ln -sf . $$ver;\
308 git ls-files | tar -T - -cJf ${CURDIR}/$$ver-src.tar.xz;\
309 echo $$ver-src.tar.xz; exec rm -f $$ver
310
311 # optional: strip and compress executable
312 .PHONY: strip upx
313
314 strip: all
315 $(OBJCOPY) --add-gnu-debuglink=/dev/null --only-keep-debug setup$(EXEEXT) setup.dbg
316 $(OBJCOPY) --strip-all setup$(EXEEXT)
317 $(OBJCOPY) --add-gnu-debuglink=setup.dbg setup$(EXEEXT) setup$(EXEEXT)
318
319 CLEANFILES += setup.dbg
320
321 upx: strip
322 @if [ -e `which upx` ]; then\
323 upx --best --lzma setup$(EXEEXT) ;\
324 else \
325 echo "UPX doesn't seem to be installed, cannot compress setup$(EXEEXT)." ;\
326 fi
327
328 release: upx
329 cp setup.dbg setup-${VER}.${ARCH}.dbg
330 cp setup${EXEEXT} setup-${VER}.${ARCH}${EXEEXT}
331
332 UPLOAD_HOST=cygwin-admin@cygwin.com
333 UPLOAD_PATH=/www/sourceware/htdocs/cygwin/setup
334 SIGN_KEYS="--enable-dsa2 --personal-digest-preferences=sha256 -u 676041BA -u 1A698DE9E2E56300"
335
336 upload: release
337 scp setup-${VER}.$(ARCH).exe setup-${VER}.$(ARCH).dbg ${UPLOAD_HOST}:${UPLOAD_PATH}
338 ssh ${UPLOAD_HOST} gpg --batch ${SIGN_KEYS} --detach-sign ${UPLOAD_PATH}/setup-${VER}.$(ARCH).exe
339
340 clean-local:
341 rm -f setup*${EXEEXT} setup*.dbg
This page took 0.050725 seconds and 5 git commands to generate.