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

Added DESTDIR convention and exec option on Makefile #47

Merged
merged 1 commit into from
Oct 7, 2015

Conversation

samuelololol
Copy link
Contributor

I would like to complete the DESTDIR feature and exec option to Makefile

@langston-barrett
Copy link
Collaborator

Sorry, I'm not super familiar with Makefiles. Could you clarify what exactly this does?

@samuelololol
Copy link
Contributor Author

These two features actually are coming from
pote/gpm@f24ee23
pote/gpm@4e0b59a
and I think it will be very helpful when I package them into build files.

To enable DESTDIR feature in Makefile to help user to decided installed location when make install.

Although it is possible to use prefix argument with ./configure to workaround, but it makes more complicated when I trying to sandbox with packaged-gvp(sandbox location is different from prefix value, and I have to find another approach to accomplish this case instead of directly using DESTDIR value.) This is what I suffer now.

Also, $exec helps to avoid name conflicts.

Finally, after using modified Makefile, the command line output will looks like:

$ ./configure --prefix=/test_out
configuring godeps...
prefix=/test_out
>> config.make

$ make DESTDIR=./I_AM_DESTDIR/ exec=haha install
install -d ./I_AM_DESTDIR/test_out/bin
install -m 0755 ./bin/gvp ./I_AM_DESTDIR/test_out/bin/haha

$ tree I_AM_DESTDIR
I_AM_DESTDIR
└── test_out
    └── bin
        └── haha

2 directories, 1 file

@langston-barrett
Copy link
Collaborator

Awesome. I'll test this today, thanks for your submission and explanation!

langston-barrett added a commit that referenced this pull request Oct 7, 2015
Added DESTDIR convention and exec option on Makefile
@langston-barrett langston-barrett merged commit 469db4d into pote:master Oct 7, 2015
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