projects-dir-minimal.mk: Fix linking after package build

Linking the projects-dir Makefile fails if make pkg-rebuild has been
run on jw-build, because it leaves another projects-dir-minimal.mk
below the dist directory. Fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2025-11-19 08:24:58 +01:00
commit 8de4a90796

View file

@ -44,7 +44,7 @@ $(JWBDIR):
all: link-makefile.done all: link-makefile.done
link-makefile.done: | $(JWBDIR) link-makefile.done: | $(JWBDIR)
[ -L $(PROJECTS_MAKEFILE_NAME) ] || \ [ -L $(PROJECTS_MAKEFILE_NAME) ] || \
ln -sf `find $(JWBDIR) -name '*.mk' -print0 | xargs -0 grep -l some-random-string-to-id-this-makefile` \ ln -sf `git -C $(JWBDIR) ls-files | sed '/\.mk$$/ !d; s|^|$(JWBDIR)/|' | xargs grep -l some-random-string-to-id-this-makefile` \
$(PROJECTS_MAKEFILE_NAME) $(PROJECTS_MAKEFILE_NAME)
touch $@ touch $@
clean: clean.link-makefile clean: clean.link-makefile