Navigation Menu

Skip to content

Latest commit

 

History

History
160 lines (140 loc) · 6.46 KB

Makefile.am

File metadata and controls

160 lines (140 loc) · 6.46 KB
 
Jun 27, 2011
Jun 27, 2011
1
Sep 28, 2011
Sep 28, 2011
2
3
4
5
SUBDIRS =
if BUILD_WWW
SUBDIRS += www
endif
Sep 22, 2011
Sep 22, 2011
6
if USE_NLS
Sep 28, 2011
Sep 28, 2011
7
SUBDIRS += po
Sep 22, 2011
Sep 22, 2011
8
endif
Jun 27, 2011
Jun 27, 2011
9
10
lib_LTLIBRARIES = libopenconnect.la
Nov 7, 2011
Nov 7, 2011
11
sbin_PROGRAMS = openconnect
Jun 27, 2011
Jun 27, 2011
12
13
man8_MANS = openconnect.8
Nov 24, 2011
Nov 24, 2011
14
AM_CPPFLAGS = -DLOCALEDIR="\"$(localedir)\""
Jun 27, 2011
Jun 27, 2011
15
16
openconnect_SOURCES = xml.c main.c dtls.c cstp.c mainloop.c tun.c
Oct 13, 2012
Oct 13, 2012
17
18
openconnect_CFLAGS = $(SSL_CFLAGS) $(DTLS_SSL_CFLAGS) $(LIBXML2_CFLAGS) $(LIBPROXY_CFLAGS) $(ZLIB_CFLAGS) $(LIBSTOKEN_CFLAGS)
openconnect_LDADD = libopenconnect.la $(SSL_LIBS) $(DTLS_SSL_LIBS) $(LIBXML2_LIBS) $(LIBPROXY_LIBS) $(ZLIB_LIBS) $(LIBINTL) $(LIBSTOKEN_LIBS)
Jun 27, 2011
Jun 27, 2011
19
Jun 14, 2012
Jun 14, 2012
20
library_srcs = ssl.c http.c auth.c library.c compat.c
Jun 14, 2012
Jun 14, 2012
21
lib_srcs_gnutls = gnutls.c gnutls_pkcs12.c gnutls_tpm.c
Jun 14, 2012
Jun 14, 2012
22
lib_srcs_openssl = openssl.c
Jun 15, 2012
Jun 15, 2012
23
24
25
POTFILES = $(openconnect_SOURCES) $(lib_srcs_openssl) $(lib_srcs_gnutls) $(library_srcs)
Jun 14, 2012
Jun 14, 2012
26
27
28
29
30
31
if OPENCONNECT_GNUTLS
library_srcs += $(lib_srcs_gnutls)
endif
if OPENCONNECT_OPENSSL
library_srcs += $(lib_srcs_openssl)
endif
Nov 6, 2011
Nov 6, 2011
32
libopenconnect_la_SOURCES = version.c $(library_srcs)
Oct 13, 2012
Oct 13, 2012
33
34
libopenconnect_la_CFLAGS = $(SSL_CFLAGS) $(LIBXML2_CFLAGS) $(LIBPROXY_CFLAGS) $(P11KIT_CFLAGS) $(TSS_CFLAGS) $(LIBSTOKEN_CFLAGS)
libopenconnect_la_LIBADD = $(SSL_LIBS) $(LIBXML2_LIBS) $(LIBPROXY_LIBS) $(LIBINTL) $(P11KIT_LIBS) $(TSS_LIBS) $(LIBSTOKEN_LIBS)
Nov 12, 2012
Nov 12, 2012
35
36
37
38
39
40
41
42
43
if OPENBSD_LIBTOOL
# OpenBSD's libtool doesn't have -version-number, but its -version-info arg
# does what GNU libtool's -version-number does. Which arguably is what the
# GNU -version-info arg ought to do too. I hate libtool.
LT_VER_ARG = -version-info
else
LT_VER_ARG = -version-number
endif
libopenconnect_la_LDFLAGS = $(LT_VER_ARG) @APIMAJOR@:@APIMINOR@
Jun 15, 2012
Jun 15, 2012
44
noinst_HEADERS = openconnect-internal.h openconnect.h gnutls.h
Jun 27, 2011
Jun 27, 2011
45
include_HEADERS = openconnect.h
May 13, 2012
May 13, 2012
46
if HAVE_SYMBOL_VERSIONING
May 13, 2012
May 13, 2012
47
libopenconnect_la_LDFLAGS += -Wl,@VERSION_SCRIPT_ARG@,libopenconnect.map
May 13, 2012
May 13, 2012
48
49
libopenconnect_la_DEPENDENCIES = libopenconnect.map
endif
Jun 27, 2011
Jun 27, 2011
50
51
52
pkgconfig_DATA = openconnect.pc
Jun 15, 2012
Jun 15, 2012
53
EXTRA_DIST = version.sh COPYING.LGPL $(lib_srcs_openssl) $(lib_srcs_gnutls) Android.mk
Jun 27, 2011
Jun 27, 2011
54
Nov 7, 2011
Nov 7, 2011
55
DISTCLEANFILES = $(pkgconfig_DATA)
Jun 27, 2011
Jun 27, 2011
56
Nov 7, 2011
Nov 7, 2011
57
main.o: version.c
Jun 14, 2012
Jun 14, 2012
58
59
version.c: $(library_srcs) $(lib_openssl_srcs) $(lib_gnutls_srcs) \
$(openconnect_SOURCES) Makefile.am configure.ac \
Nov 7, 2011
Nov 7, 2011
60
openconnect.h openconnect-internal.h version.sh @GITVERSIONDEPS@
Jun 8, 2012
Jun 8, 2012
61
@cd $(srcdir) && ./version.sh $(abs_builddir)/version.c
Jun 27, 2011
Jun 27, 2011
62
Jun 27, 2011
Jun 27, 2011
63
tmp-dist: uncommitted-check
Nov 4, 2011
Nov 4, 2011
64
$(MAKE) $(AM_MAKEFLAGS) VERSION=$(patsubst v%,%,$(shell git describe --tags)) DISTHOOK=0 dist
Jun 27, 2011
Jun 27, 2011
65
66
67
68
uncommitted-check:
@if ! git update-index --refresh --unmerged || \
! git diff-index --name-only --exit-code HEAD; then \
Jun 29, 2011
Jun 29, 2011
69
echo "*** ERROR: Uncommitted changes in above files"; exit 1; fi
Jun 27, 2011
Jun 27, 2011
70
Nov 4, 2011
Nov 4, 2011
71
DISTHOOK=1
Jun 27, 2011
Jun 27, 2011
72
dist-hook: uncommitted-check
Nov 4, 2011
Nov 4, 2011
73
74
75
76
77
78
@if [ $(DISTHOOK) = 1 ]; then \
if ! git rev-parse --verify v$(VERSION) &> /dev/null; then \
echo "*** ERROR: Version v$(VERSION) is not tagged"; exit 1; fi ; \
if ! git diff --name-only --exit-code v$(VERSION) HEAD > /dev/null; then \
echo "*** ERROR: Git checkout not at version v$(VERSION)"; exit 1; fi ; \
fi
Jun 27, 2011
Jun 27, 2011
79
Nov 8, 2011
Nov 8, 2011
80
81
82
83
84
sign-dist: dist
@for a in $(DIST_ARCHIVES); do \
gpg --default-key 67E2F359 --detach-sign -a $$a ; \
done
Jun 27, 2011
Jun 27, 2011
85
tag: uncommitted-check
Jun 29, 2011
Jun 29, 2011
86
@if git rev-parse --verify v$(VERSION) &> /dev/null; then \
Jun 27, 2011
Jun 27, 2011
87
echo "*** ERROR: Version v$(VERSION) is already tagged"; exit 1; fi
Jun 13, 2012
Jun 13, 2012
88
89
@sed 's/AC_INIT.*/AC_INIT(openconnect, $(VERSION))/' -i $(srcdir)/configure.ac
@sed 's/^v=.*/v="v$(VERSION)"/' -i $(srcdir)/version.sh
Sep 28, 2011
Sep 28, 2011
90
91
92
@( echo '1,/<!-- latest-release-start -->/p' ;\
echo '/<!-- latest-release-end -->/,$$p' ;\
echo '/<!-- latest-release-start -->/a\' ;\
Nov 8, 2011
Nov 8, 2011
93
94
95
echo 'The latest release is <a href="ftp://ftp.infradead.org/pub/openconnect/openconnect-$(VERSION).tar.gz">OpenConnect v$(VERSION)</a>\' ;\
echo '<i>(<a href="ftp://ftp.infradead.org/pub/openconnect/openconnect-$(VERSION).tar.gz.asc">PGP signature</a>)</i>,\' ;\
echo 'released on $(shell date +%Y-%m-%d) with the following changelog:</p>\' ;\
Jun 13, 2012
Jun 13, 2012
96
sed '0,/<b>OpenConnect HEAD/d;/<\/ul><br\/>/,$$d;s/$$/\\/' $(srcdir)/www/changelog.xml ;\
Sep 28, 2011
Sep 28, 2011
97
echo ' </ul>' ) | \
Jun 13, 2012
Jun 13, 2012
98
sed -n -f - -i $(srcdir)/www/download.xml
Jun 27, 2011
Jun 27, 2011
99
@( echo "s/Last modified: .*/Last modified: $(shell date)/" ;\
Sep 28, 2011
Sep 28, 2011
100
101
102
103
echo '/ <li><b>OpenConnect HEAD/a\' ;\
echo ' <ul>\' ;\
echo ' <li><i>No changelog entries yet</i></li>\';\
echo ' </ul><br/>\' ; echo ' </li>\' ;\
Nov 8, 2011
Nov 8, 2011
104
105
echo ' <li><b><a href="ftp://ftp.infradead.org/pub/openconnect/openconnect-$(VERSION).tar.gz">OpenConnect v$(VERSION)</a></b>\' ;\
echo ' <i>(<a href="ftp://ftp.infradead.org/pub/openconnect/openconnect-$(VERSION).tar.gz.asc">PGP signature</a>)</i> &#8212; $(shell date +%Y-%m-%d)' ) | \
Jun 13, 2012
Jun 13, 2012
106
sed -f - -i $(srcdir)/www/changelog.xml
Jun 27, 2011
Jun 27, 2011
107
# stupid syntax highlighting '
Jun 13, 2012
Jun 13, 2012
108
@cd $(srcdir) && git commit -s -m "Tag version $(VERSION)" configure.ac version.sh www/download.xml www/changelog.xml
Jun 27, 2011
Jun 27, 2011
109
@git tag v$(VERSION)
Jun 13, 2012
Jun 13, 2012
110
@cd $(srcdir) && ./autogen.sh
Oct 4, 2011
Oct 4, 2011
111
Jun 20, 2012
Jun 20, 2012
112
update-translations: po/$(PACKAGE).pot
Jun 11, 2012
Jun 11, 2012
113
114
115
@cd $(top_srcdir); if ! git diff-index --name-only --exit-code HEAD -- po/; then \
echo "*** ERROR: Uncommitted changes in above files"; exit 1; \
else \
Jun 23, 2012
Jun 23, 2012
116
for a in po/*.po; do \
Jul 5, 2012
Jul 5, 2012
117
msgmerge -q -N -F $$a $(abs_builddir)/po/$(PACKAGE).pot | sed '0,/^#:/d' > $$a.old ; \
Jun 23, 2012
Jun 23, 2012
118
done && \
Jun 20, 2012
Jun 20, 2012
119
120
tx pull -af && \
for a in po/*.po; do \
Jul 8, 2012
Jul 8, 2012
121
122
msgmerge -q -N -F $$a $(abs_builddir)/po/$(PACKAGE).pot > $$a.new ; \
sed '0,/^#:/d' $$a.new > $$a.new.cmp ; \
Jun 23, 2012
Jun 23, 2012
123
124
125
if ! git ls-tree --name-only HEAD $$a | grep -q $$a; then \
echo New file $$a ; \
git add $$a ; \
Jul 8, 2012
Jul 8, 2012
126
elif ! diff -u $$a.old $$a.new.cmp; then \
Jun 23, 2012
Jun 23, 2012
127
128
129
130
131
echo New changes for $$a; \
mv $$a.new $$a; \
else \
git checkout -f HEAD $$a ; \
fi ; \
Jul 8, 2012
Jul 8, 2012
132
rm -f $$a.old $$a.new $$a.new.cmp ; \
Jun 20, 2012
Jun 20, 2012
133
done && \
Jun 23, 2012
Jun 23, 2012
134
135
136
137
138
139
140
ls po/*.po | sed 's%^po/\(.*\)\.po%\1%' > po/LINGUAS ; \
if ! git update-index -q --refresh --unmerged || \
! git diff-index --name-only --exit-code HEAD -- po/ >/dev/null; then \
git commit -s -m "Update translations from Transifex" -- po/ ; \
else \
echo No changes to commit ; \
fi ; \
Jun 11, 2012
Jun 11, 2012
141
fi
Oct 4, 2011
Oct 4, 2011
142
Jun 15, 2012
Jun 15, 2012
143
144
upload-pot: po/$(PACKAGE).pot
@if [ ${abs_top_builddir} != $(abs_top_srcdir) ]; then \
Jun 11, 2012
Jun 11, 2012
145
ln -sf ${abs_top_srcdir}/.tx .tx; fi
Jun 15, 2012
Jun 15, 2012
146
147
148
149
150
151
152
153
154
@tx push -s
po/$(PACKAGE).pot: $(POTFILES) Makefile
@echo "Regenerating $@" ; rm -f $@ && \
xgettext --directory=$(top_srcdir) --from-code=UTF-8 \
--add-comments --keyword=_ --keyword=N_ \
--package-name="@PACKAGE@" --package-version="@VERSION@" \
--msgid-bugs-address=openconnect-devel@lists.infradead.org \
-o $@ $(POTFILES)
Jun 15, 2012
Jun 15, 2012
155
156
157
158
159
160
Android.mk: Makefile.am
@for a in openconnect_SOURCES library_srcs lib_srcs_openssl noinst_HEADERS; do \
FILES=`grep "^$$a = " $(top_srcdir)/Makefile.am`; \
sed "s/^$$a = .*/$$FILES/" -i $(top_srcdir)/Android.mk; \
done