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 # XXX hardcode path for Debian
58 pythondir = $(prefix)/lib/python3/dist-packages
59 pyexecdir = $(prefix)/lib/python$(PYTHON_VERSION)/lib-dynload
61 # Overwrite Python path
62 pkgpythondir = $(pythondir)/location
67 @INTLTOOL_POLICY_RULE@
69 # ------------------------------------------------------------------------------
71 AM_V_ASCIIDOC = $(AM_V_ASCIIDOC_$(V))
72 AM_V_ASCIIDOC_ = $(AM_V_ASCIIDOC_$(AM_DEFAULT_VERBOSITY))
73 AM_V_ASCIIDOC_0 = @echo " ASCIIDOC" $@;
75 AM_V_XSLT = $(AM_V_XSLT_$(V))
76 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
77 AM_V_XSLT_0 = @echo " XSLT " $@;
79 # ------------------------------------------------------------------------------
83 $(MAKE) -C po update-po
86 examples/private-key.pem \
87 examples/public-key.pem \
88 examples/python/create-database.py \
89 examples/python/read-database.py
91 pkginclude_HEADERS = \
100 src/loc/stringpool.h \
107 src_libloc_la_SOURCES = \
117 EXTRA_DIST += src/libloc.sym
119 src_libloc_la_CFLAGS = \
124 src_libloc_la_LDFLAGS = \
126 -version-info $(LIBLOC_CURRENT):$(LIBLOC_REVISION):$(LIBLOC_AGE)
128 if HAVE_LD_VERSION_SCRIPT
129 src_libloc_la_LDFLAGS += -Wl,--version-script=$(top_srcdir)/src/libloc.sym
131 src_libloc_la_LDFLAGS += -export-symbols $(top_srcdir)/src/libloc.sym
134 src_libloc_la_LIBADD = \
138 src_libloc_la_DEPENDENCIES = \
139 ${top_srcdir}/src/libloc.sym
150 dist_pkgpython_PYTHON = \
151 src/python/__init__.py \
152 src/python/database.py \
154 src/python/importer.py \
157 pyexec_LTLIBRARIES = \
158 src/python/_location.la
160 src_python__location_la_SOURCES = \
161 src/python/locationmodule.c \
162 src/python/locationmodule.h \
165 src/python/country.c \
166 src/python/country.h \
167 src/python/database.c \
168 src/python/database.h \
169 src/python/network.c \
170 src/python/network.h \
171 src/python/writer.c \
174 src_python__location_la_CFLAGS = \
178 src_python__location_la_LDFLAGS = \
184 src_python__location_la_LIBADD = \
188 # Compile & install bindings
189 all-local: $(foreach binding,$(BINDINGS),build-$(binding))
190 check-local: $(foreach binding,$(BINDINGS),check-$(binding))
191 install-exec-local: $(foreach binding,$(BINDINGS),install-$(binding))
192 clean-local: $(foreach binding,$(BINDINGS),clean-$(binding))
193 uninstall-local: $(foreach binding,$(BINDINGS),uninstall-$(binding))
197 src/perl/.gitignore \
198 src/perl/Location.xs \
200 src/perl/Makefile.PL \
201 src/perl/lib/Location.pm \
202 src/perl/t/Location.t \
207 @mkdir -p $(builddir)/src/perl/{lib,t}
208 @test -e $(builddir)/src/perl/Location.xs || ln -s --relative $(srcdir)/src/perl/Location.xs $(builddir)/src/perl/
209 @test -e $(builddir)/src/perl/MANIFEST || ln -s --relative $(srcdir)/src/perl/MANIFEST $(builddir)/src/perl/
210 @test -e $(builddir)/src/perl/Makefile.PL || ln -s --relative $(srcdir)/src/perl/Makefile.PL $(builddir)/src/perl/
211 @test -e $(builddir)/src/perl/lib/Location.pm || ln -s --relative $(srcdir)/src/perl/lib/Location.pm $(builddir)/src/perl/lib/
212 @test -e $(builddir)/src/perl/t/Location.t || ln -s --relative $(srcdir)/src/perl/t/Location.t $(builddir)/src/perl/t/
213 @test -e $(builddir)/src/perl/typemap || ln -s --relative $(srcdir)/src/perl/typemap $(builddir)/src/perl/
215 cd $(builddir)/src/perl && $(PERL) Makefile.PL PREFIX="$(prefix)" \
216 INC="-I$(abs_srcdir)/src" LIBS="-L$(abs_builddir)/src/.libs -lloc"
217 cd $(builddir)/src/perl && $(MAKE) CC="$(CC)" LD="$(LD)" LD_RUN_PATH=
220 check-perl: testdata.db
221 cd $(builddir)/src/perl && $(MAKE) LD_LIBRARY_PATH="$(abs_builddir)/src/.libs" test \
222 database="../../$<" keyfile="$(abs_srcdir)/examples/public-key.pem"
226 cd $(builddir)/src/perl && $(MAKE) install
230 cd $(builddir)/src/perl && $(MAKE) distclean
232 .PHONY: uninstall-perl
235 $(DESTDIR)/$(prefix)/lib/*/perl/*/Location.pm \
236 $(DESTDIR)/$(prefix)/lib/*/perl/*/auto/Location \
237 $(DESTDIR)/$(prefix)/lib/*/perl/*/perllocal.pod \
238 $(DESTDIR)/$(prefix)/man/man3/Location.3pm
241 src/python/location-downloader \
242 src/python/location-exporter \
243 src/python/location-importer \
244 src/python/location-query
247 src/python/location-downloader.in \
248 src/python/location-exporter.in \
249 src/python/location-importer.in \
250 src/python/location-query.in
253 src/python/location-downloader \
254 src/python/location-exporter \
255 src/python/location-importer \
256 src/python/location-query
258 # ------------------------------------------------------------------------------
261 systemdsystemunit_DATA = \
262 src/systemd/location-downloader.service \
263 src/systemd/location-downloader.timer
266 $(systemdsystemunit_DATA)
269 $(systemdsystemunitdir)
273 src/systemd/location-downloader.service.in \
274 src/systemd/location-downloader.timer.in
276 # ------------------------------------------------------------------------------
278 dist_database_DATA = \
281 # ------------------------------------------------------------------------------
286 -DABS_SRCDIR=\"$(abs_srcdir)\"
290 src/test-stringpool \
301 testdata.db: examples/python/create-database.py
302 PYTHONPATH=$(abs_builddir)/src/python/.libs \
303 ABS_SRCDIR="$(abs_srcdir)" \
308 src/test-stringpool \
315 src_test_libloc_SOURCES = \
318 src_test_libloc_CFLAGS = \
321 src_test_libloc_LDADD = \
324 src_test_as_SOURCES = \
327 src_test_as_CFLAGS = \
330 src_test_as_LDADD = \
333 src_test_country_SOURCES = \
336 src_test_country_CFLAGS = \
339 src_test_country_LDADD = \
342 src_test_network_SOURCES = \
345 src_test_network_CFLAGS = \
348 src_test_network_LDADD = \
351 src_test_stringpool_SOURCES = \
352 src/test-stringpool.c
354 src_test_stringpool_CFLAGS = \
357 src_test_stringpool_LDADD = \
360 src_test_database_SOURCES = \
363 src_test_database_CFLAGS = \
366 src_test_database_LDADD = \
369 src_test_signature_SOURCES = \
372 src_test_signature_CFLAGS = \
375 src_test_signature_LDADD = \
378 # ------------------------------------------------------------------------------
381 man/location-downloader.8 \
384 MANPAGES_TXT = $(patsubst %.8,%.txt,$(MANPAGES))
385 MANPAGES_HTML = $(patsubst %.txt,%.html,$(MANPAGES_TXT))
386 MANPAGES_XML = $(patsubst %.txt,%.xml,$(MANPAGES_TXT))
389 man: $(MANPAGES) $(MANPAGES_HTML)
407 --stringparam man.output.quietly 1 \
408 --stringparam funcsynopsis.style ansi \
409 --stringparam man.th.extra1.suppress 1 \
410 --stringparam man.authors.section.enabled 1 \
411 --stringparam man.copyright.section.enabled 1
413 XSLTPROC_COMMAND_MAN = \
414 $(AM_V_XSLT)$(MKDIR_P) $(dir $@) && \
415 $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
416 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
418 # Let XSLT find its source on Mac OS X
420 export XML_CATALOG_FILES = /usr/local/etc/xml/catalog
423 man/%.xml: man/%.txt man/asciidoc.conf
424 $(AM_V_ASCIIDOC)$(MKDIR_P) $(dir $@) && \
426 -f $(abs_srcdir)/man/asciidoc.conf \
427 -d manpage -b docbook -o $@ $<
430 $(XSLTPROC_COMMAND_MAN)
432 man/%.html: man/%.txt man/asciidoc.conf
433 $(AM_V_ASCIIDOC)$(MKDIR_P) $(dir $@) && \
435 -f $(abs_srcdir)/man/asciidoc.conf \
436 -b html5 -a icons -a theme=flask -o $@ $<
439 upload-man: $(MANPAGES_HTML)
440 rsync -avHz --delete --progress $(MANPAGES_HTML) ms@fs01.haj.ipfire.org:/pub/man-pages/$(PACKAGE_NAME)/
443 debian/autoreconf.after \
444 debian/autoreconf.before \
450 debian/libloc-dev.install \
451 debian/libloc.install \
452 debian/libloc.lintian-overrides \
453 debian/libloc.manpages \
459 $(SHELL) debian/build.sh $(PACKAGE_NAME)-$(PACKAGE_VERSION) $(distdir).tar.xz