X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=service-type-database%2FMakefile.am;h=b43e2cb71c47237dba1193829d49c28f708b4d76;hb=8070ec2ac51219c462ac05238eab239461c38454;hp=3250e9485feb8546ccf1a9f31a4479fd1c698b14;hpb=d0a63590d4730eb0af3ec6027818cb62d50ea657;p=catta diff --git a/service-type-database/Makefile.am b/service-type-database/Makefile.am index 3250e94..b43e2cb 100644 --- a/service-type-database/Makefile.am +++ b/service-type-database/Makefile.am @@ -1,7 +1,5 @@ -# $Id$ -# # This file is part of avahi. -# +# # avahi is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2 of the @@ -19,22 +17,48 @@ EXTRA_DIST=build-db.in service-types +pkglibdatadir=$(libdir)/avahi + pkgdata_DATA=service-types +pkglibdata_DATA= if HAVE_PYTHON if HAVE_GDBM noinst_SCRIPTS=build-db -pkgdata_DATA+=service-types.db +pkglibdata_DATA+=service-types.db build-db: build-db.in - sed -e 's,@PYTHON\@,$(PYTHON),g' $< > $@ + $(AM_V_GEN)sed -e 's,@PYTHON\@,$(PYTHON),g' \ + -e 's,@DBM\@,gdbm,g' $< > $@ && \ chmod +x $@ service-types.db: service-types build-db - $(PYTHON) build-db $(srcdir)/$< $@ + $(AM_V_GEN)$(PYTHON) build-db $< $@.coming && \ + mv $@.coming $@ CLEANFILES = service-types.db build-db +endif +if HAVE_DBM + +noinst_SCRIPTS=build-db +pkglibdata_DATA+=service-types.db.pag service-types.db.dir + +build-db: build-db.in + $(AM_V_GEN)sed -e 's,@PYTHON\@,$(PYTHON),g' \ + -e 's,@DBM\@,dbm,g' $< > $@ && \ + chmod +x $@ + +service-types.db.pag: service-types.db + $(AM_V_GEN)mv service-types.db.coming.pag service-types.db.pag +service-types.db.dir: service-types.db + $(AM_V_GEN)mv service-types.db.coming.dir service-types.db.dir +service-types.db: service-types build-db + $(AM_V_GEN)$(PYTHON) build-db $< $@.coming && \ + if test -f "$@.coming"; then mv $@.coming $@; fi + +CLEANFILES = service-types.db* build-db + endif endif