-
Notifications
You must be signed in to change notification settings - Fork 429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make avail: check for presence of binaries before creating symbolic links #1994
Conversation
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`.
The idea is good - but i am not sure i like it is using the shell (our Makefiles don't use the shell). @oliverschmidt any idea how this can be done just using make? I'd have to look it up and play around (but its probably possible... i guess) |
BTW: A consistent name for |
I tried the |
Use `ifeq` to provide two rules for the `avail` target: one that reports an error if any of the symlink targets are missing and one that installs the symlinks for the targets if they're all present.
you could just foreach( wildcard ../bin ... instead foreach($PROGS) |
I'm not sure what you mean. Are you talking about the |
right. if you think that there may be stuff in ../bin that's not in $PROGS (though, why should it?) you can maybe use a filter. |
If we use a glob to install the symlinks, then if the user didn't run |
in that case you can just add $(PROGS) to prerequisites of the avail target, so make avail will build the progs first if they dont exist. avail: $(PROGS) |
I know. The disadvantage of that is that Which is why I didn't simply add $(PROGS) as dependency of |
Any movement on this? It's not exactly brain surgery I'm performing in this PR ;) |
forgot :) |
Thanks! =) |
FYI, broke my workflow: which only does:
ETA: I updated my workflow to "manually" link ca65 and ld65 targets. Just a heads-up that others may have taken similar shortcuts. |
cc65's 'make avail' now fails unless all targets were built. Create links explicitly for ca65/ld65 only.
cc65's 'make avail' now fails unless all targets were built. Create links explicitly for ca65/ld65 only.
cc65's 'make avail' now fails unless all targets were built. Create links explicitly for ca65/ld65 only.
To be honest - i am thinking about removing this "avail" target altogether, because it is very non-unix and "install" is the right thing to do anyway. |
I agree removing |
But distributing cc65 is no problem (provide a |
I don't think any packager uses "make avail" :) |
Me neither. But: It was mentioned that removing However, changing behaviour of As I am packetizing cc65 myself, I only wanted to raise my voice to be careful when doing changes here. |
Last time I used Perhaps @mrdudz can move this into a discussion topic? |
Interestingly.... i cant do that here, for some reason (perhaps because it is merged?) - so better open a new discussion topic :) |
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 runmake
.