26.07.2017 16:23, Jeff King пишет:
In git.git we do something like: -- >8 -- other: version cat $< >$@ .PHONY: FORCE version: FORCE @git rev-parse HEAD >$@+ @if cmp $@+ $@ >/dev/null 2>&1; then rm $@+; else mv $@+ $@; fi -- >8 --
Yes, thats a nice recipe that I would be using if not for the fact that I already switched to "touch", which requires 1 fewer tmp file and no comparison. But I'll keep this in mind if something wrong happens with my current solution, thanks! I wonder if git can provide some helper script for other projects to solve this in a same way.