aboutsummaryrefslogtreecommitdiffstats
path: root/make-reg-dotc.py
diff options
context:
space:
mode:
authorUwe Girlich <Uwe.Girlich@philosys.de>2003-07-21 07:05:44 +0000
committerUwe Girlich <Uwe.Girlich@philosys.de>2003-07-21 07:05:44 +0000
commit5d885e2be8ca2671fd51900a541443239b3ea8f8 (patch)
treef15d62dbd279d25c00d52ed60efd375b5520e813 /make-reg-dotc.py
parent38f39bcbdfdba2a8a419089cd840ae1083c36763 (diff)
downloadwireshark-5d885e2be8ca2671fd51900a541443239b3ea8f8.tar.gz
wireshark-5d885e2be8ca2671fd51900a541443239b3ea8f8.tar.bz2
wireshark-5d885e2be8ca2671fd51900a541443239b3ea8f8.zip
Look for source files in the current directory first and then in srcdir.
This semantic is used in make-reg-dotc (the shell script) as well and it is needed, if the source directory and the build directory are different. svn path=/trunk/; revision=8057
Diffstat (limited to 'make-reg-dotc.py')
-rwxr-xr-xmake-reg-dotc.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/make-reg-dotc.py b/make-reg-dotc.py
index 58494dc776..503e1060c5 100755
--- a/make-reg-dotc.py
+++ b/make-reg-dotc.py
@@ -9,7 +9,7 @@
# seds for each input file. I wrote this python version so that
# less processes would have to be started.
#
-# $Id: make-reg-dotc.py,v 1.3 2001/06/19 08:29:32 guy Exp $
+# $Id: make-reg-dotc.py,v 1.4 2003/07/21 07:05:44 girlich Exp $
import os
import sys
@@ -37,7 +37,10 @@ reg_code.write('#include "register.h"\n')
# Create the proper list of filenames
filenames = []
for file in files:
- filenames.append("%s/%s" % (srcdir, file))
+ if os.path.isfile(file):
+ filenames.append(file)
+ else:
+ filenames.append("%s/%s" % (srcdir, file))
# Look through all files, applying the regex to each line.