Added DESTDIR and PREFIX handling to the Makefile

This commit is contained in:
Klaus Schmidinger 2007-08-15 13:49:27 +02:00
parent a551b5b124
commit 1acc20266e
3 changed files with 24 additions and 17 deletions

View File

@ -2088,6 +2088,7 @@ Matthias Schwarzott <zzam@gentoo.org>
for improving i18n-to-gettext.pl for improving i18n-to-gettext.pl
for suggesting to move the "all" target in plugin Makefiles before the for suggesting to move the "all" target in plugin Makefiles before the
"Implicit rules", so that a plain "make" will compile everything "Implicit rules", so that a plain "make" will compile everything
for adding DESTDIR and PREFIX handling to the Makefile
Martin Ostermann <martin@familie-ostermann.de> Martin Ostermann <martin@familie-ostermann.de>
for fixing processing the PDCDescriptor in 'libsi' on big endian systems for fixing processing the PDCDescriptor in 'libsi' on big endian systems

View File

@ -5356,3 +5356,5 @@ Video Disk Recorder Revision History
so that a plain "make" will compile everything (suggested by Matthias so that a plain "make" will compile everything (suggested by Matthias
Schwarzott). The "newplugin" script has been changed accordingly. Schwarzott). The "newplugin" script has been changed accordingly.
Plugin authors may want to change their Makefiles, too. Plugin authors may want to change their Makefiles, too.
- Added DESTDIR and PREFIX handling to the Makefile (thanks to Matthias
Schwarzott).

View File

@ -4,7 +4,7 @@
# See the main source file 'vdr.c' for copyright information and # See the main source file 'vdr.c' for copyright information and
# how to reach the author. # how to reach the author.
# #
# $Id: Makefile 1.103 2007/08/12 20:36:34 kls Exp $ # $Id: Makefile 1.104 2007/08/15 13:47:16 kls Exp $
.DELETE_ON_ERROR: .DELETE_ON_ERROR:
@ -15,9 +15,11 @@ CXX ?= g++
CXXFLAGS ?= -g -O2 -Wall -Woverloaded-virtual CXXFLAGS ?= -g -O2 -Wall -Woverloaded-virtual
LSIDIR = ./libsi LSIDIR = ./libsi
MANDIR = /usr/local/man DESTDIR ?=
BINDIR = /usr/local/bin PREFIX ?= /usr/local
LOCDIR = /usr/share/vdr/locale MANDIR = $(PREFIX)/share/man
BINDIR = $(PREFIX)/bin
LOCDIR = $(PREFIX)/share/vdr/locale
LIBS = -ljpeg -lpthread -ldl -lcap -lfreetype -lfontconfig LIBS = -ljpeg -lpthread -ldl -lcap -lfreetype -lfontconfig
INCLUDES = -I/usr/include/freetype2 INCLUDES = -I/usr/include/freetype2
@ -25,6 +27,7 @@ PLUGINDIR= ./PLUGINS
PLUGINLIBDIR= $(PLUGINDIR)/lib PLUGINLIBDIR= $(PLUGINDIR)/lib
VIDEODIR = /video VIDEODIR = /video
CONFDIR ?= $(VIDEODIR)
DOXYGEN = /usr/bin/doxygen DOXYGEN = /usr/bin/doxygen
DOXYFILE = Doxyfile DOXYFILE = Doxyfile
@ -123,8 +126,8 @@ i18n: $(I18Nmo)
done done
install-i18n: install-i18n:
@mkdir -p $(LOCDIR) @mkdir -p $(DESTDIR)$(LOCDIR)
@(cd $(LOCALEDIR); cp -r --parents * $(LOCDIR)) @(cd $(LOCALEDIR); cp -r --parents * $(DESTDIR)$(LOCDIR))
# The 'include' directory (for plugins): # The 'include' directory (for plugins):
@ -162,30 +165,31 @@ install: install-bin install-conf install-doc install-plugins install-i18n
# VDR binary: # VDR binary:
install-bin: vdr install-bin: vdr
@mkdir -p $(BINDIR) @mkdir -p $(DESTDIR)$(BINDIR)
@cp --remove-destination vdr runvdr $(BINDIR) @cp --remove-destination vdr runvdr svdrpsend.pl $(DESTDIR)$(BINDIR)
# Configuration files: # Configuration files:
install-conf: install-conf:
@if [ ! -d $(VIDEODIR) ]; then\ @mkdir -p $(DESTDIR)$(VIDEODIR)
mkdir -p $(VIDEODIR);\ @if [ ! -d $(DESTDIR)$(CONFDIR) ]; then\
cp *.conf $(VIDEODIR);\ mkdir -p $(DESTDIR)$(CONFDIR);\
cp *.conf $(DESTDIR)$(CONFDIR);\
fi fi
# Documentation: # Documentation:
install-doc: install-doc:
@mkdir -p $(MANDIR)/man1 @mkdir -p $(DESTDIR)$(MANDIR)/man1
@mkdir -p $(MANDIR)/man5 @mkdir -p $(DESTDIR)$(MANDIR)/man5
@gzip -c vdr.1 > $(MANDIR)/man1/vdr.1.gz @gzip -c vdr.1 > $(DESTDIR)$(MANDIR)/man1/vdr.1.gz
@gzip -c vdr.5 > $(MANDIR)/man5/vdr.5.gz @gzip -c vdr.5 > $(DESTDIR)$(MANDIR)/man5/vdr.5.gz
# Plugins: # Plugins:
install-plugins: plugins install-plugins: plugins
@mkdir -p $(PLUGINLIBDIR) @mkdir -p $(DESTDIR)$(PLUGINLIBDIR)
@cp --remove-destination $(PLUGINDIR)/lib/lib*-*.so.$(APIVERSION) $(PLUGINLIBDIR) @cp --remove-destination $(PLUGINDIR)/lib/lib*-*.so.$(APIVERSION) $(DESTDIR)$(PLUGINLIBDIR)
# Source documentation: # Source documentation: