[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: request for pkglibexecdir
From: |
Ralf Wildenhues |
Subject: |
Re: request for pkglibexecdir |
Date: |
Wed, 20 Sep 2006 19:09:39 +0200 |
User-agent: |
Mutt/1.5.13 (2006-09-01) |
Hello Eric,
* Eric Blake wrote on Mon, Sep 18, 2006 at 10:04:29PM CEST:
> GNU Coding Standards recommend that packages install their subsidiary
> executables in a subdirectory of $(libexecdir), suggesting $(libexecdir)/
> $(PACKAGE)[1]. CVS m4 wants to use this idiom for installing its libtool
> modules, rather than $(pkglibdir) which is for object code used in linking
> rather than shared libraries for dlopen'ing. It would be nice if automake
> provided $(pkglibexecdir) alongside $(pkglibdir) and friends.
Thanks for the report. OK to install?
Cheers,
Ralf
* lib/am/header-vars.am (pkglibexecdir): New variable.
* automake.in (%standard_prefix): Add it.
* doc/automake.texi (Uniform): Document it.
(Program Sources): Adjust.
* NEWS: Update.
* tests/libexec.test: New test.
* tests/Makefile.am: Update.
Suggested by Eric Blake.
Index: NEWS
===================================================================
RCS file: /cvs/automake/automake/NEWS,v
retrieving revision 1.315
diff -u -r1.315 NEWS
--- NEWS 5 Sep 2006 18:58:16 -0000 1.315
+++ NEWS 20 Sep 2006 17:08:50 -0000
@@ -6,6 +6,8 @@
a package to work correctly. The permissions may have been lost
by work of a patch or version control tool.
+ - New shorthand `$(pkglibexecdir)' for `$(libexecdir)/@PACKAGE@'.
+
New in 1.9b:
* Version requirements:
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1631
diff -u -r1.1631 automake.in
--- automake.in 30 Aug 2006 20:35:56 -0000 1.1631
+++ automake.in 20 Sep 2006 17:08:24 -0000
@@ -240,8 +240,8 @@
map { $_ => 1 } (qw(bin data dataroot dvi exec html include info
lib libexec lisp localstate man man1 man2 man3
man4 man5 man6 man7 man8 man9 oldinclude pdf
- pkgdatadir pkgincludedir pkglibdir ps sbin
- sharedstate sysconf));
+ pkgdatadir pkgincludedir pkglibdir pkglibexecdir
+ ps sbin sharedstate sysconf));
# Copyright on generated Makefile.ins.
my $gen_copyright = "\
Index: doc/automake.texi
===================================================================
RCS file: /cvs/automake/automake/doc/automake.texi,v
retrieving revision 1.150
diff -u -r1.150 automake.texi
--- doc/automake.texi 28 Aug 2006 16:04:24 -0000 1.150
+++ doc/automake.texi 20 Sep 2006 17:08:25 -0000
@@ -1865,13 +1865,15 @@
list of programs that are to be compiled and linked.
@vindex PROGRAMS
address@hidden @code{pkglibdir}, defined
address@hidden @code{pkgincludedir}, defined
@cindex @code{pkgdatadir}, defined
address@hidden @code{pkgincludedir}, defined
address@hidden @code{pkglibdir}, defined
address@hidden @code{pkglibexecdir}, defined
address@hidden pkglibdir
address@hidden pkgincludedir
@vindex pkgdatadir
address@hidden pkgincludedir
address@hidden pkglibdir
address@hidden pkglibexecdir
@cindex @code{PACKAGE}, directory
A different set of names is used to decide where the built objects
@@ -1879,9 +1881,9 @@
indicate which standard directory should be used as the installation
directory. The standard directory names are given in the GNU standards
(@pxref{Directory Variables, , , standards, The GNU Coding Standards}).
-Automake extends this list with @code{pkglibdir}, @code{pkgincludedir},
-and @code{pkgdatadir}; these are the same as the address@hidden
-versions, but with @samp{$(PACKAGE)} appended. For instance,
+Automake extends this list with @code{pkgdatadir}, @code{pkgincludedir},
address@hidden, and @code{pkglibexecdir}; these are the same as the
address@hidden versions, but with @samp{$(PACKAGE)} appended. For instance,
@code{pkglibdir} is defined as @samp{$(libdir)/$(PACKAGE)}.
@cindex @code{EXTRA_}, prepending
@@ -4495,9 +4518,9 @@
In a directory containing source that gets built into a program (as
opposed to a library or a script), the @code{PROGRAMS} primary is used.
Programs can be installed in @code{bindir}, @code{sbindir},
address@hidden, @code{pkglibdir}, or not at all (@code{noinst_}).
-They can also be built only for @samp{make check}, in which case the
-prefix is @samp{check_}.
address@hidden, @code{pkglibdir}, @code{pkglibexecdir}, or not at all
+(@code{noinst_}). They can also be built only for @samp{make check}, in
+which case the prefix is @samp{check_}.
For instance:
Index: lib/am/header-vars.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/header-vars.am,v
retrieving revision 1.50
diff -u -r1.50 header-vars.am
--- lib/am/header-vars.am 30 Jun 2005 11:07:40 -0000 1.50
+++ lib/am/header-vars.am 20 Sep 2006 17:08:25 -0000
@@ -31,8 +31,9 @@
## Some derived variables that have been found to be useful.
pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.609
diff -u -r1.609 Makefile.am
--- tests/Makefile.am 30 Aug 2006 20:35:56 -0000 1.609
+++ tests/Makefile.am 20 Sep 2006 17:08:38 -0000
@@ -298,6 +303,7 @@
lex3.test \
lex4.test \
lex5.test \
+libexec.test \
libobj2.test \
libobj3.test \
libobj4.test \
--- /dev/null 2006-05-22 13:44:12.000000000 +0200
+++ tests/libexec.test 2006-09-20 19:08:29.000000000 +0200
@@ -0,0 +1,41 @@
+#! /bin/sh
+# Copyright (C) 2006 Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# GNU Automake is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Automake; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+# PROGRAMS and LIBRARIES can be installed in (pkg)libexecdir.
+
+. ./defs || exit 1
+
+set -e
+
+cat > Makefile.am << 'END'
+libexec_PROGRAMS = foo
+pkglibexec_PROGRAMS = bar
+END
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_OUTPUT
+END
+
+: > foo.c
+: > bar.c
+
+$ACLOCAL
+$AUTOMAKE