4 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
5 AM_MAKEFLAGS = --no-print-directory
10 OS = $(shell uname -s)
12 DEBIAN_TARBALL_NAME = $(PACKAGE_NAME)_$(PACKAGE_VERSION).orig.tar.xz
15 $(DEBIAN_TARBALL_NAME)
22 -include $(top_builddir)/config.h \
23 -DSYSCONFDIR=\""$(sysconfdir)"\" \
26 AM_CFLAGS = ${my_CFLAGS} \
32 # leaving a space here to work around automake's conditionals
34 AM_LDFLAGS += -Wl,-dead_strip
45 DISTCHECK_CONFIGURE_FLAGS = \
46 --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
49 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(SED) \
50 -e 's,@VERSION\@,$(VERSION),g' \
51 -e 's,@prefix\@,$(prefix),g' \
52 -e 's,@exec_prefix\@,$(exec_prefix),g' \
53 -e 's,@bindir\@,$(bindir),g' \
54 -e 's,@libdir\@,$(libdir),g' \
55 -e 's,@includedir\@,$(includedir),g' \
56 -e 's,@databasedir\@,$(databasedir),g' \
59 databasedir = $(localstatedir)/lib/location
60 pkgconfigdir = $(libdir)/pkgconfig
65 @INTLTOOL_POLICY_RULE@
67 # ------------------------------------------------------------------------------
69 AM_V_ASCIIDOC = $(AM_V_ASCIIDOC_$(V))
70 AM_V_ASCIIDOC_ = $(AM_V_ASCIIDOC_$(AM_DEFAULT_VERBOSITY))
71 AM_V_ASCIIDOC_0 = @echo " ASCIIDOC" $@;
73 AM_V_XSLT = $(AM_V_XSLT_$(V))
74 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
75 AM_V_XSLT_0 = @echo " XSLT " $@;
77 # ------------------------------------------------------------------------------
81 $(MAKE) -C po update-po
84 examples/private-key.pem \
85 examples/public-key.pem \
86 examples/python/create-database.py \
87 examples/python/read-database.py
89 pkginclude_HEADERS = \
98 src/loc/stringpool.h \
105 src_libloc_la_SOURCES = \
115 EXTRA_DIST += src/libloc.sym
117 src_libloc_la_CFLAGS = \
122 src_libloc_la_LDFLAGS = \
124 -version-info $(LIBLOC_CURRENT):$(LIBLOC_REVISION):$(LIBLOC_AGE)
126 if HAVE_LD_VERSION_SCRIPT
127 src_libloc_la_LDFLAGS += -Wl,--version-script=$(top_srcdir)/src/libloc.sym
129 src_libloc_la_LDFLAGS += -export-symbols $(top_srcdir)/src/libloc.sym
132 src_libloc_la_LIBADD = \
136 src_libloc_la_DEPENDENCIES = \
137 ${top_srcdir}/src/libloc.sym
148 pyexec_LTLIBRARIES = \
149 src/python/location.la
151 src_python_location_la_SOURCES = \
152 src/python/locationmodule.c \
153 src/python/locationmodule.h \
156 src/python/country.c \
157 src/python/country.h \
158 src/python/database.c \
159 src/python/database.h \
160 src/python/network.c \
161 src/python/network.h \
162 src/python/writer.c \
165 src_python_location_la_CFLAGS = \
169 src_python_location_la_LDFLAGS = \
175 src_python_location_la_LIBADD = \
179 # Compile & install bindings
180 all-local: $(foreach binding,$(BINDINGS),build-$(binding))
181 check-local: $(foreach binding,$(BINDINGS),check-$(binding))
182 install-exec-local: $(foreach binding,$(BINDINGS),install-$(binding))
183 clean-local: $(foreach binding,$(BINDINGS),clean-$(binding))
184 uninstall-local: $(foreach binding,$(BINDINGS),uninstall-$(binding))
188 src/perl/.gitignore \
189 src/perl/Location.xs \
191 src/perl/Makefile.PL \
192 src/perl/lib/Location.pm \
193 src/perl/t/Location.t \
198 @mkdir -p $(builddir)/src/perl/{lib,t}
199 @test -e $(builddir)/src/perl/Location.xs || ln -s --relative $(srcdir)/src/perl/Location.xs $(builddir)/src/perl/
200 @test -e $(builddir)/src/perl/MANIFEST || ln -s --relative $(srcdir)/src/perl/MANIFEST $(builddir)/src/perl/
201 @test -e $(builddir)/src/perl/Makefile.PL || ln -s --relative $(srcdir)/src/perl/Makefile.PL $(builddir)/src/perl/
202 @test -e $(builddir)/src/perl/lib/Location.pm || ln -s --relative $(srcdir)/src/perl/lib/Location.pm $(builddir)/src/perl/lib/
203 @test -e $(builddir)/src/perl/t/Location.t || ln -s --relative $(srcdir)/src/perl/t/Location.t $(builddir)/src/perl/t/
204 @test -e $(builddir)/src/perl/typemap || ln -s --relative $(srcdir)/src/perl/typemap $(builddir)/src/perl/
206 cd $(builddir)/src/perl && $(PERL) Makefile.PL PREFIX="$(prefix)" \
207 INC="-I$(abs_srcdir)/src" LIBS="-L$(abs_builddir)/src/.libs -lloc"
208 cd $(builddir)/src/perl && $(MAKE) LD_RUN_PATH=
211 check-perl: testdata.db
212 cd $(builddir)/src/perl && $(MAKE) LD_LIBRARY_PATH="$(abs_builddir)/src/.libs" test \
213 database="../../$<" keyfile="$(abs_srcdir)/examples/public-key.pem"
217 cd $(builddir)/src/perl && $(MAKE) install
221 cd $(builddir)/src/perl && $(MAKE) distclean
223 .PHONY: uninstall-perl
226 $(DESTDIR)/$(prefix)/lib/*/perl/*/Location.pm \
227 $(DESTDIR)/$(prefix)/lib/*/perl/*/auto/Location \
228 $(DESTDIR)/$(prefix)/lib/*/perl/*/perllocal.pod \
229 $(DESTDIR)/$(prefix)/man/man3/Location.3pm
232 src/python/location-downloader \
233 src/python/location-exporter \
234 src/python/location-query
237 src/python/location-downloader.in \
238 src/python/location-exporter.in \
239 src/python/location-query.in
242 src/python/location-downloader \
243 src/python/location-exporter \
244 src/python/location-query
246 # ------------------------------------------------------------------------------
249 systemdsystemunit_DATA = \
250 src/systemd/location-downloader.service \
251 src/systemd/location-downloader.timer
254 $(systemdsystemunit_DATA)
257 $(systemdsystemunitdir)
261 src/systemd/location-downloader.service.in \
262 src/systemd/location-downloader.timer.in
264 # ------------------------------------------------------------------------------
266 dist_database_DATA = \
269 # ------------------------------------------------------------------------------
274 -DABS_SRCDIR=\"$(abs_srcdir)\"
278 src/test-stringpool \
288 testdata.db: examples/python/create-database.py
289 PYTHONPATH=$(abs_builddir)/src/python/.libs \
290 ABS_SRCDIR="$(abs_srcdir)" \
295 src/test-stringpool \
302 src_test_libloc_SOURCES = \
305 src_test_libloc_CFLAGS = \
308 src_test_libloc_LDADD = \
311 src_test_as_SOURCES = \
314 src_test_as_CFLAGS = \
317 src_test_as_LDADD = \
320 src_test_country_SOURCES = \
323 src_test_country_CFLAGS = \
326 src_test_country_LDADD = \
329 src_test_network_SOURCES = \
332 src_test_network_CFLAGS = \
335 src_test_network_LDADD = \
338 src_test_stringpool_SOURCES = \
339 src/test-stringpool.c
341 src_test_stringpool_CFLAGS = \
344 src_test_stringpool_LDADD = \
347 src_test_database_SOURCES = \
350 src_test_database_CFLAGS = \
353 src_test_database_LDADD = \
356 src_test_signature_SOURCES = \
359 src_test_signature_CFLAGS = \
362 src_test_signature_LDADD = \
365 # ------------------------------------------------------------------------------
368 man/location-downloader.8 \
371 MANPAGES_TXT = $(patsubst %.8,%.txt,$(MANPAGES))
372 MANPAGES_HTML = $(patsubst %.txt,%.html,$(MANPAGES_TXT))
373 MANPAGES_XML = $(patsubst %.txt,%.xml,$(MANPAGES_TXT))
376 man: $(MANPAGES) $(MANPAGES_HTML)
394 --stringparam man.output.quietly 1 \
395 --stringparam funcsynopsis.style ansi \
396 --stringparam man.th.extra1.suppress 1 \
397 --stringparam man.authors.section.enabled 1 \
398 --stringparam man.copyright.section.enabled 1
400 XSLTPROC_COMMAND_MAN = \
401 $(AM_V_XSLT)$(MKDIR_P) $(dir $@) && \
402 $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
403 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
405 # Let XSLT find its source on Mac OS X
407 export XML_CATALOG_FILES = /usr/local/etc/xml/catalog
410 man/%.xml: man/%.txt man/asciidoc.conf
411 $(AM_V_ASCIIDOC)$(MKDIR_P) $(dir $@) && \
413 -f $(abs_srcdir)/man/asciidoc.conf \
414 -d manpage -b docbook -o $@ $<
417 $(XSLTPROC_COMMAND_MAN)
419 man/%.html: man/%.txt man/asciidoc.conf
420 $(AM_V_ASCIIDOC)$(MKDIR_P) $(dir $@) && \
422 -f $(abs_srcdir)/man/asciidoc.conf \
423 -b html5 -a icons -a theme=flask -o $@ $<
426 upload-man: $(MANPAGES_HTML)
427 rsync -avHz --delete --progress $(MANPAGES_HTML) ms@fs01.haj.ipfire.org:/pub/man-pages/$(PACKAGE_NAME)/
429 $(DEBIAN_TARBALL_NAME): dist
430 cp -v $(distdir).tar.xz $@
433 debian: $(DEBIAN_TARBALL_NAME)
434 debuild -i -us -uc -b