acpica.org-mirror/tools/gen.py
Denis 'GNUtoo' Carikli 5b613b1bca
Initial commit
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
2023-07-16 18:13:09 +02:00

111 lines
4 KiB
Python
Executable file

#!/usr/bin/env python3
# Copyright (C) 2023 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import os
# Generated with
# 'git log --oneline -- admin.scm | grep "gnu: acpica: Update to "'
commits="""0bb0984724 gnu: acpica: Update to 20220331.
67c72c8c70 gnu: acpica: Update to 20211217.
2cced18b76 gnu: acpica: Update to 20210930.
f25304236a gnu: acpica: Update to 20210730.
4bacf9ced9 gnu: acpica: Update to 20210730.
c4d9c9cb3f gnu: acpica: Update to 20210604.
4ebf6ccb3e gnu: acpica: Update to 20210331.
ee858defb2 gnu: acpica: Update to 20210105.
4904d31e88 gnu: acpica: Update to 20201217.
c8edef614c gnu: acpica: Update to 20201113.
d265e61f50 gnu: acpica: Update to 20200925.
2b4dc589e9 gnu: acpica: Update to 20200717.
0792984459 gnu: acpica: Update to 20200528.
c1ca686bc8 gnu: acpica: Update to 20200430.
75083257ac gnu: acpica: Update to 20200326.
ec09abc6ac gnu: acpica: Update to 20200214.
762b2af6c6 gnu: acpica: Update to 20200110.
401298ba94 gnu: acpica: Update to 20191213.
b577306a92 gnu: acpica: Update to 20191018.
b439d9b290 gnu: acpica: Update to 20190816.
347b4c47b4 gnu: acpica: Update to 20190703.
2ce144eebb gnu: acpica: Update to 20190509.
7710b8f8ad gnu: acpica: Update to 20190405.
70c8b1ec30 gnu: acpica: Update to 20190215.
9b1125bc6c gnu: acpica: Update to 20180810.
8ef7ecf469 gnu: acpica: Update to 20180629.
84979374c2 gnu: acpica: Update to 20180531.
ab3950d809 gnu: acpica: Update to 20180508.
e56feffec0 gnu: acpica: Update to 20180427.
8027f84d8f gnu: acpica: Update to 20180313.
6577611b2b gnu: acpica: Update to 20180209.
4a462aa7f4 gnu: acpica: Update to 20171110.
2036a6484e gnu: acpica: Update to 20150410."""
# Header
print("""# Copyright (C) 2023 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
""")
print("all: \\")
for commit in commits.split(os.linesep):
version = commit.split(" ")[5].replace('.', '')
print("\tacpica-unix2-{}.tar.gz \\".format(version))
print()
# Targets
for commit in commits.split(os.linesep):
parts = commit.split(" ")
short_id = parts[0]
version = parts[5].replace('.', '')
print("# {}".format(commit))
print("acpica-unix2-{}.tar.gz:".format(version))
print("\tinstall -m 644 \\")
print("\t`guix time-machine --commit={} -- {}` \\".format(
short_id,
"build --source acpica"))
print("\t$@")
print()
# Footer
print("""# 13c8c2bf13 gnu: Add acpica.
acpica-unix2-20140724.tar.gz:
install -m 644 \\
`guix time-machine --commit=v0.8 -- build --source acpica` \\
$@
.PHONY: check-acpica-unix2-20210331.tar.gz
check-acpica-unix2-20210331.tar.gz.sha1: acpica-unix2-20210331.tar.gz.sha1
sha1sum -c $^.sha1
# Maintenance tools
.PHONY: Makefile.new
Makefile.new: tools/gen.py
./tools/gen.py > $@
.PHONY: meld
meld: Makefile Makefile.new
meld Makefile Makefile.new""")