summaryrefslogtreecommitdiff
path: root/macro2m4.py
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2011-01-06 21:53:19 +0100
committerPeter Simons <simons@cryp.to>2011-01-06 21:59:31 +0100
commit76ca2be8f29d1814fa698a68cae35d905ce63020 (patch)
tree17cdc194f35242e887b0112977854e9a17b059e6 /macro2m4.py
parent7bc90c7f30048d79f60587a1f831a465f56e8049 (diff)
downloadautoconf-archive-76ca2be8f29d1814fa698a68cae35d905ce63020.tar.gz
Merge functionality of 'set-serial.sh' into the 'maintainer-all' target.
Running 'maintainer-all' will now automatically ensure that the #serial number of every macro corresponds to the number of commits that have modified that macro in the Git repository.
Diffstat (limited to 'macro2m4.py')
-rwxr-xr-xmacro2m4.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/macro2m4.py b/macro2m4.py
index bcd27d6..3db6ed8 100755
--- a/macro2m4.py
+++ b/macro2m4.py
@@ -22,7 +22,10 @@ tmpl = """\
#
%(license)s
-%(body)s"""
+#serial %(serial)d
+
+%(body)s
+"""
def formatParagraph(para):
assert para
@@ -50,7 +53,7 @@ if len(sys.argv) != 3:
raise Exception("invalid command line syntax: %s" % ' '.join(map(repr, sys.argv)))
(m4File,outFile) = sys.argv[1:]
assert outFile != m4File
-m = Macro(m4File)
+m = Macro(m4File, computeSerialNumber=True)
for i in range(len(m.description)):
para = m.description[i]
if para[0][0].isspace():