Re: [vdr] RFC: Adding CPPFLAGS to Makefile

2013-02-24 Thread Christian Ruppert
On 02/23/13 at 04:28PM +0100, Christopher Reimer wrote:
> Am 23.02.2013 15:40, schrieb Ville Skyttä:
> > On 2013-02-23 14:43, Tobi wrote:
> > 
> >> VDR's Makefile does not use CPPFLAGS (C-Pre-Processor flags) right 
> >> now.
> >> Not a big deal and easy to work-around, but for the sake of providing 
> >> a
> >> "standards-conform" Makefile I suggest adding CPPFLAGS as well.
> > +1 to the general idea.
> > To take it a bit further, I suppose at least DEFINES, CDEFINES,
> > INCLUDES, CINCLUDES could be directly put to CPPFLAGS instead of being
> > defined separately.
> > 
> 
> +1 for Tobi's suggestion and +1 for yours.
> 
> I didn't know that there's something else than CXXFLAGS, CFLAGS and 
> LDFLAGS. The Archlinux build system only provides these three.
> 
> Tobi's patch is minimally invasive (Ready for 2.0), but I'm afraid that 
> your suggestion breaks something (better wait for 2.0+)
> 

+1.

It should be fine as long as VDR does append to the CPPFLAGS and as long as the
"user" does not override those by using e.g. "make CPPFLAGS="..."" instead of
"CPPFLAGS="..." make ...".

-- 
Regards,
Christian Ruppert


pgpWqhoo5Fjm_.pgp
Description: PGP signature
___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] RFC: Adding CPPFLAGS to Makefile

2013-02-23 Thread Christopher Reimer

Am 23.02.2013 15:40, schrieb Ville Skyttä:

On 2013-02-23 14:43, Tobi wrote:

VDR's Makefile does not use CPPFLAGS (C-Pre-Processor flags) right 
now.
Not a big deal and easy to work-around, but for the sake of providing 
a

"standards-conform" Makefile I suggest adding CPPFLAGS as well.

+1 to the general idea.
To take it a bit further, I suppose at least DEFINES, CDEFINES,
INCLUDES, CINCLUDES could be directly put to CPPFLAGS instead of being
defined separately.



+1 for Tobi's suggestion and +1 for yours.

I didn't know that there's something else than CXXFLAGS, CFLAGS and 
LDFLAGS. The Archlinux build system only provides these three.


Tobi's patch is minimally invasive (Ready for 2.0), but I'm afraid that 
your suggestion breaks something (better wait for 2.0+)



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


Re: [vdr] RFC: Adding CPPFLAGS to Makefile

2013-02-23 Thread Ville Skyttä
On 2013-02-23 14:43, Tobi wrote:

> VDR's Makefile does not use CPPFLAGS (C-Pre-Processor flags) right now.
> Not a big deal and easy to work-around, but for the sake of providing a
> "standards-conform" Makefile I suggest adding CPPFLAGS as well.

+1 to the general idea.

To take it a bit further, I suppose at least DEFINES, CDEFINES,
INCLUDES, CINCLUDES could be directly put to CPPFLAGS instead of being
defined separately.

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


[vdr] RFC: Adding CPPFLAGS to Makefile

2013-02-23 Thread Tobi
Hello!

Klaus asked me to put this up for discussion:

At least Debian and Debian derivatives provide standard values for
CFLAGS/CXXFLAGS/LDFLAGS/CPPFLAGS/FFLAGS.

VDR's Makefile does not use CPPFLAGS (C-Pre-Processor flags) right now.
Not a big deal and easy to work-around, but for the sake of providing a
"standards-conform" Makefile I suggest adding CPPFLAGS as well.

Please see the attached patch.

It's only a suggestions and Klaus already indicated that such a change
might not make it into 2.0.0, so please don't panic, that all
plugin-Makefiles must be changed once again :-)

bye,

Tobias

Description: Add CPPFLAGS to Makefiles
Author: Tobias Grimm 

Index: vdr/Makefile
===
--- vdr.orig/Makefile	2013-02-23 08:23:41.0 +0100
+++ vdr/Makefile	2013-02-23 08:27:58.0 +0100
@@ -114,14 +114,14 @@
 # Implicit rules:
 
 %.o: %.c
-	$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
 
 # Dependencies:
 
 MAKEDEP = $(CXX) -MM -MG
 DEPFILE = .dependencies
 $(DEPFILE): Makefile
-	@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
+	@$(MAKEDEP) $(CPPFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
 
 -include $(DEPFILE)
 
@@ -133,7 +133,7 @@
 # The libsi library:
 
 $(SILIB):
-	$(MAKE) --no-print-directory -C $(LSIDIR) CXXFLAGS="$(CXXFLAGS)" DEFINES="$(CDEFINES)" all
+	$(MAKE) --no-print-directory -C $(LSIDIR) CPPFLAGS="$(CPPFLAGS)" CXXFLAGS="$(CXXFLAGS)" DEFINES="$(CDEFINES)" all
 
 # pkg-config file:
 
@@ -213,7 +213,7 @@
 	if ! grep -q "PKGCFG" "$(PLUGINDIR)/src/$$i/Makefile" ; then\
 	   echo "WARNING: plugin $$i is using an old Makefile!";\
 	   oldmakefile="$$oldmakefile $$i";\
-	   $(MAKE) --no-print-directory -C "$(PLUGINDIR)/src/$$i" CFLAGS="$(CFLAGS) $(CDEFINES) $(CINCLUDES)" CXXFLAGS="$(CXXFLAGS) $(CDEFINES) $(CINCLUDES)" LIBDIR="$(PLUGINDIR)/lib" VDRDIR="$(CWD)" all || failed="$$failed $$i";\
+	   $(MAKE) --no-print-directory -C "$(PLUGINDIR)/src/$$i" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS) $(CDEFINES) $(CINCLUDES)" CXXFLAGS="$(CXXFLAGS) $(CDEFINES) $(CINCLUDES)" LIBDIR="$(PLUGINDIR)/lib" VDRDIR="$(CWD)" all || failed="$$failed $$i";\
 	   continue;\
 	   fi;\
 	# New Makefile\
Index: vdr/PLUGINS/src/dvbhddevice/Makefile
===
--- vdr.orig/PLUGINS/src/dvbhddevice/Makefile	2013-02-23 08:23:41.0 +0100
+++ vdr/PLUGINS/src/dvbhddevice/Makefile	2013-02-23 08:27:58.0 +0100
@@ -62,14 +62,14 @@
 ### Implicit rules:
 
 %.o: %.c
-	$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
 
 ### Dependencies:
 
 MAKEDEP = $(CXX) -MM -MG
 DEPFILE = .dependencies
 $(DEPFILE): Makefile
-	@$(MAKEDEP) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
+	@$(MAKEDEP) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
 
 -include $(DEPFILE)
 
Index: vdr/PLUGINS/src/dvbhddevice/libhdffcmd/Makefile
===
--- vdr.orig/PLUGINS/src/dvbhddevice/libhdffcmd/Makefile	2013-02-23 08:23:41.0 +0100
+++ vdr/PLUGINS/src/dvbhddevice/libhdffcmd/Makefile	2013-02-23 08:27:58.0 +0100
@@ -27,14 +27,14 @@
 ### Implicit rules:
 
 %.o: %.c
-	$(CC) $(CFLAGS) -c $(DEFINES) $(INCLUDES) $<
+	$(CC) $(CPPFLAGS) $(CFLAGS) -c $(DEFINES) $(INCLUDES) $<
 
 ### Dependencies:
 
 MAKEDEP = $(CC) -MM -MG
 DEPFILE = .dependencies
 $(DEPFILE): Makefile
-	@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(LIB_OBJS:%.o=%.c) > $@
+	@$(MAKEDEP) $(CPPFLAGS) $(DEFINES) $(INCLUDES) $(LIB_OBJS:%.o=%.c) > $@
 
 -include $(DEPFILE)
 
Index: vdr/PLUGINS/src/dvbsddevice/Makefile
===
--- vdr.orig/PLUGINS/src/dvbsddevice/Makefile	2013-02-23 08:23:41.0 +0100
+++ vdr/PLUGINS/src/dvbsddevice/Makefile	2013-02-23 08:27:58.0 +0100
@@ -61,14 +61,14 @@
 ### Implicit rules:
 
 %.o: %.c
-	$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
 
 ### Dependencies:
 
 MAKEDEP = $(CXX) -MM -MG
 DEPFILE = .dependencies
 $(DEPFILE): Makefile
-	@$(MAKEDEP) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
+	@$(MAKEDEP) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
 
 -include $(DEPFILE)
 
Index: vdr/PLUGINS/src/epgtableid0/Makefile
===
--- vdr.orig/PLUGINS/src/epgtableid0/Makefile	2013-02-23 08:23:41.0 +0100
+++ vdr/PLUGINS/src/epgtableid0/Makefile	2013-02-23 08:27:58.0 +0100
@@ -61,14 +61,14 @@
 ### Implicit rules:
 
 %.o: %.c
-	$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
+	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
 
 ### Dependencies:
 
 MAKEDEP = $(CXX) -MM -MG
 DEPFILE = .dependencies
 $(DEPFILE