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 | \
83 grep -E "\.(in|py)$$" | sed -e "s@$(abs_srcdir)/@@g" | sort > $@
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 \
153 src/python/downloader.py \
154 src/python/export.py \
156 src/python/importer.py \
159 pyexec_LTLIBRARIES = \
160 src/python/_location.la
162 src_python__location_la_SOURCES = \
163 src/python/locationmodule.c \
164 src/python/locationmodule.h \
167 src/python/country.c \
168 src/python/country.h \
169 src/python/database.c \
170 src/python/database.h \
171 src/python/network.c \
172 src/python/network.h \
173 src/python/writer.c \
176 src_python__location_la_CFLAGS = \
180 src_python__location_la_LDFLAGS = \
186 src_python__location_la_LIBADD = \
190 # Compile & install bindings
191 all-local: $(foreach binding,$(BINDINGS),build-$(binding))
192 check-local: $(foreach binding,$(BINDINGS),check-$(binding))
193 install-exec-local: $(foreach binding,$(BINDINGS),install-$(binding))
194 clean-local: $(foreach binding,$(BINDINGS),clean-$(binding))
195 uninstall-local: $(foreach binding,$(BINDINGS),uninstall-$(binding))
199 src/perl/.gitignore \
200 src/perl/Location.xs \
202 src/perl/Makefile.PL \
203 src/perl/lib/Location.pm \
204 src/perl/t/Location.t \
209 @mkdir -p $(builddir)/src/perl/{lib,t}
210 @test -e $(builddir)/src/perl/Location.xs || ln -s --relative $(srcdir)/src/perl/Location.xs $(builddir)/src/perl/
211 @test -e $(builddir)/src/perl/MANIFEST || ln -s --relative $(srcdir)/src/perl/MANIFEST $(builddir)/src/perl/
212 @test -e $(builddir)/src/perl/Makefile.PL || ln -s --relative $(srcdir)/src/perl/Makefile.PL $(builddir)/src/perl/
213 @test -e $(builddir)/src/perl/lib/Location.pm || ln -s --relative $(srcdir)/src/perl/lib/Location.pm $(builddir)/src/perl/lib/
214 @test -e $(builddir)/src/perl/t/Location.t || ln -s --relative $(srcdir)/src/perl/t/Location.t $(builddir)/src/perl/t/
215 @test -e $(builddir)/src/perl/typemap || ln -s --relative $(srcdir)/src/perl/typemap $(builddir)/src/perl/
217 cd $(builddir)/src/perl && $(PERL) Makefile.PL PREFIX="$(prefix)" \
218 INC="-I$(abs_srcdir)/src" LIBS="-L$(abs_builddir)/src/.libs -lloc"
219 cd $(builddir)/src/perl && $(MAKE) CC="$(CC)" LD="$(LD)" LD_RUN_PATH=
222 check-perl: testdata.db
223 cd $(builddir)/src/perl && $(MAKE) LD_LIBRARY_PATH="$(abs_builddir)/src/.libs" test \
224 database="../../$<" keyfile="$(abs_srcdir)/examples/public-key.pem"
228 cd $(builddir)/src/perl && $(MAKE) install
232 cd $(builddir)/src/perl && $(MAKE) distclean
234 .PHONY: uninstall-perl
237 $(DESTDIR)/$(prefix)/lib/*/perl/*/Location.pm \
238 $(DESTDIR)/$(prefix)/lib/*/perl/*/auto/Location \
239 $(DESTDIR)/$(prefix)/lib/*/perl/*/perllocal.pod \
240 $(DESTDIR)/$(prefix)/man/man3/Location.3pm
243 src/python/location \
244 src/python/location-importer
247 src/python/location.in \
248 src/python/location-importer.in
251 src/python/location \
252 src/python/location-importer
254 # ------------------------------------------------------------------------------
257 systemdsystemunit_DATA = \
258 src/systemd/location-update.service \
259 src/systemd/location-update.timer
262 $(systemdsystemunit_DATA)
265 $(systemdsystemunitdir)
269 src/systemd/location-update.service.in \
270 src/systemd/location-update.timer.in
272 # ------------------------------------------------------------------------------
274 dist_database_DATA = \
277 # ------------------------------------------------------------------------------
282 -DABS_SRCDIR=\"$(abs_srcdir)\"
286 src/test-stringpool \
296 testdata.db: examples/python/create-database.py
297 PYTHONPATH=$(abs_builddir)/src/python/.libs \
298 ABS_SRCDIR="$(abs_srcdir)" \
303 src/test-stringpool \
310 src_test_libloc_SOURCES = \
313 src_test_libloc_CFLAGS = \
316 src_test_libloc_LDADD = \
319 src_test_as_SOURCES = \
322 src_test_as_CFLAGS = \
325 src_test_as_LDADD = \
328 src_test_country_SOURCES = \
331 src_test_country_CFLAGS = \
334 src_test_country_LDADD = \
337 src_test_network_SOURCES = \
340 src_test_network_CFLAGS = \
343 src_test_network_LDADD = \
346 src_test_stringpool_SOURCES = \
347 src/test-stringpool.c
349 src_test_stringpool_CFLAGS = \
352 src_test_stringpool_LDADD = \
355 src_test_database_SOURCES = \
358 src_test_database_CFLAGS = \
361 src_test_database_LDADD = \
364 src_test_signature_SOURCES = \
367 src_test_signature_CFLAGS = \
370 src_test_signature_LDADD = \
373 # ------------------------------------------------------------------------------
378 MANPAGES_TXT = $(patsubst %.8,%.txt,$(MANPAGES))
379 MANPAGES_HTML = $(patsubst %.txt,%.html,$(MANPAGES_TXT))
380 MANPAGES_XML = $(patsubst %.txt,%.xml,$(MANPAGES_TXT))
383 man: $(MANPAGES) $(MANPAGES_HTML)
401 --stringparam man.output.quietly 1 \
402 --stringparam funcsynopsis.style ansi \
403 --stringparam man.th.extra1.suppress 1 \
404 --stringparam man.authors.section.enabled 1 \
405 --stringparam man.copyright.section.enabled 1
407 XSLTPROC_COMMAND_MAN = \
408 $(AM_V_XSLT)$(MKDIR_P) $(dir $@) && \
409 $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
410 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
412 # Let XSLT find its source on Mac OS X
414 export XML_CATALOG_FILES = /usr/local/etc/xml/catalog
417 man/%.xml: man/%.txt man/asciidoc.conf
418 $(AM_V_ASCIIDOC)$(MKDIR_P) $(dir $@) && \
420 -f $(abs_srcdir)/man/asciidoc.conf \
421 -d manpage -b docbook -o $@ $<
424 $(XSLTPROC_COMMAND_MAN)
426 man/%.html: man/%.txt man/asciidoc.conf
427 $(AM_V_ASCIIDOC)$(MKDIR_P) $(dir $@) && \
429 -f $(abs_srcdir)/man/asciidoc.conf \
430 -b html5 -a icons -a theme=flask -o $@ $<
433 upload-man: $(MANPAGES_HTML)
434 rsync -avHz --delete --progress $(MANPAGES_HTML) ms@fs01.haj.ipfire.org:/pub/man-pages/$(PACKAGE_NAME)/
442 debian/location.install \
443 debian/location.manpages \
444 debian/location-python.install \
445 debian/libloc0.install \
446 debian/libloc-dev.install \
452 $(SHELL) debian/build.sh $(PACKAGE_NAME)-$(PACKAGE_VERSION) $(distdir).tar.xz