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 = $(datadir)/location
55 pkgconfigdir = $(libdir)/pkgconfig
60 @INTLTOOL_POLICY_RULE@
62 # ------------------------------------------------------------------------------
64 AM_V_ASCIIDOC = $(AM_V_ASCIIDOC_$(V))
65 AM_V_ASCIIDOC_ = $(AM_V_ASCIIDOC_$(AM_DEFAULT_VERBOSITY))
66 AM_V_ASCIIDOC_0 = @echo " ASCIIDOC" $@;
68 AM_V_XSLT = $(AM_V_XSLT_$(V))
69 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
70 AM_V_XSLT_0 = @echo " XSLT " $@;
72 # ------------------------------------------------------------------------------
76 $(MAKE) -C po update-po
79 examples/python/create-database.py \
80 examples/python/read-database.py
82 pkginclude_HEADERS = \
91 src/loc/stringpool.h \
98 src_libloc_la_SOURCES = \
108 EXTRA_DIST += src/libloc.sym
110 src_libloc_la_CFLAGS = \
115 src_libloc_la_LDFLAGS = \
117 -version-info $(LIBLOC_CURRENT):$(LIBLOC_REVISION):$(LIBLOC_AGE)
119 if HAVE_LD_VERSION_SCRIPT
120 src_libloc_la_LDFLAGS += -Wl,--version-script=$(top_srcdir)/src/libloc.sym
122 src_libloc_la_LDFLAGS += -export-symbols $(top_srcdir)/src/libloc.sym
125 src_libloc_la_LIBADD = \
128 src_libloc_la_DEPENDENCIES = \
129 ${top_srcdir}/src/libloc.sym
140 pyexec_LTLIBRARIES = \
141 src/python/location.la
143 src_python_location_la_SOURCES = \
144 src/python/locationmodule.c \
145 src/python/locationmodule.h \
148 src/python/country.c \
149 src/python/country.h \
150 src/python/database.c \
151 src/python/database.h \
152 src/python/network.c \
153 src/python/network.h \
154 src/python/writer.c \
157 src_python_location_la_CFLAGS = \
161 src_python_location_la_LDFLAGS = \
167 src_python_location_la_LIBADD = \
171 # Compile & install bindings
172 all-local: $(foreach binding,$(BINDINGS),build-$(binding))
173 check-local: $(foreach binding,$(BINDINGS),check-$(binding))
174 install-exec-local: $(foreach binding,$(BINDINGS),install-$(binding))
175 clean-local: $(foreach binding,$(BINDINGS),clean-$(binding))
176 uninstall-local: $(foreach binding,$(BINDINGS),uninstall-$(binding))
180 src/perl/.gitignore \
181 src/perl/Location.xs \
183 src/perl/Makefile.PL \
184 src/perl/lib/Location.pm \
185 src/perl/t/Location.t \
190 @mkdir -p $(builddir)/src/perl/{lib,t}
191 @test -e $(builddir)/src/perl/Location.xs || ln -s --relative $(srcdir)/src/perl/Location.xs $(builddir)/src/perl/
192 @test -e $(builddir)/src/perl/MANIFEST || ln -s --relative $(srcdir)/src/perl/MANIFEST $(builddir)/src/perl/
193 @test -e $(builddir)/src/perl/Makefile.PL || ln -s --relative $(srcdir)/src/perl/Makefile.PL $(builddir)/src/perl/
194 @test -e $(builddir)/src/perl/lib/Location.pm || ln -s --relative $(srcdir)/src/perl/lib/Location.pm $(builddir)/src/perl/lib/
195 @test -e $(builddir)/src/perl/t/Location.t || ln -s --relative $(srcdir)/src/perl/t/Location.t $(builddir)/src/perl/t/
196 @test -e $(builddir)/src/perl/typemap || ln -s --relative $(srcdir)/src/perl/typemap $(builddir)/src/perl/
198 cd $(builddir)/src/perl && $(PERL) Makefile.PL PREFIX="$(prefix)" \
199 INC="-I$(abs_srcdir)/src" LIBS="-L$(abs_builddir)/src/.libs -lloc"
200 cd $(builddir)/src/perl && $(MAKE) LD_RUN_PATH=
203 check-perl: testdata.db
204 cd $(builddir)/src/perl && $(MAKE) test database="../../$<"
208 cd $(builddir)/src/perl && $(MAKE) install
212 cd $(builddir)/src/perl && $(MAKE) distclean
214 .PHONY: uninstall-perl
217 $(DESTDIR)/$(prefix)/lib/*/perl/*/Location.pm \
218 $(DESTDIR)/$(prefix)/lib/*/perl/*/auto/Location \
219 $(DESTDIR)/$(prefix)/lib/*/perl/*/perllocal.pod \
220 $(DESTDIR)/$(prefix)/man/man3/Location.3pm
223 src/python/location-downloader \
224 src/python/location-query
227 src/python/location-downloader.in \
228 src/python/location-query.in
231 src/python/location-downloader \
232 src/python/location-query
233 # ------------------------------------------------------------------------------
236 systemdsystemunit_DATA = \
237 src/systemd/location-downloader.service \
238 src/systemd/location-downloader.timer
241 $(systemdsystemunit_DATA)
244 $(systemdsystemunitdir)
248 src/systemd/location-downloader.service.in \
249 src/systemd/location-downloader.timer.in
251 # ------------------------------------------------------------------------------
259 src/test-stringpool \
269 testdata.db: examples/python/create-database.py
270 PYTHONPATH=$(abs_builddir)/src/python/.libs $(PYTHON) $< $@
274 src/test-stringpool \
280 src_test_libloc_SOURCES = \
283 src_test_libloc_CFLAGS = \
286 src_test_libloc_LDADD = \
289 src_test_as_SOURCES = \
292 src_test_as_CFLAGS = \
295 src_test_as_LDADD = \
298 src_test_country_SOURCES = \
301 src_test_country_CFLAGS = \
304 src_test_country_LDADD = \
307 src_test_network_SOURCES = \
310 src_test_network_CFLAGS = \
313 src_test_network_LDADD = \
316 src_test_stringpool_SOURCES = \
317 src/test-stringpool.c
319 src_test_stringpool_CFLAGS = \
322 src_test_stringpool_LDADD = \
325 src_test_database_SOURCES = \
328 src_test_database_CFLAGS = \
331 src_test_database_LDADD = \
334 # ------------------------------------------------------------------------------
337 man/location-downloader.8 \
340 MANPAGES_TXT = $(patsubst %.8,%.txt,$(MANPAGES))
341 MANPAGES_HTML = $(patsubst %.txt,%.html,$(MANPAGES_TXT))
342 MANPAGES_XML = $(patsubst %.txt,%.xml,$(MANPAGES_TXT))
345 man: $(MANPAGES) $(MANPAGES_HTML)
363 --stringparam man.output.quietly 1 \
364 --stringparam funcsynopsis.style ansi \
365 --stringparam man.th.extra1.suppress 1 \
366 --stringparam man.authors.section.enabled 1 \
367 --stringparam man.copyright.section.enabled 1
369 XSLTPROC_COMMAND_MAN = \
370 $(AM_V_XSLT)$(MKDIR_P) $(dir $@) && \
371 $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
372 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
374 man/%.xml: man/%.txt man/asciidoc.conf
375 $(AM_V_ASCIIDOC)$(MKDIR_P) $(dir $@) && \
377 -f $(abs_srcdir)/man/asciidoc.conf \
378 -d manpage -b docbook -o $@ $<
381 $(XSLTPROC_COMMAND_MAN)
383 man/%.html: man/%.txt man/asciidoc.conf
384 $(AM_V_ASCIIDOC)$(MKDIR_P) $(dir $@) && \
386 -f $(abs_srcdir)/man/asciidoc.conf \
387 -b html5 -a icons -a theme=flask -o $@ $<
390 upload-man: $(MANPAGES_HTML)
391 rsync -avHz --delete --progress $(MANPAGES_HTML) ms@fs01.haj.ipfire.org:/pub/man-pages/$(PACKAGE_NAME)/