File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -529,8 +529,8 @@ endif
529
529
530
530
ifneq (,$(MEM_STATS_HDR))
531
531
EXPECTED_MD5=$(shell [ -f $(MEM_STATS_HDR) ] && tail -n 1 $(MEM_STATS_HDR) | awk '{print $$4}')
532
- MODULES_MD5=$(shell find $(dir $(MEM_STATS_HDR))/../modules -name "[Mm]akefile" | \
533
- awk -F/ '{print $$(NF - 1)}' | sort | $(md5sum_cmd) | awk '{print $$1}')
532
+ MODULES_MD5=$(shell find $(dir $(MEM_STATS_HDR))/../modules -maxdepth 2 - name "[Mm]akefile" | \
533
+ awk -F/ '{print $$(NF - 1)}' | sort -u | $(md5sum_cmd) | awk '{print $$1}')
534
534
ifneq ($(EXPECTED_MD5),$(MODULES_MD5))
535
535
REGENERATE_MEM_STATS=remove-mem-stats
536
536
endif
Original file line number Diff line number Diff line change 42
42
md5sum_cmd = md5sum
43
43
endif
44
44
EXPECTED_MD5=$(shell [ -f $(MEM_STATS_HDR) ] && tail -n 1 $(MEM_STATS_HDR) | awk '{print $$4}')
45
- MODULES_MD5=$(shell find $(dir $(MEM_STATS_HDR))/../modules -name "[Mm]akefile" | \
46
- awk -F/ '{print $$(NF - 1)}' | sort | $(md5sum_cmd) | awk '{print $$1}')
45
+ MODULES_MD5=$(shell find $(dir $(MEM_STATS_HDR))/../modules -maxdepth 2 - name "[Mm]akefile" | \
46
+ awk -F/ '{print $$(NF - 1)}' | sort -u | $(md5sum_cmd) | awk '{print $$1}')
47
47
ifneq ($(EXPECTED_MD5),$(MODULES_MD5))
48
48
REGENERATE_MEM_STATS=remove-mem-stats
49
49
endif
Original file line number Diff line number Diff line change @@ -68,8 +68,8 @@ Makefile.conf: Makefile.conf.template
68
68
69
69
# no need to generate mem/mem_stats.c from anywhere else
70
70
mem/mem_stats.c: mem/mem_stats.h
71
- @find modules/ -name "[Mm]akefile" -exec grep "NAME\s*=" {} \; \
72
- | awk 'BEGIN { FS = "[=\\. ]"; \
71
+ @find modules/ -maxdepth 2 - name "[Mm]akefile" -exec grep "NAME\s*=" {} \; \
72
+ | sort -u | awk 'BEGIN { FS = "[=\\. ]"; \
73
73
print "/* This file is auto-generated by running \"make generate-mem-stats\" */"; \
74
74
print "/* You should NOT edit this file manually */"; \
75
75
print "#ifdef SHM_EXTRA_STATS"; \
@@ -82,8 +82,8 @@ remove-mem-stats:
82
82
-@rm -f $(MEM_STATS_HDR)
83
83
84
84
%mem_stats.h: $(REGENERATE_MEM_STATS)
85
- @find $(dir $@)/../modules/ -name "[Mm]akefile" -exec grep "NAME\s*=" {} \; \
86
- | awk 'BEGIN { FS = "[=\\. ]"; \
85
+ @find $(dir $@)/../modules/ -maxdepth 2 - name "[Mm]akefile" -exec grep "NAME\s*=" {} \; \
86
+ | sort -u | awk 'BEGIN { FS = "[=\\. ]"; \
87
87
print "/* This file is auto-generated by running \"make generate-mem-stats\" */"; \
88
88
print "/* You should NOT edit this file manually */"; \
89
89
print "#ifdef SHM_EXTRA_STATS"; \
You can’t perform that action at this time.
0 commit comments