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 \
97 src_libloc_la_SOURCES = \
106 EXTRA_DIST += src/libloc.sym
108 src_libloc_la_CFLAGS = \
113 src_libloc_la_LDFLAGS = \
115 -version-info $(LIBLOC_CURRENT):$(LIBLOC_REVISION):$(LIBLOC_AGE)
117 if HAVE_LD_VERSION_SCRIPT
118 src_libloc_la_LDFLAGS += -Wl,--version-script=$(top_srcdir)/src/libloc.sym
120 src_libloc_la_LDFLAGS += -export-symbols $(top_srcdir)/src/libloc.sym
123 src_libloc_la_DEPENDENCIES = \
124 ${top_srcdir}/src/libloc.sym
135 pyexec_LTLIBRARIES = \
136 src/python/location.la
138 src_python_location_la_SOURCES = \
139 src/python/locationmodule.c \
140 src/python/locationmodule.h \
143 src/python/country.c \
144 src/python/country.h \
145 src/python/database.c \
146 src/python/database.h \
147 src/python/network.c \
148 src/python/network.h \
149 src/python/writer.c \
152 src_python_location_la_CFLAGS = \
156 src_python_location_la_LDFLAGS = \
162 src_python_location_la_LIBADD = \
166 # Compile & install bindings
167 all-local: $(foreach binding,$(BINDINGS),build-$(binding))
168 check-local: $(foreach binding,$(BINDINGS),check-$(binding))
169 install-exec-local: $(foreach binding,$(BINDINGS),install-$(binding))
170 clean-local: $(foreach binding,$(BINDINGS),clean-$(binding))
171 uninstall-local: $(foreach binding,$(BINDINGS),uninstall-$(binding))
175 src/perl/.gitignore \
176 src/perl/Location.xs \
178 src/perl/Makefile.PL \
179 src/perl/lib/Location.pm \
180 src/perl/t/Location.t \
185 @mkdir -p $(builddir)/src/perl/{lib,t}
186 @test -e $(builddir)/src/perl/Location.xs || ln -s --relative $(srcdir)/src/perl/Location.xs $(builddir)/src/perl/
187 @test -e $(builddir)/src/perl/MANIFEST || ln -s --relative $(srcdir)/src/perl/MANIFEST $(builddir)/src/perl/
188 @test -e $(builddir)/src/perl/Makefile.PL || ln -s --relative $(srcdir)/src/perl/Makefile.PL $(builddir)/src/perl/
189 @test -e $(builddir)/src/perl/lib/Location.pm || ln -s --relative $(srcdir)/src/perl/lib/Location.pm $(builddir)/src/perl/lib/
190 @test -e $(builddir)/src/perl/t/Location.t || ln -s --relative $(srcdir)/src/perl/t/Location.t $(builddir)/src/perl/t/
191 @test -e $(builddir)/src/perl/typemap || ln -s --relative $(srcdir)/src/perl/typemap $(builddir)/src/perl/
193 cd $(builddir)/src/perl && $(PERL) Makefile.PL PREFIX="$(prefix)" \
194 INC="-I$(abs_srcdir)/src" LIBS="-L$(abs_builddir)/src/.libs -lloc"
195 cd $(builddir)/src/perl && $(MAKE) LD_RUN_PATH=
198 check-perl: testdata.db
199 cd $(builddir)/src/perl && $(MAKE) test database="../../$<"
203 cd $(builddir)/src/perl && $(MAKE) install
207 cd $(builddir)/src/perl && $(MAKE) distclean
209 .PHONY: uninstall-perl
212 $(DESTDIR)/$(prefix)/lib/*/perl/*/Location.pm \
213 $(DESTDIR)/$(prefix)/lib/*/perl/*/auto/Location \
214 $(DESTDIR)/$(prefix)/lib/*/perl/*/perllocal.pod \
215 $(DESTDIR)/$(prefix)/man/man3/Location.3pm
218 src/python/location-downloader \
219 src/python/location-query
222 src/python/location-downloader.in \
223 src/python/location-query.in
226 src/python/location-downloader \
227 src/python/location-query
228 # ------------------------------------------------------------------------------
231 systemdsystemunit_DATA = \
232 src/systemd/location-downloader.service \
233 src/systemd/location-downloader.timer
236 $(systemdsystemunit_DATA)
239 $(systemdsystemunitdir)
243 src/systemd/location-downloader.service.in \
244 src/systemd/location-downloader.timer.in
246 # ------------------------------------------------------------------------------
254 src/test-stringpool \
264 testdata.db: examples/python/create-database.py
265 PYTHONPATH=$(abs_builddir)/src/python/.libs $(PYTHON) $< $@
269 src/test-stringpool \
275 src_test_libloc_SOURCES = \
278 src_test_libloc_CFLAGS = \
281 src_test_libloc_LDADD = \
284 src_test_as_SOURCES = \
287 src_test_as_CFLAGS = \
290 src_test_as_LDADD = \
293 src_test_country_SOURCES = \
296 src_test_country_CFLAGS = \
299 src_test_country_LDADD = \
302 src_test_network_SOURCES = \
305 src_test_network_CFLAGS = \
308 src_test_network_LDADD = \
311 src_test_stringpool_SOURCES = \
312 src/test-stringpool.c
314 src_test_stringpool_CFLAGS = \
317 src_test_stringpool_LDADD = \
320 src_test_database_SOURCES = \
323 src_test_database_CFLAGS = \
326 src_test_database_LDADD = \
329 # ------------------------------------------------------------------------------
332 man/location-downloader.8 \
335 MANPAGES_TXT = $(patsubst %.8,%.txt,$(MANPAGES))
336 MANPAGES_HTML = $(patsubst %.txt,%.html,$(MANPAGES_TXT))
337 MANPAGES_XML = $(patsubst %.txt,%.xml,$(MANPAGES_TXT))
340 man: $(MANPAGES) $(MANPAGES_HTML)
358 --stringparam man.output.quietly 1 \
359 --stringparam funcsynopsis.style ansi \
360 --stringparam man.th.extra1.suppress 1 \
361 --stringparam man.authors.section.enabled 1 \
362 --stringparam man.copyright.section.enabled 1
364 XSLTPROC_COMMAND_MAN = \
365 $(AM_V_XSLT)$(MKDIR_P) $(dir $@) && \
366 $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
367 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
369 man/%.xml: man/%.txt man/asciidoc.conf
370 $(AM_V_ASCIIDOC)$(MKDIR_P) $(dir $@) && \
372 -f $(abs_srcdir)/man/asciidoc.conf \
373 -d manpage -b docbook -o $@ $<
376 $(XSLTPROC_COMMAND_MAN)
378 man/%.html: man/%.txt man/asciidoc.conf
379 $(AM_V_ASCIIDOC)$(MKDIR_P) $(dir $@) && \
381 -f $(abs_srcdir)/man/asciidoc.conf \
382 -b html5 -a icons -a theme=flask -o $@ $<
385 upload-man: $(MANPAGES_HTML)
386 rsync -avHz --delete --progress $(MANPAGES_HTML) ms@fs01.haj.ipfire.org:/pub/man-pages/$(PACKAGE_NAME)/