diff options
author | Mark Spruiell <mes@zeroc.com> | 2002-11-13 22:14:18 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2002-11-13 22:14:18 +0000 |
commit | fda2208cba64f062641255159d061c5abb33ecad (patch) | |
tree | 1b4982722629c5aae65aa6af8c5d918c7d4cd238 /cpp/makedist.py | |
parent | fix (diff) | |
download | ice-fda2208cba64f062641255159d061c5abb33ecad.tar.bz2 ice-fda2208cba64f062641255159d061c5abb33ecad.tar.xz ice-fda2208cba64f062641255159d061c5abb33ecad.zip |
fix for implicit parser/scanner rules
Diffstat (limited to 'cpp/makedist.py')
-rwxr-xr-x | cpp/makedist.py | 42 |
1 files changed, 39 insertions, 3 deletions
diff --git a/cpp/makedist.py b/cpp/makedist.py index e3e506410c5..12ae118e06e 100755 --- a/cpp/makedist.py +++ b/cpp/makedist.py @@ -56,10 +56,10 @@ def fixMakefile(file, target): newLines = [] for x in origLines: # - # If the line starts with the target string, then - # comment out this make target. + # If the rule contains the target string, then + # comment out this rule. # - if x.startswith(target) and not x.startswith(target + ".o"): + if not x.startswith("\t") and x.find(target) != -1 and x.find(target + ".o") == -1: doComment = 1 # # If the line starts with "clean::", then check @@ -130,6 +130,36 @@ def fixProject(file, target): os.remove(origfile) # +# Comment out implicit parser/scanner rules in config/Make.rules. +# +def fixMakeRules(file): + origfile = file + ".orig" + os.rename(file, origfile) + oldFile = open(origfile, "r") + newFile = open(file, "w") + origLines = oldFile.readlines() + + doComment = 0 + newLines = [] + for x in origLines: + if x.find("%.y") != -1 or x.find("%.l") != -1: + doComment = 1 + # + # Stop when we encounter an empty line. + # + elif len(x.strip()) == 0: + doComment = 0 + + if doComment: + x = "#" + x + newLines.append(x) + + newFile.writelines(newLines) + newFile.close() + oldFile.close() + os.remove(origfile) + +# # Check arguments # tag = "-rHEAD" @@ -228,6 +258,12 @@ for x in scanners: os.chdir(cwd) # +# Comment out the implicit parser and scanner rules in +# config/Make.rules. +# +fixMakeRules(os.path.join("ice", "config", "Make.rules")) + +# # Generate HTML documentation. We need to build icecpp # and slice2docbook first. # |