Fix for APIVERSNUM / NAME on old VDRs 10736-remake
authorChris Tallon <chris@telescope.org>
Sun, 3 Feb 2013 17:42:16 +0000 (17:42 +0000)
committerChris Tallon <chris@telescope.org>
Sun, 3 Feb 2013 17:42:16 +0000 (17:42 +0000)
Makefile

index feffd1a04e95fe83d49411e1bc4361e1c3d445ea..ef59f33ec60cc6638ad6ea6c226a87b970daedb1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -49,6 +49,11 @@ CXXFLAGS += -fPIC
 ### The version number of VDR's plugin API:
 
 APIVERSION = $(call PKGCFG,apiversion)
+# VOMP INSERT for older VDRs
+ifeq ($(APIVERSION),)
+  APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h)
+endif
+# end VOMP INSERT
 
 ### Allow user defined options to overwrite defaults:
 
@@ -153,7 +158,7 @@ standalonebase:
 
 $(SOFILE): objects
        $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) $(OBJS2) -o $@
-       [ -n "$(DOOLDINSTALL)" ]; then \
+       if [ -n "$(DOOLDINSTALL)" ]; then \
 cp $@ $(LIBDIR)/$@.$(APIVERSION) ; \
 fi