change make install to be really useful
Commit Message
On Dienstag, 14. August 2007, Artur Skawina wrote:
> Udo Richter wrote:
> > Matthias Schwarzott wrote:
> >> makefile-destdir.diff:
> >> It add variable DESTDIR to makefile to install under $(DESTDIR) instead
> >> of /
> >
> > I would prefer something like DESTDIR=/usr/local that can be redirected
> > to /usr or /tmp/newpackage/usr or similar, just as many configure
> > scripts do it. On the downside, this wouldn't work for
> > $(DESTDIR)$(VIDEODIR).
>
> the usual convention is PREFIX, which defaults to '/usr/local' and can be
> changed to eg '/usr/' or '/sw/vdr-1.6.0' etc.
> DESTDIR is completely independent -- it adds _another_ prefix; this is used
> eg when building packages.
> So "make install DESTDIR=/tmp/BLD-38746 PREFIX=/sw/vdr-1.6.0"
> means to assume the program will be installed in /sw/vdr-1.6.0 (and look
> for config files in /sw/vdr-1.6.0/etc/, binaries in /sw/vdr-1.6.0/bin/
> etc), but to copy all the files to /tmp/BLD-38746/sw/vdr-1.6.0. This way
> you can build a package w/o disturbing the /sw/ tree and install using a
> package manager later.
I updated the patch to use DESTDIR and PREFIX.
Comments on installing header files and Make.config?
Should Make.config go to $PREFIX/share/vdr ?
Matthias
===================================================================
@@ -20,6 +20,7 @@ PREFIX ?= /usr/local
MANDIR = $(PREFIX)/man
BINDIR = $(PREFIX)/bin
LOCDIR = $(PREFIX)/share/vdr/locale
+INCDIR = $(PREFIX)/include
LIBS = -ljpeg -lpthread -ldl -lcap -lfreetype -lfontconfig
INCLUDES = -I/usr/include/freetype2
@@ -160,7 +161,7 @@ clean-plugins:
# Install the files:
-install: install-bin install-i18n install-conf install-doc install-plugins
+install: install-bin install-i18n install-conf install-doc install-plugins install-header
# VDR binary:
@@ -191,6 +192,13 @@ install-plugins: plugins
@mkdir -p $(DESTDIR)$(PLUGINLIBDIR)
@cp --remove-destination $(PLUGINDIR)/lib/lib*-*.so.$(APIVERSION) $(DESTDIR)$(PLUGINLIBDIR)
+# Header files:
+
+install-header:
+ @mkdir -p $(DESTDIR)$(INCDIR)/vdr $(DESTDIR)$(INCDIR)/vdr/libsi
+ @cp *.h Make.config $(DESTDIR)$(INCDIR)/vdr
+ @cp libsi/*.h $(DESTDIR)$(INCDIR)/vdr/libsi
+
# Source documentation:
srcdoc: