diff options
Diffstat (limited to 'newplugin')
-rwxr-xr-x | newplugin | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -12,7 +12,7 @@ # See the main source file 'vdr.c' for copyright information and # how to reach the author. # -# $Id: newplugin 2.12 2012/12/21 11:38:09 kls Exp $ +# $Id: newplugin 2.13 2012/12/22 11:54:34 kls Exp $ $PLUGIN_NAME = $ARGV[0] || die "Usage: newplugin <name>\n"; @@ -76,15 +76,15 @@ VERSION = \$(shell grep 'static const char \\*VERSION *=' \$(PLUGIN).c | awk '{ # Use package data if installed...otherwise assume we're under the VDR source directory: PKGCFG = \$(if \$(VDRDIR),\$(shell pkg-config --variable=\$(1) \$(VDRDIR)/vdr.pc),\$(shell pkg-config --variable=\$(1) vdr || pkg-config --variable=\$(1) ../../../vdr.pc)) -LIBDIR ?= \$(call PKGCFG,libdir) -LOCDIR ?= \$(call PKGCFG,locdir) +LIBDIR ?= \$(DESTDIR)\$(call PKGCFG,libdir) +LOCDIR ?= \$(DESTDIR)\$(call PKGCFG,locdir) # TMPDIR ?= /tmp ### The compiler options: -export CFLAGS ?= \$(call PKGCFG,cflags) -export CXXFLAGS ?= \$(call PKGCFG,cxxflags) +export CFLAGS = \$(call PKGCFG,cflags) +export CXXFLAGS = \$(call PKGCFG,cxxflags) ### The version number of VDR's plugin API: @@ -146,8 +146,7 @@ I18Npot = \$(PODIR)/\$(PLUGIN).pot \@touch \$\@ \$(I18Nmsgs): \$(LOCDIR)/%/LC_MESSAGES/vdr-\$(PLUGIN).mo: \$(PODIR)/%.mo - \@mkdir -p \$(dir \$@) - cp \$< \$\@ + install -D -m644 \$< \$\@ .PHONY: i18n i18n: \$(I18Nmo) \$(I18Npot) @@ -160,8 +159,7 @@ install-i18n: \$(I18Nmsgs) \$(CXX) \$(CXXFLAGS) \$(LDFLAGS) -shared \$(OBJS) -o \$\@ install-lib: \$(SOFILE) - \@mkdir -p \$(LIBDIR) - \@cp --remove-destination \$^ \$(LIBDIR)/\$^.\$(APIVERSION) + install -D \$^ \$(LIBDIR)/\$^.\$(APIVERSION) install: install-lib install-i18n |