4 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
5 AM_MAKEFLAGS = --no-print-directory
10 OS = $(shell uname -s)
17 -include $(top_builddir)/config.h \
18 -DSYSCONFDIR=\""$(sysconfdir)"\" \
21 AM_CFLAGS = ${my_CFLAGS} \
27 # leaving a space here to work around automake's conditionals
29 AM_LDFLAGS += -Wl,-dead_strip
40 DISTCHECK_CONFIGURE_FLAGS = \
41 --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
44 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(SED) \
45 -e 's,@VERSION\@,$(VERSION),g' \
46 -e 's,@prefix\@,$(prefix),g' \
47 -e 's,@exec_prefix\@,$(exec_prefix),g' \
48 -e 's,@bindir\@,$(bindir),g' \
49 -e 's,@libdir\@,$(libdir),g' \
50 -e 's,@includedir\@,$(includedir),g' \
51 -e 's,@databasedir\@,$(databasedir),g' \
54 databasedir = $(localstatedir)/lib/location
55 pkgconfigdir = $(libdir)/pkgconfig
57 # Overwrite Python path
58 pkgpythondir = $(pythondir)/location
63 @INTLTOOL_POLICY_RULE@
65 # ------------------------------------------------------------------------------
67 AM_V_ASCIIDOC = $(AM_V_ASCIIDOC_$(V))
68 AM_V_ASCIIDOC_ = $(AM_V_ASCIIDOC_$(AM_DEFAULT_VERBOSITY))
69 AM_V_ASCIIDOC_0 = @echo " ASCIIDOC" $@;
71 AM_V_XSLT = $(AM_V_XSLT_$(V))
72 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
73 AM_V_XSLT_0 = @echo " XSLT " $@;
75 # ------------------------------------------------------------------------------
78 update-po: po/POTFILES.in
79 $(MAKE) -C po update-po
81 po/POTFILES.in: Makefile
82 find $(abs_srcdir)/src -type f \( -name '*.in' -o -name '*.py' \) \
83 \! -exec git check-ignore -q {} \; -print | \
84 sed -e "s@$(abs_srcdir)/@@g" | LC_ALL=C sort > $@
87 examples/private-key.pem \
88 examples/public-key.pem \
89 examples/python/create-database.py \
90 examples/python/read-database.py
92 pkginclude_HEADERS = \
98 src/loc/country-list.h \
102 src/loc/network-list.h \
104 src/loc/stringpool.h \
111 src_libloc_la_SOURCES = \
124 EXTRA_DIST += src/libloc.sym
126 src_libloc_la_CFLAGS = \
131 src_libloc_la_LDFLAGS = \
133 -version-info $(LIBLOC_CURRENT):$(LIBLOC_REVISION):$(LIBLOC_AGE)
135 if HAVE_LD_VERSION_SCRIPT
136 src_libloc_la_LDFLAGS += -Wl,--version-script=$(top_srcdir)/src/libloc.sym
138 src_libloc_la_LDFLAGS += -export-symbols $(top_srcdir)/src/libloc.sym
141 src_libloc_la_LIBADD = \
145 src_libloc_la_DEPENDENCIES = \
146 ${top_srcdir}/src/libloc.sym
157 dist_pkgpython_PYTHON = \
158 src/python/database.py \
159 src/python/downloader.py \
160 src/python/export.py \
162 src/python/importer.py \
166 src/python/__init__.py
169 src/python/__init__.py.in
172 src/python/__init__.py
174 pyexec_LTLIBRARIES = \
175 src/python/_location.la
177 src_python__location_la_SOURCES = \
178 src/python/locationmodule.c \
179 src/python/locationmodule.h \
182 src/python/country.c \
183 src/python/country.h \
184 src/python/database.c \
185 src/python/database.h \
186 src/python/network.c \
187 src/python/network.h \
188 src/python/writer.c \
191 src_python__location_la_CFLAGS = \
195 src_python__location_la_LDFLAGS = \
201 src_python__location_la_LIBADD = \
205 # Compile & install bindings
206 all-local: $(foreach binding,$(BINDINGS),build-$(binding))
207 check-local: $(foreach binding,$(BINDINGS),check-$(binding))
208 install-exec-local: $(foreach binding,$(BINDINGS),install-$(binding))
209 clean-local: $(foreach binding,$(BINDINGS),clean-$(binding))
210 uninstall-local: $(foreach binding,$(BINDINGS),uninstall-$(binding))
214 src/perl/.gitignore \
215 src/perl/Location.xs \
217 src/perl/Makefile.PL \
218 src/perl/lib/Location.pm \
219 src/perl/t/Location.t \
224 @mkdir -p $(builddir)/src/perl/{lib,t}
225 @test -e $(builddir)/src/perl/Location.xs || ln -s --relative $(srcdir)/src/perl/Location.xs $(builddir)/src/perl/
226 @test -e $(builddir)/src/perl/MANIFEST || ln -s --relative $(srcdir)/src/perl/MANIFEST $(builddir)/src/perl/
227 @test -e $(builddir)/src/perl/Makefile.PL || ln -s --relative $(srcdir)/src/perl/Makefile.PL $(builddir)/src/perl/
228 @test -e $(builddir)/src/perl/lib/Location.pm || ln -s --relative $(srcdir)/src/perl/lib/Location.pm $(builddir)/src/perl/lib/
229 @test -e $(builddir)/src/perl/t/Location.t || ln -s --relative $(srcdir)/src/perl/t/Location.t $(builddir)/src/perl/t/
230 @test -e $(builddir)/src/perl/typemap || ln -s --relative $(srcdir)/src/perl/typemap $(builddir)/src/perl/
232 cd $(builddir)/src/perl && $(PERL) Makefile.PL PREFIX="$(prefix)" \
233 INC="-I$(abs_srcdir)/src" LIBS="-L$(abs_builddir)/src/.libs -lloc"
234 cd $(builddir)/src/perl && $(MAKE) LD_RUN_PATH=
237 check-perl: testdata.db
238 cd $(builddir)/src/perl && $(MAKE) LD_LIBRARY_PATH="$(abs_builddir)/src/.libs" test \
239 database="../../$<" keyfile="$(abs_srcdir)/examples/public-key.pem"
243 cd $(builddir)/src/perl && $(MAKE) install DESTIDR=$(DESTDIR)
247 cd $(builddir)/src/perl && $(MAKE) distclean
249 .PHONY: uninstall-perl
252 $(DESTDIR)/$(prefix)/lib/*/perl/*/Location.pm \
253 $(DESTDIR)/$(prefix)/lib/*/perl/*/auto/Location \
254 $(DESTDIR)/$(prefix)/lib/*/perl/*/perllocal.pod \
255 $(DESTDIR)/$(prefix)/man/man3/Location.3pm
258 src/python/location \
259 src/python/location-importer
262 src/python/location.in \
263 src/python/location-importer.in
266 src/python/location \
267 src/python/location-importer
269 # ------------------------------------------------------------------------------
272 systemdsystemunit_DATA = \
273 src/systemd/location-update.service \
274 src/systemd/location-update.timer
277 $(systemdsystemunit_DATA)
280 $(systemdsystemunitdir)
284 src/systemd/location-update.service.in \
285 src/systemd/location-update.timer.in
287 # ------------------------------------------------------------------------------
289 dist_database_DATA = \
292 # ------------------------------------------------------------------------------
297 -DABS_SRCDIR=\"$(abs_srcdir)\"
301 src/test-stringpool \
311 testdata.db: examples/python/create-database.py
312 PYTHONPATH=$(abs_builddir)/src/python/.libs \
313 ABS_SRCDIR="$(abs_srcdir)" \
318 src/test-stringpool \
322 src/test-network-list \
326 src_test_libloc_SOURCES = \
329 src_test_libloc_CFLAGS = \
332 src_test_libloc_LDADD = \
335 src_test_as_SOURCES = \
338 src_test_as_CFLAGS = \
341 src_test_as_LDADD = \
344 src_test_country_SOURCES = \
347 src_test_country_CFLAGS = \
350 src_test_country_LDADD = \
353 src_test_network_SOURCES = \
356 src_test_network_CFLAGS = \
359 src_test_network_LDADD = \
362 src_test_network_list_SOURCES = \
363 src/test-network-list.c
365 src_test_network_list_CFLAGS = \
368 src_test_network_list_LDADD = \
371 src_test_stringpool_SOURCES = \
372 src/test-stringpool.c
374 src_test_stringpool_CFLAGS = \
377 src_test_stringpool_LDADD = \
380 src_test_database_SOURCES = \
383 src_test_database_CFLAGS = \
386 src_test_database_LDADD = \
389 src_test_signature_SOURCES = \
392 src_test_signature_CFLAGS = \
395 src_test_signature_LDADD = \
398 # ------------------------------------------------------------------------------
403 MANPAGES_TXT = $(patsubst %.8,%.txt,$(MANPAGES))
404 MANPAGES_HTML = $(patsubst %.txt,%.html,$(MANPAGES_TXT))
405 MANPAGES_XML = $(patsubst %.txt,%.xml,$(MANPAGES_TXT))
408 man: $(MANPAGES) $(MANPAGES_HTML)
426 --stringparam man.output.quietly 1 \
427 --stringparam funcsynopsis.style ansi \
428 --stringparam man.th.extra1.suppress 1 \
429 --stringparam man.authors.section.enabled 1 \
430 --stringparam man.copyright.section.enabled 1
432 XSLTPROC_COMMAND_MAN = \
433 $(AM_V_XSLT)$(MKDIR_P) $(dir $@) && \
434 $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
435 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
437 # Let XSLT find its source on Mac OS X
439 export XML_CATALOG_FILES = /usr/local/etc/xml/catalog
442 man/%.xml: man/%.txt man/asciidoc.conf
443 $(AM_V_ASCIIDOC)$(MKDIR_P) $(dir $@) && \
445 -f $(abs_srcdir)/man/asciidoc.conf \
446 -d manpage -b docbook -o $@ $<
449 $(XSLTPROC_COMMAND_MAN)
451 man/%.html: man/%.txt man/asciidoc.conf
452 $(AM_V_ASCIIDOC)$(MKDIR_P) $(dir $@) && \
454 -f $(abs_srcdir)/man/asciidoc.conf \
455 -b html5 -a icons -a theme=flask -o $@ $<
458 upload-man: $(MANPAGES_HTML)
459 rsync -avHz --delete --progress $(MANPAGES_HTML) ms@fs01.haj.ipfire.org:/pub/man-pages/$(PACKAGE_NAME)/
467 debian/location.install \
468 debian/location.manpages \
469 debian/location-python.install \
470 debian/libloc1.install \
471 debian/libloc-dev.install \
477 $(SHELL) debian/build.sh $(PACKAGE_NAME)-$(PACKAGE_VERSION) $(distdir).tar.xz