py/mkrules.mk: Add rule for compiling auto-generated source files.

This prevents each port Makefile from having to add an explicit rule for
`build-BOARD/pins_BOARD.c`.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
Jim Mussared
2023-08-03 15:57:02 +10:00
committed by Damien George
parent aa329d11ea
commit 2eda513870
7 changed files with 4 additions and 18 deletions

View File

@@ -97,6 +97,10 @@ $(BUILD)/%.pp: %.c
$(ECHO) "PreProcess $<"
$(Q)$(CPP) $(CFLAGS) -Wp,-C,-dD,-dI -o $@ $<
# Special case for compiling auto-generated source files.
$(BUILD)/%.o: $(BUILD)/%.c
$(call compile_c)
# The following rule uses | to create an order only prerequisite. Order only
# prerequisites only get built if they don't exist. They don't cause timestamp
# checking to be performed.