]> git.meshlink.io Git - catta/commitdiff
fix make distcheck
authorLennart Poettering <lennart@poettering.net>
Sun, 28 Aug 2005 19:27:02 +0000 (19:27 +0000)
committerLennart Poettering <lennart@poettering.net>
Sun, 28 Aug 2005 19:27:02 +0000 (19:27 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@475 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

service-type-database/Makefile.am
service-type-database/build-db.in

index 171de5718f7ffbc80fa6af9ca09116358cb998ad..ab9242209d4e523935640f8bab6829fb7b54d55a 100644 (file)
@@ -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
 
index 16a50e408cbbdd1d996f6b58d3417621ce7d56bd..c27eb90b6215ab83702658a810c24135db7f32c0 100755 (executable)
@@ -1,5 +1,5 @@
 #!@PYTHON@
-
+# -*-python-*-
 # $Id$
 
 # This file is part of avahi.
 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("#"):