mirror of
https://github.com/cc65/cc65.git
synced 2024-11-19 06:31:31 +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:
parent
c097401f8b
commit
5c12659cf4
10
src/Makefile
10
src/Makefile
@ -110,11 +110,21 @@ $(RM) /usr/local/bin/$(prog)
|
|||||||
|
|
||||||
endef # UNAVAIL_recipe
|
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:
|
||||||
$(INSTALL) -d $(DESTDIR)$(bindir)
|
$(INSTALL) -d $(DESTDIR)$(bindir)
|
||||||
$(INSTALL) ../bin/* $(DESTDIR)$(bindir)
|
$(INSTALL) ../bin/* $(DESTDIR)$(bindir)
|
||||||
|
|
||||||
avail:
|
avail:
|
||||||
|
$(foreach prog,$(PROGS),$(AVAIL_check_prog))
|
||||||
$(foreach prog,$(PROGS),$(AVAIL_recipe))
|
$(foreach prog,$(PROGS),$(AVAIL_recipe))
|
||||||
|
|
||||||
unavail:
|
unavail:
|
||||||
|
Loading…
Reference in New Issue
Block a user