]> git.meshlink.io Git - catta/blobdiff - service-type-database/Makefile.am
get rid of a lot of old svn cruft
[catta] / service-type-database / Makefile.am
index 2b20512c25d7d0a4e9605fa87a76cf8adb347dee..6419ba7729449d138b2e1798a7cde4c0e58b4110 100644 (file)
@@ -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
 EXTRA_DIST=build-db.in service-types
 
 pkgdata_DATA=service-types
+pkglib_DATA=
 
 if HAVE_PYTHON
+if HAVE_GDBM
 
 noinst_SCRIPTS=build-db
-pkgdata_DATA+=service-types.db
+pkglib_DATA+=service-types.db
 
 build-db: build-db.in
-       sed -e 's,@PYTHON\@,$(PYTHON),g' $< > $@
+       sed -e 's,@PYTHON\@,$(PYTHON),g' \
+           -e 's,@DBM\@,gdbm,g' $< > $@
        chmod +x $@
 
 service-types.db: service-types build-db
-       $(PYTHON) build-db $(srcdir)/$< $@
+       $(PYTHON) build-db $< $@.coming
+       mv $@.coming $@
 
 CLEANFILES = service-types.db build-db
 
 endif
+if HAVE_DBM
+
+noinst_SCRIPTS=build-db
+pkglib_DATA+=service-types.db.pag service-types.db.dir
+
+build-db: build-db.in
+       sed -e 's,@PYTHON\@,$(PYTHON),g' \
+           -e 's,@DBM\@,dbm,g' $< > $@
+       chmod +x $@
+
+service-types.db.pag: service-types.db
+       mv service-types.db.coming.pag service-types.db.pag
+service-types.db.dir: service-types.db
+       mv service-types.db.coming.dir service-types.db.dir
+service-types.db: service-types build-db
+       $(PYTHON) build-db $< $@.coming
+       if test -f "$@.coming"; then mv $@.coming $@; fi
+
+CLEANFILES = service-types.db* build-db
+
+endif
+endif