diff options
author | Uwe Girlich <Uwe.Girlich@philosys.de> | 2003-07-21 07:05:44 +0000 |
---|---|---|
committer | Uwe Girlich <Uwe.Girlich@philosys.de> | 2003-07-21 07:05:44 +0000 |
commit | 5d885e2be8ca2671fd51900a541443239b3ea8f8 (patch) | |
tree | f15d62dbd279d25c00d52ed60efd375b5520e813 /make-reg-dotc.py | |
parent | 38f39bcbdfdba2a8a419089cd840ae1083c36763 (diff) | |
download | wireshark-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-x | make-reg-dotc.py | 7 |
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. |