diff --git a/HISTORY b/HISTORY index 3b231a19..91d66a51 100644 --- a/HISTORY +++ b/HISTORY @@ -1285,3 +1285,14 @@ Video Disk Recorder Revision History See PLUGINS.html, section "Configuration files" for details. - Improved the [eid]syslog() macros, so that the LOG_... macros don't need to be given any more. + +2002-05-17: Version 1.1.3 + +- Improved the VDR Makefile to avoid a warning if the '.dependencies' file does + not exist, and also using $(MAKE) to call recursive makes. +- Changed the name of the 'package' target in the plugin Makefiles to 'dist' + (following the suggestions in the "GNU Make" manual). If you already have started + a plugin project, you may want to change this in your Makefile accordingly. +- Improved the plugin Makefile to avoid a warning if the '.dependencies' file does + not exist, and also using $(shell...) to get the version numbers. If you already have + started a plugin project, you may want to change this in your Makefile accordingly. diff --git a/Makefile b/Makefile index ea201dad..7e675a9f 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ # See the main source file 'vdr.c' for copyright information and # how to reach the author. # -# $Id: Makefile 1.35 2002/05/10 10:24:46 kls Exp $ +# $Id: Makefile 1.36 2002/05/14 21:12:28 kls Exp $ .DELETE_ON_ERROR: @@ -66,7 +66,7 @@ DEPFILE = .dependencies $(DEPFILE): Makefile @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ -include $(DEPFILE) +-include $(DEPFILE) # The main program: @@ -88,7 +88,7 @@ genfontfile: genfontfile.c # The libdtv library: $(DTVLIB) $(DTVDIR)/libdtv.h: - make -C $(DTVDIR) all + $(MAKE) -C $(DTVDIR) all # The 'include' directory (for plugins): @@ -99,10 +99,10 @@ include-dir: # Plugins: plugins: include-dir - @for i in `ls $(PLUGINDIR)/src | grep -v '[^a-z0-9]'`; do make -C "$(PLUGINDIR)/src/$$i" all; done + @for i in `ls $(PLUGINDIR)/src | grep -v '[^a-z0-9]'`; do $(MAKE) -C "$(PLUGINDIR)/src/$$i" all; done plugins-clean: - @for i in `ls $(PLUGINDIR)/src | grep -v '[^a-z0-9]'`; do make -C "$(PLUGINDIR)/src/$$i" clean; done + @for i in `ls $(PLUGINDIR)/src | grep -v '[^a-z0-9]'`; do $(MAKE) -C "$(PLUGINDIR)/src/$$i" clean; done @-rm -f $(PLUGINDIR)/lib/* # Install the files: @@ -119,7 +119,7 @@ install: # Housekeeping: clean: - make -C $(DTVDIR) clean + $(MAKE) -C $(DTVDIR) clean -rm -f $(OBJS) $(DEPFILE) vdr genfontfile genfontfile.o core* *~ -rm -rf include fontclean: diff --git a/PLUGINS.html b/PLUGINS.html index 5098ace6..6caff0e8 100644 --- a/PLUGINS.html +++ b/PLUGINS.html @@ -16,12 +16,15 @@ This document describes the "outside" interface of the plugin system. It handles everything necessary for a plugin to get hooked into the core VDR program and present itself to the user.

-
  +
  Important modifications introduced in version 1.1.1 are marked like this.
-
  +
  Important modifications introduced in version 1.1.2 are marked like this.
+
  +Important modifications introduced in version 1.1.3 are marked like this. +

Quick start

@@ -117,7 +120,7 @@ from the web, it will typically have a name like

and will unpack into a directory named

-
  +
  hello-0.0.1

@@ -125,7 +128,7 @@ To use the plugins and plugins-clean targets from the VDR you need to unpack such an archive into the VDR/PLUGINS/src directory and create a symbolic link with the basic plugin name, as in -
  +
 


ln -s hello-0.0.1 hello

@@ -191,7 +194,7 @@ its memory. You don't need to worry about the details behind all this. If your plugin requires additional source files, simply add them to your plugin's source directory and adjust the Makefile accordingly.

-
  +
  Header files usually contain preprocessor statements that prevent the same file (or rather its contents, to be precise) from being included more than once, like @@ -410,7 +413,7 @@ If a plugin implements a function that runs in the background (presumably in a thread of its own), or wants to make use of internationalization, it needs to implement the function -
  +
 


virtual bool Start(void);

@@ -422,7 +425,7 @@ its task. This may, for instance, be a thread that collects data from the DVB stream, which is later presented to the user via a function that is available from the main menu.

-
  +
  A return value of false indicates that something has gone wrong and the plugin will not be able to perform its task. In that case, the plugin should write a proper error message to the log file. The first plugin that returns @@ -486,7 +489,7 @@ interaction is possible. If a specific action takes longer than a few seconds, the plugin should launch a separate thread to do this. -
  +
 

Housekeeping

Chores, chores...

@@ -533,7 +536,7 @@ previously stored in the global setup data (see below). It shall return true if the parameter was parsed correctly, false in case of an error. If false is returned, an error message will be written to the log file (and program execution will continue). -
  +
  A possible implementation of SetupParse() could look like this:


@@ -588,7 +591,7 @@ needs setup parameters that are not directly user adjustable. It can use SetupStore() and SetupParse() without presenting these parameters to the user. -
  +
 

The Setup menu

Have it your way!

@@ -648,7 +651,7 @@ your setup parameters and use that one to copy all parameters with one single st (like VDR does with its cSetup class).

-
  +
 

Configuration files

I want my own stuff!

@@ -815,16 +818,18 @@ and display their help and/or version information in addition to its own output. If you want to make your plugin available to other VDR users, you'll need to make a package that can be easily distributed. +
  The Makefile that has been created by the call to newplugin -provides the target package, which does this for you. +provides the target dist, which does this for you.

-Simply change into your source directory and execute make package: +Simply change into your source directory and execute make dist:


cd VDR/PLUGINS/src/hello -make package +make dist

+

After this you should find a file named like diff --git a/PLUGINS/src/hello/HISTORY b/PLUGINS/src/hello/HISTORY index 4df316fd..f4cc7431 100644 --- a/PLUGINS/src/hello/HISTORY +++ b/PLUGINS/src/hello/HISTORY @@ -14,3 +14,7 @@ VDR Plugin 'hello' Revision History - Changed return type of cPluginHello::Start(). - Added cPluginHello::Housekeeping(). - Modified package generation. + +2002-05-17: Version 0.0.4 + +- Makefile improvements. diff --git a/PLUGINS/src/hello/Makefile b/PLUGINS/src/hello/Makefile index fbd74508..a6dafc27 100644 --- a/PLUGINS/src/hello/Makefile +++ b/PLUGINS/src/hello/Makefile @@ -1,7 +1,7 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id: Makefile 1.2 2002/05/12 15:09:07 kls Exp $ +# $Id: Makefile 1.3 2002/05/14 21:21:32 kls Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -11,7 +11,7 @@ PLUGIN = hello ### The version number of this plugin (taken from the main source file): -VERSION = `grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g'` +VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g') ### The directory environment: @@ -23,7 +23,7 @@ TMPDIR = /tmp ### The version number of VDR (taken from VDR's "config.h"): -VDRVERSION = `grep 'define VDRVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g'` +VDRVERSION = $(shell grep 'define VDRVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g') ### The name of the distribution archive: @@ -57,7 +57,7 @@ DEPFILE = .dependencies $(DEPFILE): Makefile @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ -include $(DEPFILE) +-include $(DEPFILE) ### Targets: @@ -67,7 +67,7 @@ libvdr-$(PLUGIN).so: $(OBJS) $(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@ @cp $@ $(LIBDIR)/$@.$(VDRVERSION) -package: clean +dist: clean @-rm -rf $(TMPDIR)/$(ARCHIVE) @mkdir $(TMPDIR)/$(ARCHIVE) @cp -a * $(TMPDIR)/$(ARCHIVE) diff --git a/PLUGINS/src/hello/hello.c b/PLUGINS/src/hello/hello.c index 9a6c6e31..50aeeb3c 100644 --- a/PLUGINS/src/hello/hello.c +++ b/PLUGINS/src/hello/hello.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: hello.c 1.4 2002/05/12 10:18:59 kls Exp $ + * $Id: hello.c 1.5 2002/05/14 21:23:25 kls Exp $ */ #include @@ -11,7 +11,7 @@ #include #include "i18n.h" -static const char *VERSION = "0.0.3"; +static const char *VERSION = "0.0.4"; static const char *DESCRIPTION = "A friendly greeting"; static const char *MAINMENUENTRY = "Hello"; diff --git a/config.h b/config.h index cb21745d..8ef6f69a 100644 --- a/config.h +++ b/config.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: config.h 1.116 2002/05/13 16:28:16 kls Exp $ + * $Id: config.h 1.117 2002/05/14 21:21:53 kls Exp $ */ #ifndef __CONFIG_H @@ -19,7 +19,7 @@ #include "eit.h" #include "tools.h" -#define VDRVERSION "1.1.2" +#define VDRVERSION "1.1.3" #define MAXPRIORITY 99 #define MAXLIFETIME 99 diff --git a/newplugin b/newplugin index a30961b6..a207d034 100755 --- a/newplugin +++ b/newplugin @@ -12,7 +12,7 @@ # See the main source file 'vdr.c' for copyright information and # how to reach the author. # -# $Id: newplugin 1.4 2002/05/12 15:02:13 kls Exp $ +# $Id: newplugin 1.5 2002/05/14 21:22:59 kls Exp $ $PLUGIN_NAME = $ARGV[0] || die "Usage: newplugin \n"; @@ -66,7 +66,7 @@ PLUGIN = $PLUGIN_NAME ### The version number of this plugin (taken from the main source file): -VERSION = `grep 'static const char \\*VERSION *=' \$(PLUGIN).c | awk '{ print \$\$6 }' | sed -e 's/[";]//g'` +VERSION = \$(shell grep 'static const char \\*VERSION *=' \$(PLUGIN).c | awk '{ print \$\$6 }' | sed -e 's/[";]//g') ### The directory environment: @@ -78,7 +78,7 @@ TMPDIR = /tmp ### The version number of VDR (taken from VDR's "config.h"): -VDRVERSION = `grep 'define VDRVERSION ' \$(VDRDIR)/config.h | awk '{ print \$\$3 }' | sed -e 's/"//g'` +VDRVERSION = \$(shell grep 'define VDRVERSION ' \$(VDRDIR)/config.h | awk '{ print \$\$3 }' | sed -e 's/"//g') ### The name of the distribution archive: @@ -112,7 +112,7 @@ DEPFILE = .dependencies \$(DEPFILE): Makefile \@\$(MAKEDEP) \$(DEFINES) \$(INCLUDES) \$(OBJS:%.o=%.c) > \$\@ -include \$(DEPFILE) +-include \$(DEPFILE) ### Targets: