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

Define install and uninstall targets #94

Merged
merged 1 commit into from
Feb 17, 2024

Conversation

TomChapple
Copy link
Contributor

The make install command is pretty useful for Linux machines to ensure that the built executable is available on the PATH directory, so this pull request aims to add the install and uninstall targets to support this.

I have attempted to adhere to the Makefile Conventions as closely as possible (excluding those unnecessary for this project) which includes defaulting the installation to /usr/local/gearsystem and allowing this to be customisable with DESTDIR and prefix (e.g. make install prefix="/app/bin" to install the application to /app/bin/gearsystem).

The most notable use of this is to make automated packaging systems (such as flatpak-builder) much cleaner as they will only need to specify make install with appropriate arguments.

I have included these targets in a separate file—Makefile.install—as they are not applicable to every operating system; mostly just to Linux. I'm happy to add it to others if they are applicable, I'm just not that familiar with them.

These targets are useful for moving the Gearsystem executable into a
directory located on PATH. These targets aim to adhere to [Makefile
Conventions][1], but have stripped those features that are unnecessary,
given the only output is a single executable.

This has been defined in a separate includable Makefile as these targets
tend to be only applicable to Linux builds. Other distributions may
include this as well if it is applicable.

[1]: <https://www.gnu.org/software/make/manual/make.html#Makefile-Conventions>
@drhelius
Copy link
Owner

Thanks!

@drhelius drhelius merged commit 0fda589 into drhelius:master Feb 17, 2024
7 checks passed
@TomChapple TomChapple deleted the make-install branch February 17, 2024 07:57
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