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

Set variables in the Makefile conditionally. #20

Closed
wants to merge 1 commit into from
Closed

Set variables in the Makefile conditionally. #20

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Jan 22, 2017

It's the bare minimum that's needed in order to make this utility more easily packageable by package managers.

@professorjamesmoriarty
Copy link

If this is merged, It would be great if a point release could be made.

@leahneukirchen
Copy link
Owner

I could do this, but make PREFIX=/usr works already... what's the benefit?

@jepler
Copy link

jepler commented Nov 24, 2017

@chneukirchen when the PREFIX is provided via environment, it does not override a Makefile variable set with "=".

$ env PREFIX=y make -n install
mkdir -p /usr/local/bin /usr/local/share/man/man1
install -m0755 nq fq tq /usr/local/bin
install -m0644 nq.1 fq.1 tq.1 /usr/local/share/man/man1

With the proposed patch, it does.

@h3xx
Copy link

h3xx commented Jan 12, 2018

@jepler That's why you set the variables by appending them to the make(1) invocation:

$ make -n install PREFIX=y
...
mkdir -p y/bin y/share/man/man1
install -m0755 nq fq tq y/bin
install -m0644 nq.1 fq.1 tq.1 y/share/man/man1

Or you can use make -e:

$ env PREFIX=y make -e -n install 
...
mkdir -p y/bin y/share/man/man1
install -m0755 nq fq tq y/bin
install -m0644 nq.1 fq.1 tq.1 y/share/man/man1

I think this is flexible enough as it is.

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.

None yet

5 participants