Hi! I wanted to suggest adding an example snippet to the README.md showing how projects can include GMSL in a self-contained, reproducible way by downloading it dynamically as needed.
This isn’t tested yet and I’m away from the keyboard for the next few days, so I’m posting it here just as a starting point for discussion, not a pull request.
The goal is to avoid requiring users to install GMSL globally or include it directly in their project and instead fetch it dynamically into the project (e.g., under vendor/) the first time it's needed:
## GMSL bootstrap START
GMSL_PKG := jgrahamc/gmsl
VENDOR_GMSL_DIR := vendor/$(GMSL_PKG)
GMSL_TARGET := $(VENDOR_GMSL_DIR)/gmsl.mk
GMSL_REPO_URL := https://github.com/$(GMSL_PKG).git
$(GMSL_TARGET):
@command -v git >/dev/null 2>&1 || { \
echo "Error: git is required to dynamically fetch GNU Make Standard Library. Please install git and try again." >&2; \
exit 1; \
}
mkdir -p $(dir $(dir $@))
git clone $(GMSL_REPO_URL) $(VENDOR_GMSL_DIR)
-include $(GMSL_TARGET)
# Reset the default goal so the next target becomes the default.
.DEFAULT_GOAL :=
## GMSL bootstrap END
Would you be open to including a version of this under a heading like "Including GMSL in your project"?
Thanks for maintaining GMSL—it’s a great resource.
— @loren-osborn
Hi! I wanted to suggest adding an example snippet to the
README.mdshowing how projects can include GMSL in a self-contained, reproducible way by downloading it dynamically as needed.This isn’t tested yet and I’m away from the keyboard for the next few days, so I’m posting it here just as a starting point for discussion, not a pull request.
The goal is to avoid requiring users to install GMSL globally or include it directly in their project and instead fetch it dynamically into the project (e.g., under
vendor/) the first time it's needed:Would you be open to including a version of this under a heading like "Including GMSL in your project"?
Thanks for maintaining GMSL—it’s a great resource.
— @loren-osborn