You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provide a set of well known file globs/paths for users to incorporate their own build logic without having to worry about merge conflicts or breaking changes.
Background
There are a few concurrent changes happening with relation to how Marlin is developed and tested. Since the 1.0.x branch I've used a Makefile in the root of the project for the management of the project. Moving to the 2.0.x branch required a little bit of re-tooling and incorporating PlatformIO commands instead of my previous avr-gcc commands, but this was not a problem as it was a one time change.
With the work being done on #19640 I may consider swapping some of these back out, though the library management of PlatformIO works well enough and does provide a bit of time savings.
Unfortunately #19981 caught me by surprise as there has never been a Makefile in the root of the project (at least as best I could tell checking all the way back to @boelle tagging 1.0.1 in 2014). Furthermore, the mutations it caused (noted in #20433) added additional annoyance, beyond the simple resolution of merge conflicts.
Personally, it would be nice to have some way of defining my own Makefile.local.mk type file in which I know I can add my own targets while being able to cleanly fast-forward the rest of the repository.
Sample change
I have a mock up in my current repository, which can be seen here:
THIS_FILE := $(lastword $(MAKEFILE_LIST))
EXTRA_MAKEFILES := $(strip $(wildcard Makefile.*.mk))
ifneq ($(EXTRA_MAKEFILES),)
contents := $(shell echo including extra makefiles $(EXTRA_MAKEFILES))
include $(EXTRA_MAKEFILES)
endif
list:
@$(MAKE) -pRrq -f $(THIS_FILE) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$'
.PHONY: list
In this change set I am establishing a conditional include (in the event that the files exist) of any files matching the pattern Makefile.*.mk will be included into the workflow. Additionally, a new target (list) is added which will enumerate all targets found across the composed Makefile.
Next steps
Discussion of the idea, specifically around: pros, cons, potential areas where this may break or introduce additional problems, etc.
The text was updated successfully, but these errors were encountered:
Description
Provide a set of well known file globs/paths for users to incorporate their own build logic without having to worry about merge conflicts or breaking changes.
Background
There are a few concurrent changes happening with relation to how Marlin is developed and tested. Since the
1.0.x
branch I've used aMakefile
in the root of the project for the management of the project. Moving to the2.0.x
branch required a little bit of re-tooling and incorporating PlatformIO commands instead of my previousavr-gcc
commands, but this was not a problem as it was a one time change.With the work being done on #19640 I may consider swapping some of these back out, though the library management of PlatformIO works well enough and does provide a bit of time savings.
Unfortunately #19981 caught me by surprise as there has never been a
Makefile
in the root of the project (at least as best I could tell checking all the way back to @boelle tagging 1.0.1 in 2014). Furthermore, the mutations it caused (noted in #20433) added additional annoyance, beyond the simple resolution of merge conflicts.Personally, it would be nice to have some way of defining my own
Makefile.local.mk
type file in which I know I can add my own targets while being able to cleanly fast-forward the rest of the repository.Sample change
I have a mock up in my current repository, which can be seen here:
https://github.com/brianredbeard/marlin-firmware/blob/45faff56f03c219233a08033806ecadcb233b053/Makefile#L1-L16
In this change set I am establishing a conditional include (in the event that the files exist) of any files matching the pattern
Makefile.*.mk
will be included into the workflow. Additionally, a new target (list
) is added which will enumerate all targets found across the composedMakefile
.Next steps
Discussion of the idea, specifically around: pros, cons, potential areas where this may break or introduce additional problems, etc.
The text was updated successfully, but these errors were encountered: