X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=service-type-database%2FMakefile.am;h=b43e2cb71c47237dba1193829d49c28f708b4d76;hb=4c0b4cbf9c597f6df6a3220dec5438f4fe9e551b;hp=ab9242209d4e523935640f8bab6829fb7b54d55a;hpb=2452b35ceb07e536c3c506c82cd79d44efad4165;p=catta diff --git a/service-type-database/Makefile.am b/service-type-database/Makefile.am index ab92422..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,20 +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 - $(PYTHON) build-db $(srcdir)/$< $@ +service-types.db: service-types build-db + $(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