summaryrefslogtreecommitdiff
path: root/cpp/makedist.py
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2002-11-13 22:14:18 +0000
committerMark Spruiell <mes@zeroc.com>2002-11-13 22:14:18 +0000
commitfda2208cba64f062641255159d061c5abb33ecad (patch)
tree1b4982722629c5aae65aa6af8c5d918c7d4cd238 /cpp/makedist.py
parentfix (diff)
downloadice-fda2208cba64f062641255159d061c5abb33ecad.tar.bz2
ice-fda2208cba64f062641255159d061c5abb33ecad.tar.xz
ice-fda2208cba64f062641255159d061c5abb33ecad.zip
fix for implicit parser/scanner rules
Diffstat (limited to 'cpp/makedist.py')
-rwxr-xr-xcpp/makedist.py42
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.
#