Skip to content

Commit

Permalink
Add comments to the Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Antiz96 committed Apr 13, 2024
1 parent 9e4eb3e commit 79c26ee
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,27 @@ PREFIX ?= /usr/local
all:

install:
# Install the main script
install -Dm 755 "src/script/${pkgname}.sh" "${DESTDIR}${PREFIX}/bin/${pkgname}"


# Archive and install man pages
gzip -c "doc/man/${pkgname}.1" > "${pkgname}.1.gz"
install -Dm 644 "${pkgname}.1.gz" "${DESTDIR}${PREFIX}/share/man/man1/${pkgname}.1.gz"
rm -f "${pkgname}.1.gz"


# Install documentation
install -Dm 644 README.md "${DESTDIR}${PREFIX}/share/doc/${pkgname}/README.md"

uninstall:
# Delete the main script
rm -f "${DESTDIR}${PREFIX}/bin/${pkgname}"

# Delete man pages
rm -f "${DESTDIR}${PREFIX}/share/man/man1/${pkgname}.1.gz"

# Delete documentation
rm -rf "${DESTDIR}${PREFIX}/share/doc/${pkgname}/"

test:
# Run the help function of the main script as a simple test
"src/script/${pkgname}.sh" --help

0 comments on commit 79c26ee

Please sign in to comment.