]> cygwin.com Git - cygwin-apps/setup.git/blob - Makefile.am
Drop in SolvableVersion as a replacement for packageversion
[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 = -DLZMA_API_STATIC -I$(srcdir)/libgetopt++/include
32
33 inilex_CXXFLAGS:=-Wno-sign-compare
34
35 noinst_PROGRAMS = @SETUP@$(EXEEXT) @INILINT@
36
37 EXTRA_PROGRAMS = inilint
38 ## noinst_PROGRAMS +=inilint
39
40 EXTRA_DIST = \
41 CHANGES \
42 CONTRIBUTORS \
43 COPYING \
44 bootstrap.sh \
45 check-na.bmp \
46 check-no.bmp \
47 check-yes.bmp \
48 choose-rtarrow.bmp \
49 choose-spin.bmp \
50 cygwin.ico \
51 cygwin-setup.ico \
52 cygwin-terminal.ico \
53 setup.exe.manifest \
54 setup64.exe.manifest \
55 tree-minus.bmp \
56 tree-plus.bmp
57
58 # iniparse.hh is generated from iniparse.yy via bison -d, so it needs to be
59 # included here for proper tracking (but not iniparse.cc, since automake
60 # knows about that already)
61 BUILT_SOURCES = \
62 setup_version.c \
63 iniparse.hh
64
65 CLEANFILES = setup_version.c
66
67 inilint_LDADD = \
68 libgetopt++/libgetopt++.la
69 inilint_SOURCES = \
70 filemanip.cc \
71 filemanip.h \
72 find.cc \
73 find.h \
74 FindVisitor.cc \
75 FindVisitor.h \
76 LogSingleton.cc \
77 LogSingleton.h \
78 IniDBBuilder.h \
79 inilintmain.cc \
80 inilex.ll \
81 iniparse.yy \
82 IniParseFeedback.cc \
83 IniParseFeedback.h \
84 io_stream.h \
85 io_stream.cc \
86 io_stream_file.h \
87 io_stream_file.cc \
88 IOStreamProvider.h \
89 mkdir.cc \
90 mkdir.h \
91 mklink2.cc \
92 PackageSpecification.cc \
93 PackageSpecification.h \
94 PackageTrust.h \
95 csu_util/rfc1738.cc \
96 csu_util/rfc1738.h \
97 String++.cc \
98 String++.h
99
100 @SETUP@_LDADD = \
101 libgetopt++/libgetopt++.la -lgcrypt -lgpg-error -llzma -lbz2 -lz -lsolv -lregex \
102 -lshlwapi -lcomctl32 -lole32 -lws2_32 -lpsapi -luuid -lntdll -lwininet -lmingw32
103 @SETUP@_LDFLAGS = -mwindows -Wc,-static -static-libtool-libs
104 @SETUP@_SOURCES = \
105 AntiVirus.cc \
106 AntiVirus.h \
107 archive.cc \
108 archive.h \
109 archive_tar.cc \
110 archive_tar.h \
111 archive_tar_file.cc \
112 choose.cc \
113 choose.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 ConnectionSetting.cc \
123 ConnectionSetting.h \
124 ControlAdjuster.cc \
125 ControlAdjuster.h \
126 crypto.cc \
127 crypto.h \
128 cyg-pubkey.h \
129 desktop.cc \
130 desktop.h \
131 dialog.cc \
132 dialog.h \
133 diskfull.cc \
134 diskfull.h \
135 download.cc \
136 download.h \
137 Exception.cc \
138 Exception.h \
139 find.cc \
140 find.h \
141 FindVisitor.cc \
142 FindVisitor.h \
143 filemanip.cc \
144 filemanip.h \
145 fromcwd.cc \
146 Generic.h \
147 geturl.cc \
148 geturl.h \
149 gpg-packet.cc \
150 gpg-packet.h \
151 ini.cc \
152 ini.h \
153 IniDBBuilder.h \
154 IniDBBuilderPackage.cc \
155 IniDBBuilderPackage.h \
156 inilex.ll \
157 iniparse.yy \
158 IniParseFeedback.cc \
159 IniParseFeedback.h \
160 install.cc \
161 io_stream.cc \
162 io_stream.h \
163 io_stream_cygfile.cc \
164 io_stream_cygfile.h \
165 io_stream_file.cc \
166 io_stream_file.h \
167 io_stream_memory.cc \
168 io_stream_memory.h \
169 IOStreamProvider.h \
170 KeysSetting.cc \
171 KeysSetting.h \
172 libsolv.cc \
173 libsolv.h \
174 localdir.cc \
175 localdir.h \
176 LogFile.cc \
177 LogFile.h \
178 LogSingleton.cc \
179 LogSingleton.h \
180 main.cc \
181 mkdir.cc \
182 mkdir.h \
183 mklink2.cc \
184 mklink2.h \
185 mount.cc \
186 mount.h \
187 msg.cc \
188 msg.h \
189 net.cc \
190 net.h \
191 netio.cc \
192 netio.h \
193 nio-ie5.cc \
194 nio-ie5.h \
195 nio-file.cc \
196 nio-file.h \
197 nio-ftp.cc \
198 nio-ftp.h \
199 nio-http.cc \
200 nio-http.h \
201 package_db.cc \
202 package_db.h \
203 package_depends.h \
204 package_depends.cc \
205 package_meta.cc \
206 package_meta.h \
207 package_source.cc \
208 package_source.h \
209 package_version.h \
210 PackageSpecification.cc \
211 PackageSpecification.h \
212 PackageTrust.h \
213 PickCategoryLine.cc \
214 PickCategoryLine.h \
215 PickLine.h \
216 PickPackageLine.cc \
217 PickPackageLine.h \
218 PickView.cc \
219 PickView.h \
220 postinstall.cc \
221 postinstallresults.cc \
222 postinstallresults.h \
223 prereq.cc \
224 prereq.h \
225 processlist.cc \
226 processlist.h \
227 proppage.cc \
228 proppage.h \
229 propsheet.cc \
230 propsheet.h \
231 RECTWrapper.h \
232 res.rc \
233 resource.h \
234 root.cc \
235 root.h \
236 script.cc \
237 script.h \
238 setup_version.h \
239 setup_version.c \
240 sha2.h \
241 sha2.c \
242 simpsock.cc \
243 simpsock.h \
244 site.cc \
245 site.h \
246 source.cc \
247 source.h \
248 SourceSetting.cc \
249 SourceSetting.h \
250 splash.cc \
251 splash.h \
252 state.cc \
253 state.h \
254 String++.cc \
255 String++.h \
256 threebar.cc \
257 threebar.h \
258 UserSettings.cc \
259 UserSettings.h \
260 win32.cc \
261 win32.h \
262 window.cc \
263 window.h \
264 csu_util/MD5Sum.cc \
265 csu_util/MD5Sum.h \
266 csu_util/rfc1738.cc \
267 csu_util/rfc1738.h \
268 csu_util/version_compare.cc \
269 csu_util/version_compare.h
270
271 GITVER := $(shell cd $(srcdir) && git describe --match release_\* --abbrev=6 --dirty || "N/A")
272 VER := $(subst release_,,$(GITVER))
273 ARCH := @ARCH@
274
275 setup_version.c : Makefile
276 @echo "Setup version: " $(VER)
277 $(AM_V_GEN)(echo '#define VERSION_PREFIX "%%% setup-version"';\
278 echo 'static const char version_store[] = VERSION_PREFIX " '$(VER)'";';\
279 echo 'const char *setup_version = version_store + sizeof (VERSION_PREFIX);') > version.tmp && \
280 mv version.tmp setup_version.c
281
282 # setup.exe.manifest is included in res.rc
283 res.o: @SETUP@.exe.manifest
284
285 .rc.o:
286 $(AM_V_GEN)$(WINDRES) --include-dir $(srcdir) -o $@ $<
287
288 setup-src:
289 @ver=setup-$(VER);\
290 cd ${srcdir}; rm -f $$ver; ln -sf . $$ver;\
291 git ls-files | tar -T - -cJf ${CURDIR}/$$ver-src.tar.xz;\
292 echo $$ver-src.tar.xz; exec rm -f $$ver
293
294 # optional: strip and compress executable
295 .PHONY: strip upx
296
297 strip: all
298 $(OBJCOPY) --add-gnu-debuglink=/dev/null --only-keep-debug setup$(EXEEXT) setup.dbg
299 $(OBJCOPY) --strip-all setup$(EXEEXT)
300 $(OBJCOPY) --add-gnu-debuglink=setup.dbg setup$(EXEEXT) setup$(EXEEXT)
301
302 CLEANFILES += setup.dbg
303
304 upx: strip
305 @if [ -e `which upx` ]; then\
306 upx --best --lzma setup$(EXEEXT) ;\
307 else \
308 echo "UPX doesn't seem to be installed, cannot compress setup$(EXEEXT)." ;\
309 fi
310
311 release: upx
312 cp setup.dbg setup-${VER}.${ARCH}.dbg
313 cp setup${EXEEXT} setup-${VER}.${ARCH}${EXEEXT}
314
315 UPLOAD_HOST=cygwin-admin@cygwin.com
316 UPLOAD_PATH=/www/sourceware/htdocs/cygwin/setup
317
318 upload: release
319 scp setup-${VER}.$(ARCH).exe setup-${VER}.$(ARCH).dbg ${UPLOAD_HOST}:${UPLOAD_PATH}
320 ssh ${UPLOAD_HOST} gpg --detach-sign ${UPLOAD_PATH}/setup-${VER}.$(ARCH).exe
321
322 clean-local:
323 rm -f setup*${EXEEXT} setup*.dbg
This page took 0.05352 seconds and 5 git commands to generate.