Skip to content

Commit af6fb80

Browse files
authored
Merge pull request #4227 from grandixximo/fix/rtai-submakefile-adoc
build: keep comp manpage adoc rules out of the kbuild pass
2 parents 742b1e7 + a7567e4 commit af6fb80

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/hal/components/Submakefile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,12 @@ ifeq ($(TRIVIAL_BUILD),no)
5050
-include $(patsubst %.comp, objects/%.mak, $(COMPS) $(COMP_DRIVERS))
5151
Makefile: $(patsubst %.comp, objects/%.mak, $(COMPS) $(COMP_DRIVERS))
5252
endif
53-
endif
54-
55-
obj-m += $(patsubst hal/drivers/%.comp, %.o, $(patsubst hal/components/%.comp, %.o, $(COMPS) $(COMP_DRIVERS)))
5653

54+
# Manpage generation is a top-level (non-kbuild) concern. Keep it inside
55+
# the KERNELRELEASE else branch: in the kbuild pass COMPS is rebuilt from a
56+
# wildcard that mixes hal/components and hal/drivers, so deriving the adoc
57+
# targets from it there yields hal/drivers/*.comp entries that fail the
58+
# hal/components/%.comp static pattern rule.
5759
COMP_MANPAGE_ADOCS := $(patsubst hal/components/%.comp, objects/man/man9/%.9.adoc, $(COMPS)) objects/man/man9/tpcomp.9.adoc objects/man/man9/homecomp.9.adoc
5860
COMP_DRIVER_MANPAGE_ADOCS := $(patsubst hal/drivers/%.comp, objects/man/man9/%.9.adoc, $(COMP_DRIVERS))
5961

@@ -86,6 +88,9 @@ $(COMP_MANPAGES) $(COMP_DRIVER_MANPAGES): ../docs/build/man/man9/%.9: objects/ma
8688
-a mansource=LinuxCNC \
8789
-a manmanual='LinuxCNC Documentation' \
8890
$<
91+
endif
92+
93+
obj-m += $(patsubst hal/drivers/%.comp, %.o, $(patsubst hal/components/%.comp, %.o, $(COMPS) $(COMP_DRIVERS)))
8994

9095
objects/%.mak: %.comp hal/components/Submakefile
9196
$(ECHO) "Creating $(notdir $@)"

0 commit comments

Comments
 (0)