1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-01 13:41:34 +00:00

make avail: check for presence of binaries before creating symbolic

links

To avoid creating broken symlinks, first check if the binaries exists in
bin/ and exit when they don't, with a message to first run `make`.
This commit is contained in:
compyx 2023-02-19 14:01:14 +01:00
parent c097401f8b
commit 5c12659cf4

View File

@ -110,11 +110,21 @@ $(RM) /usr/local/bin/$(prog)
endef # UNAVAIL_recipe
define AVAIL_check_prog
@if [ ! -e ../bin/$(prog) ]; then \
echo "failed to locate $(prog), please run make first"; \
false; \
fi
endef # AVAIL_check_prog
install:
$(INSTALL) -d $(DESTDIR)$(bindir)
$(INSTALL) ../bin/* $(DESTDIR)$(bindir)
avail:
$(foreach prog,$(PROGS),$(AVAIL_check_prog))
$(foreach prog,$(PROGS),$(AVAIL_recipe))
unavail: