./omkbuild.py --all
split:
- ./omkbuild.py --split=Makefile.rules
\ No newline at end of file
+ cd snippets; ../omkbuild.py --split=../Makefile.rules
\ No newline at end of file
as they are in snippets i.e. copyrights, documentations and rules.
* On the first line of each part of the Makefile.rules, there is
- special mart of the form #OMK@<snippet file name><EOL>. This mark
- is used for splitting Makefile.rules back to the original
- snippets.
+ special mark of the form #OMK@<snippet file name><EOL>. This mark
+ is used for splitting modified Makefile.rules back to the
+ original snippets.
"""
rulesCheck.snippets = rules.snippets
rulesCheck.combine()
- # The order of rules might be different
+ # The comparsion is not that simple. The order of rules might be
+ # different.
# if rules.rules != rulesCheck.rules:
# sys.stderr.write("Consistency error:\n")
# diff = rules.rules.getDiff(rulesCheck.rules)
# sys.exit(1)
for snip in rules.snippets:
- print snip.__class__
-# f = None
-# if output == "-": f = sys.stdout
-# f.writelines(rules.rules)
-# f.close()
+ print snip.name
+ f = None
+ if output == "-": f = sys.stdout
+ else: f = open(snip.name, "w+")
+ f.writelines(snip.asLinesList())
+ f.close()
def buildAllRules():
import rulesdef