]> cygwin.com Git - cygwin-apps/setup.git/blame - Makefile.am
Suppress bogus free-nonheap-object warning in iniparse.cc
[cygwin-apps/setup.git] / Makefile.am
CommitLineData
f6100b6f
RC
1## Process this file with automake to produce Makefile.in
2#
f6100b6f
RC
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#
f6100b6f
RC
14# Makefile for Cygwin installer
15
fe434e30 16SUBDIRS := @subdirs@ tests
f6100b6f
RC
17
18## DISTCLEANFILES = include/stamp-h include/stamp-h[0-9]*
19
8b726ef6
MB
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)
abad8c0c 22BASECXXFLAGS = -Werror -Wall -Wpointer-arith -Wcomments \
99f33a3b
CV
23 -Wcast-align -Wwrite-strings -fno-builtin-sscanf \
24 -Wno-attributes
1c6add37 25AM_CXXFLAGS = $(BASECXXFLAGS) -std=gnu++11 ${$(*F)_CXXFLAGS}
abad8c0c 26AM_CFLAGS = $(BASECXXFLAGS) -Wmissing-declarations -Winline \
43fe4376 27 -Wstrict-prototypes -Wmissing-prototypes
dacb1ebd
BD
28AM_YFLAGS = -d
29AM_LFLAGS = -8
92ef6cf8 30WINDRES = @WINDRES@
2752cfd1
JT
31AM_CPPFLAGS = -D__USE_MINGW_ANSI_STDIO=1 -DLZMA_API_STATIC\
32 -I$(srcdir)/libgetopt++/include \
c9641752 33 $(ZLIB_CFLAGS) $(LZMA_CFLAGS) $(ZSTD_CFLAGS) $(LIBCRYPT_CFLAGS) $(LIBSOLV_CFLAGS)
f6100b6f 34
6a03d5cd 35inilex_CXXFLAGS:=-Wno-sign-compare
69ccd766 36iniparse_CXXFLAGS:=-Wno-free-nonheap-object
6a03d5cd 37
a99dd611 38noinst_PROGRAMS = @SETUP@$(EXEEXT) inilint
f6100b6f 39
45e01f23 40EXTRA_DIST = \
89fc4ceb
MB
41 CHANGES \
42 CONTRIBUTORS \
43 COPYING \
44 bootstrap.sh \
89fc4ceb 45 cygwin.ico \
c0342e37
CV
46 cygwin-setup.ico \
47 cygwin-terminal.ico \
89fc4ceb 48 setup.exe.manifest \
db1c5abc
JT
49 tree-minus.ico \
50 tree-plus.ico
45e01f23 51
443b9db6 52# iniparse.hh is generated from iniparse.yy via bison -d, so it needs to be
dacb1ebd
BD
53# included here for proper tracking (but not iniparse.cc, since automake
54# knows about that already)
89fc4ceb
MB
55BUILT_SOURCES = \
56 setup_version.c \
443b9db6 57 iniparse.hh
f6100b6f 58
92ef6cf8
BD
59CLEANFILES = setup_version.c
60
89fc4ceb 61inilint_LDADD = \
0b90765c
JT
62 libgetopt++/libgetopt++.la \
63 -lntdll -luuid
a99dd611 64
58ee6135 65inilint_SOURCES = \
0b90765c
JT
66 filemanip.cc \
67 filemanip.h \
4b81d7a1
JT
68 CliParseFeedback.cc \
69 CliParseFeedback.h \
89fc4ceb
MB
70 LogSingleton.cc \
71 LogSingleton.h \
72 IniDBBuilder.h \
73 inilintmain.cc \
c63e8b4a 74 inilex.ll \
dacb1ebd 75 iniparse.yy \
0b90765c
JT
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 \
89fc4ceb 84 PackageTrust.h \
89fc4ceb 85 String++.cc \
0b90765c
JT
86 String++.h \
87 win32.cc \
88 win32.h
58ee6135 89
e49fef4d 90@SETUP@_LDADD = \
4221a216
JT
91 libgetopt++/libgetopt++.la \
92 $(LIBGCRYPT_LIBS) \
c9641752 93 $(ZSTD_LIBS) \
4221a216
JT
94 $(LZMA_LIBS) \
95 $(BZ2_LIBS) \
96 $(ZLIB_LIBS) \
97 $(LIBSOLV_LIBS) -lregex \
ca68262f
JT
98 -lshlwapi -lcomctl32 -lole32 -lpsapi -luuid -lntdll -lwininet -lws2_32 \
99 -lmingw32 -lssp
e49fef4d
YS
100@SETUP@_LDFLAGS = -mwindows -Wc,-static -static-libtool-libs
101@SETUP@_SOURCES = \
8ba85a54 102 actionlist.h \
f9e903a3
RC
103 AntiVirus.cc \
104 AntiVirus.h \
f6100b6f 105 archive.cc \
45e01f23 106 archive.h \
f6100b6f 107 archive_tar.cc \
45e01f23 108 archive_tar.h \
f6100b6f 109 archive_tar_file.cc \
f6100b6f 110 choose.cc \
45e01f23 111 choose.h \
b6dab3ea
CF
112 compactos.cc \
113 compactos.h \
f6100b6f 114 compress.cc \
45e01f23 115 compress.h \
f6100b6f 116 compress_bz.cc \
45e01f23 117 compress_bz.h \
f6100b6f 118 compress_gz.cc \
45e01f23 119 compress_gz.h \
671140f9
CW
120 compress_xz.cc \
121 compress_xz.h \
c9641752
AG
122 compress_zstd.cc \
123 compress_zstd.h \
b1902cbc
JT
124 confirm.cc \
125 confirm.h \
39b42ff3
RC
126 ConnectionSetting.cc \
127 ConnectionSetting.h \
ee91d9be
RC
128 ControlAdjuster.cc \
129 ControlAdjuster.h \
dbfe3c19
DK
130 crypto.cc \
131 crypto.h \
132 cyg-pubkey.h \
f6100b6f 133 desktop.cc \
45e01f23 134 desktop.h \
f6100b6f 135 dialog.cc \
45e01f23 136 dialog.h \
f6100b6f 137 diskfull.cc \
45e01f23 138 diskfull.h \
f6100b6f 139 download.cc \
58ee6135
RC
140 download.h \
141 Exception.cc \
142 Exception.h \
f6100b6f 143 find.cc \
45e01f23 144 find.h \
b401ef47
RC
145 FindVisitor.cc \
146 FindVisitor.h \
f6100b6f 147 filemanip.cc \
45e01f23 148 filemanip.h \
f6100b6f 149 fromcwd.cc \
31f0ccce 150 Generic.h \
f6100b6f 151 geturl.cc \
45e01f23 152 geturl.h \
dbfe3c19
DK
153 gpg-packet.cc \
154 gpg-packet.h \
f6100b6f 155 ini.cc \
45e01f23 156 ini.h \
076654e7
RC
157 IniDBBuilder.h \
158 IniDBBuilderPackage.cc \
159 IniDBBuilderPackage.h \
c63e8b4a 160 inilex.ll \
dacb1ebd 161 iniparse.yy \
67829ce0 162 IniParseFeedback.h \
f6100b6f
RC
163 install.cc \
164 io_stream.cc \
45e01f23 165 io_stream.h \
f6100b6f 166 io_stream_cygfile.cc \
45e01f23 167 io_stream_cygfile.h \
f6100b6f 168 io_stream_file.cc \
45e01f23 169 io_stream_file.h \
f6100b6f 170 io_stream_memory.cc \
45e01f23 171 io_stream_memory.h \
19911586 172 IOStreamProvider.h \
dbfe3c19
DK
173 KeysSetting.cc \
174 KeysSetting.h \
1c159e0a
JT
175 libsolv.cc \
176 libsolv.h \
ce9f6dd0
JT
177 ListView.cc \
178 ListView.h \
f6100b6f 179 localdir.cc \
45e01f23 180 localdir.h \
9f4a0c62
RC
181 LogFile.cc \
182 LogFile.h \
183 LogSingleton.cc \
184 LogSingleton.h \
f6100b6f 185 main.cc \
f6100b6f 186 mkdir.cc \
45e01f23 187 mkdir.h \
f6100b6f 188 mklink2.cc \
45e01f23 189 mklink2.h \
f6100b6f 190 mount.cc \
45e01f23 191 mount.h \
f6100b6f 192 msg.cc \
45e01f23 193 msg.h \
f6100b6f 194 net.cc \
45e01f23 195 net.h \
f6100b6f 196 netio.cc \
45e01f23 197 netio.h \
f6100b6f 198 nio-ie5.cc \
45e01f23 199 nio-ie5.h \
f6100b6f 200 package_db.cc \
45e01f23 201 package_db.h \
711d8346 202 package_depends.h \
4cd71131 203 package_depends.cc \
f6100b6f 204 package_meta.cc \
45e01f23 205 package_meta.h \
f6100b6f 206 package_source.cc \
45e01f23 207 package_source.h \
f3992588 208 package_version.h \
aa1e3b4d
RC
209 PackageSpecification.cc \
210 PackageSpecification.h \
076654e7 211 PackageTrust.h \
f6100b6f 212 PickCategoryLine.cc \
45e01f23 213 PickCategoryLine.h \
f6100b6f 214 PickPackageLine.cc \
45e01f23 215 PickPackageLine.h \
f6100b6f 216 PickView.cc \
45e01f23 217 PickView.h \
f6100b6f 218 postinstall.cc \
018b960d
JT
219 postinstallresults.cc \
220 postinstallresults.h \
82306ac2
BD
221 prereq.cc \
222 prereq.h \
ec366f61
JT
223 processlist.cc \
224 processlist.h \
f6100b6f 225 proppage.cc \
45e01f23 226 proppage.h \
f6100b6f 227 propsheet.cc \
45e01f23 228 propsheet.h \
8a264069 229 RECTWrapper.h \
f6100b6f 230 res.rc \
45e01f23 231 resource.h \
f6100b6f 232 root.cc \
45e01f23 233 root.h \
f6100b6f 234 script.cc \
45e01f23 235 script.h \
2b734ec7 236 setup_version.h \
f6100b6f 237 setup_version.c \
be13ef43
CV
238 sha2.h \
239 sha2.c \
f6100b6f 240 site.cc \
45e01f23 241 site.h \
f6100b6f 242 source.cc \
45e01f23 243 source.h \
6ff96351
RC
244 SourceSetting.cc \
245 SourceSetting.h \
f6100b6f 246 splash.cc \
45e01f23 247 splash.h \
f6100b6f 248 state.cc \
45e01f23 249 state.h \
f6100b6f 250 String++.cc \
45e01f23 251 String++.h \
f6100b6f 252 threebar.cc \
45e01f23 253 threebar.h \
ead15931
RC
254 UserSettings.cc \
255 UserSettings.h \
5072c0bb 256 win32.cc \
45e01f23
RC
257 win32.h \
258 window.cc \
f4d80c3f 259 window.h \
0229b1d7
MB
260 csu_util/MD5Sum.cc \
261 csu_util/MD5Sum.h \
946198be
MB
262 csu_util/rfc1738.cc \
263 csu_util/rfc1738.h \
2b734ec7 264 csu_util/version_compare.cc \
d88dca4a 265 csu_util/version_compare.h
89fc4ceb 266
0a416c48 267GITVER := $(shell cd $(srcdir) && git describe --match release_\* --abbrev=6 --dirty || echo "N/A")
ba3279e3 268VER := $(subst release_,,$(GITVER))
b9d154a2 269ARCH := @ARCH@
b941c8be 270
451e2119 271setup_version.c : Makefile
ba3279e3 272 @echo "Setup version: " $(VER)
e07b6f3d 273 $(AM_V_GEN)(echo '#define VERSION_PREFIX "%%% setup-version"';\
ba3279e3 274 echo 'static const char version_store[] = VERSION_PREFIX " '$(VER)'";';\
e07b6f3d 275 echo 'const char *setup_version = version_store + sizeof (VERSION_PREFIX);') > version.tmp && \
f6100b6f
RC
276 mv version.tmp setup_version.c
277
ee6430b9
JT
278# rules for translation maintenance
279.PHONY: pot rc2po po2rc
280
281pot:
282 cd $(srcdir) && rc2po -P res/en/res.rc res.pot
283
284LINGUAS=fr
285
286rc2po:
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
292po2rc:
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
ce5242d3 299# files included by res.rc
ee6430b9 300res.o: setup.exe.manifest res/en/res.rc $(foreach l,$(LINGUAS),res/$l/res.rc)
2ae3cf4e 301
92ef6cf8 302.rc.o:
5e9eb131 303 $(AM_V_GEN)$(WINDRES) --codepage 65001 --include-dir $(srcdir) -o $@ $<
f6100b6f 304
a3cc7986 305setup-src:
06eb6617
AG
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
a3cc7986 310
07f1b4a8
CV
311# optional: strip and compress executable
312.PHONY: strip upx
313
314strip: all
77ddbf45
JT
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
b9d154a2
JT
319CLEANFILES += setup.dbg
320
07f1b4a8
CV
321upx: 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
b9d154a2
JT
327
328release: upx
329 cp setup.dbg setup-${VER}.${ARCH}.dbg
330 cp setup${EXEEXT} setup-${VER}.${ARCH}${EXEEXT}
331
71c57a35
JT
332UPLOAD_HOST=cygwin-admin@cygwin.com
333UPLOAD_PATH=/www/sourceware/htdocs/cygwin/setup
f681d72f 334SIGN_KEYS="--enable-dsa2 --personal-digest-preferences=sha256 -u 676041BA -u 1A698DE9E2E56300"
71c57a35
JT
335
336upload: release
7a80c6d2 337 scp setup-${VER}.$(ARCH).exe setup-${VER}.$(ARCH).dbg ${UPLOAD_HOST}:${UPLOAD_PATH}
dec97682 338 ssh ${UPLOAD_HOST} gpg --batch ${SIGN_KEYS} --detach-sign ${UPLOAD_PATH}/setup-${VER}.$(ARCH).exe
71c57a35 339
b9d154a2
JT
340clean-local:
341 rm -f setup*${EXEEXT} setup*.dbg
This page took 0.162481 seconds and 5 git commands to generate.