From 2452b35ceb07e536c3c506c82cd79d44efad4165 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 28 Aug 2005 19:27:02 +0000 Subject: [PATCH] fix make distcheck git-svn-id: file:///home/lennart/svn/public/avahi/trunk@475 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- service-type-database/Makefile.am | 2 +- service-type-database/build-db.in | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/service-type-database/Makefile.am b/service-type-database/Makefile.am index 171de57..ab92422 100644 --- a/service-type-database/Makefile.am +++ b/service-type-database/Makefile.am @@ -31,7 +31,7 @@ build-db: build-db.in chmod +x $@ service-types.db: service-types - $(PYTHON) build-db $< + $(PYTHON) build-db $(srcdir)/$< $@ CLEANFILES = service-types.db build-db diff --git a/service-type-database/build-db.in b/service-type-database/build-db.in index 16a50e4..c27eb90 100755 --- a/service-type-database/build-db.in +++ b/service-type-database/build-db.in @@ -1,5 +1,5 @@ #!@PYTHON@ - +# -*-python-*- # $Id$ # This file is part of avahi. @@ -22,13 +22,21 @@ import dbm, sys if len(sys.argv) > 1: - fn = sys.argv[1] + infn = sys.argv[1] +else: + infn = "service-types" + +if len(sys.argv) > 2: + outfn = sys.argv[2] else: - fn = "service-types" + outfn = infn + +if outfn.endswith(".db"): + outfn = outfn[:-3] -db = dbm.open(fn, "n") +db = dbm.open(outfn, "n") -for ln in file(fn, "r"): +for ln in file(infn, "r"): ln = ln.strip(" \r\n\t") if ln == "" or ln.startswith("#"): -- 2.39.5