Hello,
Attached is a patch so VDR does not error during the installation if the man directories do not exist. Also, this patch installs the plugins as well as the vdr binary when "make install" is used.
Best Regards, C.Y.M.
C.Y.M wrote:
Hello,
Attached is a patch so VDR does not error during the installation if the man directories do not exist. Also, this patch installs the plugins as well as the vdr binary when "make install" is used.
I'd say the attached reduced version should suffice, since 'mkdir -p' behaves nicely if the directory already exists, so there's no need to check this first.
Klaus
--- Makefile 2005/07/31 11:20:20 1.76 +++ Makefile 2005/08/14 11:42:20 @@ -183,11 +183,16 @@ # Install the files:
install: + @mkdir -p $(BINDIR) @cp vdr runvdr $(BINDIR) + @mkdir -p $(BINDIR)/$(PLUGINLIBDIR) + @cp $(PLUGINLIBDIR)/* $(BINDIR)/$(PLUGINLIBDIR) + @mkdir -p $(MANDIR)/man1 + @mkdir -p $(MANDIR)/man5 @gzip -c vdr.1 > $(MANDIR)/man1/vdr.1.gz @gzip -c vdr.5 > $(MANDIR)/man5/vdr.5.gz @if [ ! -d $(VIDEODIR) ]; then\ - mkdir $(VIDEODIR);\ + mkdir -p $(VIDEODIR);\ cp *.conf $(VIDEODIR);\ fi
Klaus Schmidinger wrote:
C.Y.M wrote:
Hello,
Attached is a patch so VDR does not error during the installation if the man directories do not exist. Also, this patch installs the plugins as well as the vdr binary when "make install" is used.
I'd say the attached reduced version should suffice, since 'mkdir -p' behaves nicely if the directory already exists, so there's no need to check this first.
Looks good. Thanks.
Best Regards.
C.Y.M wrote:
Attached is a patch so VDR does not error during the installation if the man directories do not exist. Also, this patch installs the plugins as well as the vdr binary when "make install" is used.
The PLUGINLIBDIR stuff doesnt work well in practice. First, changing PLUGINLIBDIR to anything but $PLUGINDIR/lib wont work, because most plugins compile into $PLUGINDIR/src/$PLUGIN/../../lib.
Second, the default plugin install location would be /usr/local/bin/PLUGINS/lib - not very elegant. I use (and suggest) /usr/local/lib/vdr, and thats not even a sub-folder of /usr/local/bin.
My suggestions: - $PLUGINDIR/lib should be hard-coded as compile destination, because plugin makefiles depend on it anyway. - As a consequence, plugins-clean should not use $PLUGINLIBDIR, but $PLUGINDIR/lib for cleaning. - Install should copy from $PLUGINDIR/lib to $PLUGINLIBDIR, provide they're not the same. (They are as default) - Keep $PLUGINLIBDIR as default for -L as it is.
Its a matter of taste whether the default for $PLUGINLIBDIR should continue to be ./PLUGINS/lib (compatibility!) or /usr/local/lib/vdr or similar.
Cheers,
Udo
Udo Richter wrote:
C.Y.M wrote:
Attached is a patch so VDR does not error during the installation if the man directories do not exist. Also, this patch installs the plugins as well as the vdr binary when "make install" is used.
The PLUGINLIBDIR stuff doesnt work well in practice. First, changing PLUGINLIBDIR to anything but $PLUGINDIR/lib wont work, because most plugins compile into $PLUGINDIR/src/$PLUGIN/../../lib.
Second, the default plugin install location would be /usr/local/bin/PLUGINS/lib - not very elegant. I use (and suggest) /usr/local/lib/vdr, and thats not even a sub-folder of /usr/local/bin.
My suggestions:
- $PLUGINDIR/lib should be hard-coded as compile destination, because
plugin makefiles depend on it anyway.
- As a consequence, plugins-clean should not use $PLUGINLIBDIR, but
$PLUGINDIR/lib for cleaning.
- Install should copy from $PLUGINDIR/lib to $PLUGINLIBDIR, provide
they're not the same. (They are as default)
- Keep $PLUGINLIBDIR as default for -L as it is.
Its a matter of taste whether the default for $PLUGINLIBDIR should continue to be ./PLUGINS/lib (compatibility!) or /usr/local/lib/vdr or similar.
How about we introduce LIBDIR and change the following line:
@cp $(PLUGINLIBDIR)/* $(BINDIR)/$(PLUGINLIBDIR)/
to
@cp $(PLUGINLIBDIR)/* $(LIBDIR)/
C.Y.M wrote:
How about we introduce LIBDIR and change the following line:
@cp $(PLUGINLIBDIR)/* $(BINDIR)/$(PLUGINLIBDIR)/
to
@cp $(PLUGINLIBDIR)/* $(LIBDIR)/
Too confusing. Plus, plugin makefiles do have a LIBDIR that can be overruled by Make.config.
PLUGINLIBDIR is currently used only at two (!) places: (1) make plugins-clean cleans that folder (2) Via -DPLUGINDIR and #define DEFAULTPLUGINDIR, this is the default for the -L parameter.
As explained, the use for plugins-clean is imho wrong, so this is currently only a bad way to set the default path. Using this also as the install destination sounds good to me.
Cheers,
Udo