patchupdate.py: Remove ugly hack to remove *.ok files on failure, use .INTERMEDIATE instead.

This commit is contained in:
Sebastian Lackner
2014-07-27 17:55:33 +02:00
parent 1f2cf52167
commit 3f4ea42573
3 changed files with 33 additions and 16 deletions

View File

@@ -8,14 +8,7 @@ PATCH := $(CURDIR)/../debian/tools/gitapply.sh -d $(DESTDIR)
PATCHLIST := {patchlist}
.PHONY: install
install:
@$(MAKE) apply; \
status=$$?; \
rm -f *.ok; \
exit $$status
.PHONY: apply
apply: $(PATCHLIST)
install: $(PATCHLIST)
cat *.ok | sort | $(CURDIR)/../debian/tools/patchlist.sh | $(PATCH)
cd $(DESTDIR) && autoreconf -f
cd $(DESTDIR) && ./tools/make_requests

View File

@@ -399,6 +399,7 @@ def generate_makefile(all_patches, fp):
fp.write("# |\n")
# Generate dependencies and code to apply patches
fp.write(".INTERMEDIATE: %s.ok\n" % patch.name)
depends = " ".join([""] + ["%s.ok" % all_patches[d].name for d in patch.depends]) if len(patch.depends) else ""
fp.write("%s.ok:%s\n" % (patch.name, depends))
for f in patch.files: