From 555eadca6baf528093bf22d4496dc468e3151f11 Mon Sep 17 00:00:00 2001 From: Owen W. Taylor Date: Jan 31 2018 10:21:01 +0000 Subject: Makefile: make the maintainer be more explicit Instead of having 'make' generate a HTML report and also update flatpak-runtime.yaml, have a pair of 'make report' and 'make update'. --- diff --git a/.gitignore b/.gitignore index 73d7763..eb809d7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ out/* -cache/* report.html -tools/__pycache__ \ No newline at end of file +tools/__pycache__ +flatpak-runtime.new.yaml diff --git a/Makefile b/Makefile index 65b8cc2..f915d6a 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,15 @@ PROFILE_FILES = \ FILE_LISTS = \ $(patsubst %.packages,%.files,$(PACKAGE_LISTS)) -all: report.html flatpak-runtime.yaml +all: + @echo "Targets:" + @echo " report: Generates report.html, and a candidate flatpak-runtime.new.yaml" + @echo " update: Generates the above files, then copies flatpak-runtime.new.yaml to flatpak-runtime.yaml" + +report: report.html flatpak-runtime.new.yaml + +update: report + cp flatpak-runtime.new.yaml flatpak-runtime.yaml report.html $(PROFILE_FILES): $(PACKAGE_LISTS) package-notes.txt tools/generate-report.py report-template.html ./tools/generate-report.py @@ -27,10 +35,10 @@ $(PACKAGE_LISTS): tools/resolve-files.py $(FILE_LISTS) ./tools/resolve-files.py $$f ; \ done -flatpak-runtime.yaml: $(PROFILE_FILES) flatpak-runtime.in.yaml tools/generate-modulemd.py +flatpak-runtime.new.yaml: $(PROFILE_FILES) flatpak-runtime.in.yaml tools/generate-modulemd.py ./tools/generate-modulemd.py clean: - rm -f out/* + rm -f out/* report.html flatpak-runtime.new.yaml -.PHONY: clean +.PHONY: all clean report update diff --git a/tools/generate-modulemd.py b/tools/generate-modulemd.py index b3bb4ef..4d9046e 100755 --- a/tools/generate-modulemd.py +++ b/tools/generate-modulemd.py @@ -16,5 +16,5 @@ set_profile('runtime-base', 'out/runtime-base.profile') set_profile('sdk', 'out/sdk.profile') set_profile('sdk-base', 'out/sdk-base.profile') -with open('flatpak-runtime.yaml', 'w') as f: +with open('flatpak-runtime.new.yaml', 'w') as f: ordered_dump(modulemd, stream=f, default_flow_style=False, encoding="utf-8")