mirror of
git://git.psyc.eu/libpsyc
synced 2024-08-15 03:19:02 +00:00
support make install DESTDIR=...
This commit is contained in:
parent
651d5f1d27
commit
7ed845c4f2
6 changed files with 27 additions and 17 deletions
13
INSTALL.org
13
INSTALL.org
|
@ -15,13 +15,14 @@ and you are done.
|
|||
|
||||
Other possible targets include:
|
||||
|
||||
: make install [prefix=/usr] # install into prefix
|
||||
: make diet # compile with diet libc
|
||||
: make test # compile and run the tests
|
||||
: make doc # generate the API documentation (will be put in the doc folder)
|
||||
: make help # display the possible targets
|
||||
: make install DESTDIR=/usr # install into DESTDIR
|
||||
: make diet # compile with diet libc
|
||||
: make test # compile and run the tests
|
||||
: make doc # generate the API documentation using doxygen
|
||||
# (will be put in the doc folder)
|
||||
: make help # display the possible targets
|
||||
|
||||
On BSD try this:
|
||||
|
||||
: sudo gmake install prefix=/usr/local
|
||||
: sudo gmake install DESTDIR=/usr/local
|
||||
|
||||
|
|
19
Makefile
19
Makefile
|
@ -9,15 +9,28 @@ 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 \
|
||||
mkdir "$(DESTDIR)" ;\
|
||||
fi
|
||||
@if [ ! -w "$(DESTDIR)" ]; then \
|
||||
echo "libpsyc install: You must provide a writable DESTDIR." ;\
|
||||
exit 2 ;\
|
||||
else true; fi
|
||||
|
||||
install: install-lib install-inc install-d
|
||||
|
||||
install-lib: all
|
||||
install-lib: destdir all
|
||||
${MAKE} -C lib install
|
||||
|
||||
install-inc: all
|
||||
install-inc: destdir all
|
||||
${MAKE} -C include install
|
||||
|
||||
install-d: all
|
||||
install-d: destdir all
|
||||
${MAKE} -C d install
|
||||
|
||||
debug:
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
prefix = /usr
|
||||
includedir = ${prefix}/include/d
|
||||
includedir = ${DESTDIR}/include/d
|
||||
|
||||
INSTALL = install
|
||||
HEADERS = common.d parse.d
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
prefix = /usr
|
||||
includedir = ${prefix}/include
|
||||
includedir = ${DESTDIR}/include
|
||||
|
||||
INSTALL = install
|
||||
HEADERS = psyc.h
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# Why do we have a Makefile in the include directory?
|
||||
|
||||
prefix = /usr
|
||||
includedir = ${prefix}/include
|
||||
includedir = ${DESTDIR}/include
|
||||
|
||||
INSTALL = install
|
||||
HEADERS = match.h method.h packet.h parse.h render.h text.h uniform.h variable.h
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
prefix = /usr
|
||||
libdir = ${prefix}/lib
|
||||
libdir = ${DESTDIR}/lib
|
||||
|
||||
INSTALL = install
|
||||
LIBS = libpsyc.a libpsyc.so
|
||||
|
|
Loading…
Reference in a new issue