Re: [vdr] Comments on plugin Makefiles

2007-08-18 Thread Stefan Taferner
On Wednesday 15 August 2007 13:07:17 Matthias Schwarzott wrote:
> Hi there!
>
> This time I have some comments on Makefiles for plugins.
> 1. Is there any reason to not allow plain "make" without target to work? It
> would be so easy to move the "all:" target before "%.o: %.c" line.

I have the following lines in my Make.config, this makes what you
want:

.PHONY: all all-redirect
all-redirect: all

And as I copy the Make.config from one version to the next I do not need
to care about the plugins.

Kind regards,
Stefan

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] Comments on plugin Makefiles

2007-08-15 Thread Udo Richter
Matthias Schwarzott wrote:
> This time I have some comments on Makefiles for plugins.
> 1. Is there any reason to not allow plain "make" without target to work? It 
> would be so easy to move the "all:" target before "%.o: %.c" line.

My plugins usually have an early extra target like this to allow a 
simple 'make':

 _default: all

However, the 'all' target doesn't work unless there was one 'make 
plugins' from the VDR folder, because of the include-dir target that all 
plugins also depend on. This could probably be fixed by something like 
make -C ../../.. include-dir, but that would be overkill.



Also, there's another include statement in my makefiles:

 -include $(VDRDIR)/Make.config
 -include Make.config

This allows local plugin-specific config overrides, though the same can 
be achieved in VDR's Make.config with this code:

 ifeq ($(PLUGIN),pluginname)
   # local config goes here
 endif



Cheers,

Udo

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] Comments on plugin Makefiles

2007-08-15 Thread Klaus Schmidinger
On 08/15/07 13:07, Matthias Schwarzott wrote:
> Hi there!
> 
> This time I have some comments on Makefiles for plugins.
> 1. Is there any reason to not allow plain "make" without target to work? It 

No reason.

> would be so easy to move the "all:" target before "%.o: %.c" line.

Well, then let's do it.
I'll change the 'newplugin' script and VDR's own examples accordingly.

> Now when I call make I just get the first .c file compiled. when changing the 
> all target to be the first this will do what is necessary.
> 
> 2. Is it really necessary to have compiling and installing inside the same 
> target? This even gets more annoying with the new i18n target that also 
> spreads all files over my system when hitting "make all".

When compiling a plugin, it is supposed to copy its .so file
to VDR's PLUGINS/lib directory, so that it can be run when
starting VDR from within its source directory. The locale files
are supposed to be in VDR's locale subdirectory for the same
reason.

I set LOCDIR in Make.config to ./locale, so that I can run VDR
from within its source directory. I never actually "install" VDR.

Klaus

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr