mirror of
git://git.psyc.eu/libpsyc
synced 2024-08-15 03:19:02 +00:00
got to support both DESTDIR and PREFIX
This commit is contained in:
parent
7ed845c4f2
commit
12080f6071
6 changed files with 19 additions and 15 deletions
|
@ -15,7 +15,8 @@ and you are done.
|
|||
|
||||
Other possible targets include:
|
||||
|
||||
: make install DESTDIR=/usr # install into DESTDIR
|
||||
: make install PREFIX=/usr # install into PREFIX
|
||||
: make install DESTDIR=/tmp/t # install into DESTDIR
|
||||
: make diet # compile with diet libc
|
||||
: make test # compile and run the tests
|
||||
: make doc # generate the API documentation using doxygen
|
||||
|
@ -24,5 +25,5 @@ Other possible targets include:
|
|||
|
||||
On BSD try this:
|
||||
|
||||
: sudo gmake install DESTDIR=/usr/local
|
||||
: sudo gmake install PREFIX=/usr/local
|
||||
|
||||
|
|
19
Makefile
19
Makefile
|
@ -1,6 +1,8 @@
|
|||
.PHONY: doc test bench
|
||||
.NOTPARALLEL: clean
|
||||
|
||||
export PREFIX="$(DESTDIR)/usr"
|
||||
|
||||
indent_args = -nbad -bap -bbo -nbc -br -brs -ncdb -cdw -ce -ci4 -cli0 -cs -d0 -di1 \
|
||||
-nfc1 -nfca -hnl -i4 -ip0 -l80 -lp -npcs -nprs -npsl -saf -sai -saw -nsc -nsob -nss
|
||||
|
||||
|
@ -10,15 +12,18 @@ all:
|
|||
it: all
|
||||
|
||||
destdir:
|
||||
@if test "foo$(DESTDIR)" = "foo" ; then \
|
||||
echo "libpsyc install: You must provide a DESTDIR=/usr or such." ;\
|
||||
exit 2 ;\
|
||||
else true; fi
|
||||
-@if [ ! -w "$(DESTDIR)" ]; then \
|
||||
-@if test "foo$(DESTDIR)" != "foo" ; then \
|
||||
mkdir "$(DESTDIR)" ;\
|
||||
fi
|
||||
@if [ ! -w "$(DESTDIR)" ]; then \
|
||||
echo "libpsyc install: You must provide a writable DESTDIR." ;\
|
||||
@if test "foo$(PREFIX)" = "foo" ; then \
|
||||
echo "libpsyc install: You must provide a PREFIX=/usr or such." ;\
|
||||
exit 2 ;\
|
||||
else true; fi
|
||||
-@if [ ! -w "$(PREFIX)" ]; then \
|
||||
mkdir "$(PREFIX)" ;\
|
||||
fi
|
||||
@if [ ! -w "$(PREFIX)" ]; then \
|
||||
echo "libpsyc install: You must provide a writable PREFIX." ;\
|
||||
exit 2 ;\
|
||||
else true; fi
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
includedir = ${DESTDIR}/include/d
|
||||
includedir = ${PREFIX}/include/d
|
||||
|
||||
INSTALL = install
|
||||
HEADERS = common.d parse.d
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
includedir = ${DESTDIR}/include
|
||||
includedir = ${PREFIX}/include
|
||||
|
||||
INSTALL = install
|
||||
HEADERS = psyc.h
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
# Why do we have a Makefile in the include directory?
|
||||
|
||||
includedir = ${DESTDIR}/include
|
||||
includedir = ${PREFIX}/include
|
||||
|
||||
INSTALL = install
|
||||
HEADERS = match.h method.h packet.h parse.h render.h text.h uniform.h variable.h
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
libdir = ${DESTDIR}/lib
|
||||
libdir = ${PREFIX}/lib
|
||||
|
||||
INSTALL = install
|
||||
LIBS = libpsyc.a libpsyc.so
|
||||
|
|
Loading…
Reference in a new issue