Skip to content

Commit 42e927d

Browse files
committed
makefile/meson: add 'check-headers' as alias for 'hdr-check'
The 'hdr-check' target in Meson and makefile is used to check if headers can be compiled individually. The naming however isn't readable as 'hdr' is not a common shortforme for 'header', neither is it an abbreviation. Let's introduce 'check-headers' as an alternative target for 'hdr-check' and add a `TODO` to deprecate the latter after 2 releases. Since this is an internal tool, we can use a shorter deprecation cycle. Change existing usage of 'hdr-check' in 'ci/run-static-analysis.sh' to also use 'check-headers'. Signed-off-by: Karthik Nayak <[email protected]>
1 parent dbbb1f3 commit 42e927d

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

Diff for: Makefile

+3-1
Original file line numberDiff line numberDiff line change
@@ -3326,8 +3326,10 @@ HCC = $(HCO:hco=hcc)
33263326
$(HCO): %.hco: %.hcc $(GENERATED_H) FORCE
33273327
$(QUIET_HDR)$(CC) $(ALL_CFLAGS) -o /dev/null -c -xc $<
33283328

3329-
.PHONY: hdr-check $(HCO)
3329+
# TODO: deprecate 'hdr-check' in lieu of 'check-headers' in Git 2.51+
3330+
.PHONY: hdr-check check-headers $(HCO)
33303331
hdr-check: $(HCO)
3332+
check-headers: hdr-check
33313333

33323334
.PHONY: style
33333335
style:

Diff for: ci/run-static-analysis.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ then
2626
exit 1
2727
fi
2828

29-
make hdr-check ||
29+
make check-headers ||
3030
exit 1
3131

3232
make check-pot

Diff for: meson.build

+3-1
Original file line numberDiff line numberDiff line change
@@ -2054,7 +2054,9 @@ if headers_to_check.length() != 0 and compiler.get_argument_syntax() == 'gcc'
20542054
hco_targets += hco
20552055
endforeach
20562056

2057-
alias_target('hdr-check', hco_targets)
2057+
# TODO: deprecate 'hdr-check' in lieu of 'check-headers' in Git 2.51+
2058+
hdr_check = alias_target('hdr-check', hco_targets)
2059+
alias_target('check-headers', hdr_check)
20582060
endif
20592061

20602062
foreach key, value : {

0 commit comments

Comments
 (0)