Lines 25-31
Link Here
|
25 |
# check_sum.py works perfectly fine but slow when called for every file from $(ALLS) |
25 |
# check_sum.py works perfectly fine but slow when called for every file from $(ALLS) |
26 |
# (perhaps even several times for each file). |
26 |
# (perhaps even several times for each file). |
27 |
# That is why much less readable but faster solution exists |
27 |
# That is why much less readable but faster solution exists |
28 |
ifneq (, $(shell command -v sha256sum)) |
|
|
29 |
%.hash: FORCE |
28 |
%.hash: FORCE |
30 |
$(eval $@_ABS := $(abspath $@)) |
29 |
$(eval $@_ABS := $(abspath $@)) |
31 |
$(eval $@_NAME := $($@_ABS)) |
30 |
$(eval $@_NAME := $($@_ABS)) |
Lines 38-47
Link Here
|
38 |
echo re-hash $($@_ORIG); \ |
37 |
echo re-hash $($@_ORIG); \ |
39 |
sha256sum $($@_ORIG) > $($@_ABS); \ |
38 |
sha256sum $($@_ORIG) > $($@_ABS); \ |
40 |
fi |
39 |
fi |
41 |
else |
|
|
42 |
%.hash: FORCE |
43 |
@./tools/check_sum.py $@ # --debug |
44 |
endif |
45 |
|
40 |
|
46 |
# Enumerate intermediate files to don't remove them automatically. |
41 |
# Enumerate intermediate files to don't remove them automatically. |
47 |
.SECONDARY: $(call to-hash,$(ALLS)) |
42 |
.SECONDARY: $(call to-hash,$(ALLS)) |