Skip to content

Update Makefile to use $PREFIX #49

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ CFLAGS := -std=c99 -Wall -pedantic -Wextra -Werror ${CFLAGS}
LDLIBS = -ljansson
INSTALL=install
DESTDIR?=/
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While at it, it might be good to make DESTDIR default to empty. Otherwise you wind up with paths beginning with // which at best is ugly, and at worst breaks on some platforms (Cygwin).

MANDIR=$(DESTDIR)/usr/share/man/man1/
TARGET_PATH=$(DESTDIR)/usr/bin
PREFIX?=/usr/local
MANDIR=$(DESTDIR)$(PREFIX)/share/man/man1/
TARGET_PATH=$(DESTDIR)$(PREFIX)/bin
DISTFILES=jshon
MANFILE=jshon.1
ZSHSRC=jshon_zsh_completion
ZSHCOMP=$(DESTDIR)/usr/share/zsh/site-functions/_pbpst
ZSHCOMP=$(DESTDIR)$(PREFIX)/share/zsh/site-functions/_pbpst

#VERSION=$(shell date +%Y%m%d)
VERSION=$(shell git show -s --format="%ci" HEAD | cut -d ' ' -f 1 | tr -d '-')
Expand Down