3 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
4 AM_MAKEFLAGS = --no-print-directory
14 -include $(top_builddir)/config.h \
15 -DSYSCONFDIR=\""$(sysconfdir)"\" \
18 AM_CFLAGS = ${my_CFLAGS} \
31 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(SED) \
32 -e 's,@VERSION\@,$(VERSION),g' \
33 -e 's,@prefix\@,$(prefix),g' \
34 -e 's,@exec_prefix\@,$(exec_prefix),g' \
35 -e 's,@libdir\@,$(libdir),g' \
36 -e 's,@includedir\@,$(includedir),g' \
37 -e 's,@databasedir\@,$(databasedir),g' \
40 databasedir = $(datadir)/location
41 pkgconfigdir = $(libdir)/pkgconfig
46 @INTLTOOL_POLICY_RULE@
48 # ------------------------------------------------------------------------------
50 AM_V_ASCIIDOC = $(AM_V_ASCIIDOC_$(V))
51 AM_V_ASCIIDOC_ = $(AM_V_ASCIIDOC_$(AM_DEFAULT_VERBOSITY))
52 AM_V_ASCIIDOC_0 = @echo " ASCIIDOC" $@;
54 AM_V_XSLT = $(AM_V_XSLT_$(V))
55 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
56 AM_V_XSLT_0 = @echo " XSLT " $@;
58 # ------------------------------------------------------------------------------
62 $(MAKE) -C po update-po
65 examples/python/create-database.py \
66 examples/python/read-database.py
68 pkginclude_HEADERS = \
76 src/loc/stringpool.h \
82 src_libloc_la_SOURCES = \
91 EXTRA_DIST += src/libloc.sym
93 src_libloc_la_CFLAGS = \
98 src_libloc_la_LDFLAGS = \
100 -version-info $(LIBLOC_CURRENT):$(LIBLOC_REVISION):$(LIBLOC_AGE) \
101 -Wl,--version-script=$(top_srcdir)/src/libloc.sym
103 src_libloc_la_DEPENDENCIES = \
104 ${top_srcdir}/src/libloc.sym
115 pyexec_LTLIBRARIES = \
116 src/python/location.la
118 src_python_location_la_SOURCES = \
119 src/python/locationmodule.c \
120 src/python/locationmodule.h \
123 src/python/country.c \
124 src/python/country.h \
125 src/python/database.c \
126 src/python/database.h \
127 src/python/network.c \
128 src/python/network.h \
129 src/python/writer.c \
132 src_python_location_la_CFLAGS = \
136 src_python_location_la_LDFLAGS = \
142 src_python_location_la_LIBADD = \
146 # Compile & install bindings
147 all-local: $(foreach binding,$(BINDINGS),build-$(binding))
148 check-local: $(foreach binding,$(BINDINGS),check-$(binding))
149 install-exec-local: $(foreach binding,$(BINDINGS),install-$(binding))
150 clean-local: $(foreach binding,$(BINDINGS),clean-$(binding))
151 uninstall-local: $(foreach binding,$(BINDINGS),uninstall-$(binding))
155 src/perl/.gitignore \
156 src/perl/Location.xs \
158 src/perl/Makefile.PL \
159 src/perl/lib/Location.pm \
160 src/perl/t/Location.t \
165 @mkdir -p $(builddir)/src/perl/{lib,t}
166 @test -e $(builddir)/src/perl/Location.xs || ln -s --relative $(srcdir)/src/perl/Location.xs $(builddir)/src/perl/
167 @test -e $(builddir)/src/perl/MANIFEST || ln -s --relative $(srcdir)/src/perl/MANIFEST $(builddir)/src/perl/
168 @test -e $(builddir)/src/perl/Makefile.PL || ln -s --relative $(srcdir)/src/perl/Makefile.PL $(builddir)/src/perl/
169 @test -e $(builddir)/src/perl/lib/Location.pm || ln -s --relative $(srcdir)/src/perl/lib/Location.pm $(builddir)/src/perl/lib/
170 @test -e $(builddir)/src/perl/t/Location.t || ln -s --relative $(srcdir)/src/perl/t/Location.t $(builddir)/src/perl/t/
171 @test -e $(builddir)/src/perl/typemap || ln -s --relative $(srcdir)/src/perl/typemap $(builddir)/src/perl/
173 cd $(builddir)/src/perl && $(PERL) Makefile.PL PREFIX="$(prefix)" \
174 INC="-I$(abs_srcdir)/src" LIBS="-L$(abs_builddir)/src/.libs -lloc"
175 cd $(builddir)/src/perl && $(MAKE)
178 check-perl: testdata.db
179 cd $(builddir)/src/perl && $(MAKE) test database="../../$<"
183 cd $(builddir)/src/perl && $(MAKE) install
187 cd $(builddir)/src/perl && $(MAKE) distclean
189 .PHONY: uninstall-perl
192 $(DESTDIR)/$(prefix)/lib/*/perl/*/Location.pm \
193 $(DESTDIR)/$(prefix)/lib/*/perl/*/auto/Location \
194 $(DESTDIR)/$(prefix)/lib/*/perl/*/perllocal.pod \
195 $(DESTDIR)/$(prefix)/man/man3/Location.3pm
198 src/python/location-query
201 src/python/location-query.in
204 src/python/location-query
206 # ------------------------------------------------------------------------------
214 src/test-stringpool \
224 testdata.db: examples/python/create-database.py
225 PYTHONPATH=$(abs_builddir)/src/python/.libs $(PYTHON) $< $@
229 src/test-stringpool \
235 src_test_libloc_SOURCES = \
238 src_test_libloc_CFLAGS = \
241 src_test_libloc_LDADD = \
244 src_test_as_SOURCES = \
247 src_test_as_CFLAGS = \
250 src_test_as_LDADD = \
253 src_test_country_SOURCES = \
256 src_test_country_CFLAGS = \
259 src_test_country_LDADD = \
262 src_test_network_SOURCES = \
265 src_test_network_CFLAGS = \
268 src_test_network_LDADD = \
271 src_test_stringpool_SOURCES = \
272 src/test-stringpool.c
274 src_test_stringpool_CFLAGS = \
277 src_test_stringpool_LDADD = \
280 src_test_database_SOURCES = \
283 src_test_database_CFLAGS = \
286 src_test_database_LDADD = \
289 # ------------------------------------------------------------------------------
294 MANPAGES_TXT = $(patsubst %.8,%.txt,$(MANPAGES))
295 MANPAGES_HTML = $(patsubst %.txt,%.html,$(MANPAGES_TXT))
296 MANPAGES_XML = $(patsubst %.txt,%.xml,$(MANPAGES_TXT))
299 man: $(MANPAGES) $(MANPAGES_HTML)
317 --stringparam man.output.quietly 1 \
318 --stringparam funcsynopsis.style ansi \
319 --stringparam man.th.extra1.suppress 1 \
320 --stringparam man.authors.section.enabled 1 \
321 --stringparam man.copyright.section.enabled 1
323 XSLTPROC_COMMAND_MAN = \
324 $(AM_V_XSLT)$(MKDIR_P) $(dir $@) && \
325 $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
326 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
328 man/%.xml: man/%.txt man/asciidoc.conf
329 $(AM_V_ASCIIDOC)$(MKDIR_P) $(dir $@) && \
331 -f $(abs_srcdir)/man/asciidoc.conf \
332 -d manpage -b docbook -o $@ $<
335 $(XSLTPROC_COMMAND_MAN)
337 man/%.html: man/%.txt man/asciidoc.conf
338 $(AM_V_ASCIIDOC)$(MKDIR_P) $(dir $@) && \
340 -f $(abs_srcdir)/man/asciidoc.conf \
341 -b html5 -a icons -a theme=flask -o $@ $<
344 upload-man: $(MANPAGES_HTML)
345 rsync -avHz --delete --progress $(MANPAGES_HTML) ms@fs01.haj.ipfire.org:/pub/man-pages/$(PACKAGE_NAME)/