diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2022-10-21 11:11:11 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-10-21 09:25:56 +0000 |
commit | 954791b9639a62e09488a21d152aaa7ee59f877d (patch) | |
tree | 96fd836353e3b647923aed836668fa4603ce0fa4 | |
parent | 99014191b6c2e7abd0614e885a338ab1d6f34432 (diff) |
Fix Makefile rule for patch to succeed on diff status 1
The exit status for diff is "0 if inputs are the same, 1 if different,
2 if trouble." So say out loud that the patch is empty if diff
"succeeds", otherwise succeed precisely if its status was 1.
Change-Id: Ia2497a0c9673e0c663d01d6e34815e663b83ba09
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-rw-r--r-- | Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -52,7 +52,8 @@ clean: # For use during an update: .PHONY: patch patch: template.html planetqt/template.qt - $Q cp $< scripts/$< && diff -bu planetqt/template.qt scripts/$< >scripts/template.diff + $Q if cp $< scripts/$< && diff -bu planetqt/template.qt scripts/$< >scripts/template.diff; \ + then echo Empty patch; else [ $$? -eq 1 ]; fi # Does not declare dependency of template.diff on prerequisites, to avoid circular dependency. planetqt/template.qt planetqt/website: |