Skip to content
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

Makefile: do not hardcode prefix on macOS #118

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

barracuda156
Copy link
Contributor

Installing anything in /usr should rather be avoided on macOS, and in any case there is no need to hardcode that.

@barracuda156
Copy link
Contributor Author

Looks like it actually still tries to use /etc/xdg, i.e. overriding does not work correctly:

Executing:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_albafetch/albafetch/work/albafetch-6d34bb67a7e1eae7b750b8e807271bf3a728cb48" && /usr/bin/make -w install DESTDIR=/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_albafetch/albafetch/work/destroot 
make: Entering directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_albafetch/albafetch/work/albafetch-6d34bb67a7e1eae7b750b8e807271bf3a728cb48'
mkdir -p /usr/local/bin /etc/xdg
mkdir: /etc/xdg: Permission denied
make: *** [install] Error 1

@barracuda156 barracuda156 marked this pull request as draft September 24, 2024 14:33
@barracuda156
Copy link
Contributor Author

Ah, that is because this does not work:

OS := $(shell uname -o 2> /dev/null)

Correct flag is -s:

36-25% uname -o
uname: illegal option -- o
usage: uname [-amnprsv]
36-25% uname -s
Darwin

@barracuda156 barracuda156 marked this pull request as ready for review September 24, 2024 15:00
@barracuda156
Copy link
Contributor Author

@alba4k Ok, now this seems to work finally. Overrides were failing due to an invalid flag with uname.

P. S. Ubuntu CI fails on PATH_MAX, unrelated to this.

@alba4k
Copy link
Owner

alba4k commented Sep 24, 2024

yeah, I noticed. plan on fixing that once I get home

@alba4k
Copy link
Owner

alba4k commented Sep 24, 2024

wait though, uname -o worked on mac last time I tried and the output was Darwin. I need it to be -o because -s gives Linux on both Android and (GNU)/Linux

I guess a solution would be going back to what I was doing before, aka checking -s and then -o for android

@barracuda156
Copy link
Contributor Author

Ok, let me drop the uname commit and just leave the prefix one. (Please fix uname then later.)

@alba4k alba4k merged commit 6ffb28e into alba4k:master Sep 24, 2024
0 of 4 checks passed
@alba4k
Copy link
Owner

alba4k commented Sep 24, 2024

will fix uname in an hour or so

@barracuda156 barracuda156 deleted the apple_install branch September 24, 2024 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants