mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Plugin Makefiles now use DESTDIR and the 'install' program
This commit is contained in:
16
newplugin
16
newplugin
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user