topdir.mk: Add target gitignore #102
Loading…
Reference in a new issue
No description provided.
Delete branch "jan/feature/20260913-topdir-mk-add-target-gitignore"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR adds a gitignore target to topdir.mk, backed by new JW_PKG_TMPL_SEARCH_PATH and JW_PKG_TMPL_UPDATE variables.
topdir.mk: Add JW_PKG_TMPL_XXX
Add variables to shorten typical invocations of "jw-pkg project update --format tmpl", and use them in py-topdir.mk
JW_PKG_TMPL_SEARCH_PATH JW_PKG_TMPL_UPDATE
topdir.mk: Add target gitignore
Add a target gitignore to topdir.mk, which blasts jw-pkg's default idea of how .gitignore should look like into $(TOPDIR)/.gitignore. It's not a prerequisite of any other target, because it's not meant to run automatically. The idea is to keep some central maintenance of what should be in there from jw-pkg's perspective, make it convenvient to update, but leave the final decision to the commiter of any project using the machinery.
jw-pkg-create-project.sh: Use make gitignore
jw-pkg-create-project.sh contains its own .gitignore template, which is redundant to the new gitignore mechanism. Replace it.
.gitignore: Run make gitignore
Update .gitignore by running "make gitignore. Add a couple of jw-pkg- specific build-artifacts to GITIGNORE_PATTERNS_END before:
.cache-projects.mk make/ssh-wrapper.sh
Also cancel the automatic inclusion of file paths containing jw-pkg with an empty GITIGNORE_PATTERNS_TOP.