summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAntti Ajanki <antti.ajanki@iki.fi>2010-11-09 22:12:40 +0200
committerAntti Ajanki <antti.ajanki@iki.fi>2010-11-09 22:12:40 +0200
commit81b1adaec7417ba4d92dde8011c19abc308477d1 (patch)
treeccb1c7c656c591d8f4afa82b1f19c2d70007d6cf /Makefile
parent5f68c1fd29c9a6b82c694de7342505ff85c99da2 (diff)
downloadvdr-plugin-webvideo-81b1adaec7417ba4d92dde8011c19abc308477d1.tar.gz
vdr-plugin-webvideo-81b1adaec7417ba4d92dde8011c19abc308477d1.tar.bz2
don't complain about missing $(VDRDIR)/config.h when building the command line tool
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index b438130..f9db74b 100644
--- a/Makefile
+++ b/Makefile
@@ -15,7 +15,7 @@ TMPDIR = /tmp
ARCHIVE = webvideo-$(VERSION)
PACKAGE = vdr-$(ARCHIVE)
-APIVERSION := $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h)
+APIVERSION := $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h 2> /dev/null)
LIBDIR = $(VDRPLUGINDIR)
# Default target compiles everything but does not install anything.
@@ -38,8 +38,13 @@ webvi.conf webvi.plugin.conf: %.conf: examples/%.conf
sed 's_templatepath = /usr/local/share/webvi/templates_templatepath = $(PREFIX)/share/webvi/templates_g' < $< > $@
$(DESTDIR)$(VDRPLUGINDIR)/libvdr-webvideo.so.$(APIVERSION): vdr-plugin
+ifeq ($(APIVERSION),)
+ @echo "No APIVERSION in $(VDRDIR)/config.h"
+ @exit 1
+else
mkdir -p $(DESTDIR)$(VDRPLUGINDIR)
cp -f src/vdr-plugin/libvdr-webvideo.so.$(APIVERSION) $(DESTDIR)$(VDRPLUGINDIR)/libvdr-webvideo.so.$(APIVERSION)
+endif
install-vdr-plugin: $(DESTDIR)$(VDRPLUGINDIR)/libvdr-webvideo.so.$(APIVERSION)
mkdir -p $(DESTDIR)$(VDRLOCALEDIR)