On 29.01.2010 15:19, Paul Menzel wrote:
> Without this patch, if some options in `Makefile` were set outside `Makefile` 
> and no `Make.config` existed with the necessary options, builds could fail. 
> [1][2][3]
> 
> Therefore include strictly necessary options in `Make.global` and include 
> this in all the Makefiles before `Make.config`.
> 
> [1] http://www.linuxtv.org/pipermail/vdr/2009-July/020977.html
> [2] http://www.linuxtv.org/pipermail/vdr/2009-December/021807.html
> [3] http://www.linuxtv.org/pipermail/vdr/2010-January/022235.html
> 
> v2: Use `include` instead of `-include` to get a warning/error if it is not 
> present. [4]
> v3: Change according to Frank’s comments [5].
>  • Delete options set in `Make.global` from other Makefiles.
>  • Leave adding `-fPIC` to `C[XX]FLAGS` in `Make.config.template` as the 
> flags get reset including `Make.config`.
>  • Modify `newplugin`.
> 
> [4] http://www.gnu.org/software/make/manual/make.html#Include
> [5] http://www.linuxtv.org/pipermail/vdr/2010-January/022243.html
> 
> Signed-off-by: Paul Menzel <paulepan...@users.sourceforge.net>
> ...
> --- a/PLUGINS/src/dvbsddevice/Makefile
> +++ b/PLUGINS/src/dvbsddevice/Makefile
> @@ -18,7 +18,11 @@ VERSION = $(shell grep 'static const char \*VERSION *=' 
> $(PLUGIN).c | awk '{ pri
>  ### The C++ compiler and options:
>  
>  CXX      ?= g++
> -CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses
> +CXXFLAGS ?= -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses
> +
> +### Make sure that necessary options are included:
> +
> +include $(VDRDIR)/Make.global
> ...

This fails when doing

  make clean-plugins

make[1]: Entering directory `/home/kls/vdr/VDR/PLUGINS/src/dvbsddevice'
Makefile:25: /Make.global: No such file or directory
make[1]: *** No rule to make target `/Make.global'.  Stop.
make[1]: Leaving directory `/home/kls/vdr/VDR/PLUGINS/src/dvbsddevice'

Apparently $(VDRDIR) is not yet defined at that point.

> ... 
> diff --git a/newplugin b/newplugin
> index 52ef72e..6c9be35 100755
> --- a/newplugin
> +++ b/newplugin
> @@ -77,7 +77,11 @@ VERSION = \$(shell grep 'static const char \\*VERSION *=' 
> \$(PLUGIN).c | awk '{
>  ### The C++ compiler and options:
>  
>  CXX      ?= g++
> -CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses
> +CXXFLAGS ?= -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses
> +
> +### Make sure that necessary options are included:
> +
> +include $(VDRDIR)/Make.global

I assume this last line should read

+include \$(VDRDIR)/Make.global


Please provide a revised (and tested ;-) patch.

Klaus

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

Reply via email to