GNU bug report logs - #9289
Feature request: Better 'nobase_' support for nonrecursive build system.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: automake; Severity: wishlist; Reported by: Krzesimir Nowak <krnowak@HIDDEN>; dated Fri, 12 Aug 2011 15:49:02 UTC; Maintainer for automake is bug-automake@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 12 Aug 2011 15:48:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 12 11:48:40 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1QrtyR-0002PW-3O
	for submit <at> debbugs.gnu.org; Fri, 12 Aug 2011 11:48:40 -0400
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <krnowak@HIDDEN>) id 1Qrn9S-000842-Nc
	for submit <at> debbugs.gnu.org; Fri, 12 Aug 2011 04:31:36 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <krnowak@HIDDEN>) id 1Qrn86-0008J2-0q
	for submit <at> debbugs.gnu.org; Fri, 12 Aug 2011 04:30:10 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED,
	RDNS_NONE,TO_NO_BRKTS_NORDNS autolearn=unavailable version=3.3.1
Received: from lists.gnu.org ([140.186.70.17]:47166)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <krnowak@HIDDEN>) id 1Qrn85-0008Ix-VW
	for submit <at> debbugs.gnu.org; Fri, 12 Aug 2011 04:30:09 -0400
Received: from eggs.gnu.org ([140.186.70.92]:37624)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <krnowak@HIDDEN>) id 1Qrn84-0004Lm-Ou
	for bug-automake@HIDDEN; Fri, 12 Aug 2011 04:30:09 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <krnowak@HIDDEN>) id 1Qrn82-0008Gc-KN
	for bug-automake@HIDDEN; Fri, 12 Aug 2011 04:30:08 -0400
Received: from [85.183.48.167] (port=58958 helo=mail.openismus.com)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <krnowak@HIDDEN>) id 1Qrn82-0008E8-8l
	for bug-automake@HIDDEN; Fri, 12 Aug 2011 04:30:06 -0400
Received: from [192.168.0.104] (unknown [85.183.48.167])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.openismus.com (Postfix) with ESMTPSA id 9BD6B1018057
	for <bug-automake@HIDDEN>; Fri, 12 Aug 2011 09:49:48 +0200 (CEST)
Subject: Feature request: Better 'nobase_' support for nonrecursive build
	system.
From: Krzesimir Nowak <krnowak@HIDDEN>
To: bug-automake@HIDDEN
Date: Fri, 12 Aug 2011 09:51:27 +0200
Content-Type: text/plain; charset="UTF-8"
X-Mailer: Evolution 3.0.2 (3.0.2-3.fc15) 
Content-Transfer-Encoding: 7bit
Message-ID: <1313135487.1756.37.camel@krnowak-computer>
Mime-Version: 1.0
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.186.70.17
X-Spam-Score: -6.6 (------)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Fri, 12 Aug 2011 11:48:37 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.6 (------)

Package: automake
Version: 1.11.1

'nobase_' is quite a useful prefix when we want to distribute exact
directory structure like it is in our code repository. But its
usefullness is quite dimnished in case of nonrecursive build system
generated by automake. Lets have a look at the example below:

Our directory structure is as follows:
/
+-foo
  +-bar
  | +-baz
  | | +-1.x
  | | `-2.x
  | `-3.x
  `-4.x

I'd like to put every file under `foo' directory without the `foo'
directory into, say, $(datadir)/qaz. Effectively, our $(datadir)/qaz
structure would look as follows:
$(datadir)/qaz
+-bar
| +-baz
| | +-1.x
| | `-2.x
| `-3.x
`-4.x

With recursive build system it was really simple - just putting
Makefile.am in $(top_srcdir)/foo directory with contents as follows:
list_of_files = bar/baz/1.x bar/baz/2.x bar/3.x 4.x
qazdir = $(datadir)/qaz
nobase_dist_qaz_DATA = $(list_of_files)

In nonrecursive build system, where Makefile in only at $(top_srcdir)
this is not going to work, because there is no such file like
$(top_srcdir)/4.x - it is in foo directory. Also, adding `foo/' prefix
to all elements of list_of_files variable won't work in the way we want,
because foo directory will be put into $(datadir)/qaz.

For now, as a workaround, we have to list all directories and
subdirectories explicitly:
qazdir = $(datadir)/qaz
dist_qaz_DATA = foo/4.x
qaz_bardir = $(datadir)/qaz/bar
dist_qaz_bar_DATA = foo/bar/3.x
qaz_bar_bazdir = $(datadir)/qaz/bar/baz
dist_qaz_bar_baz_DATA = foo/bar/baz/1.x foo/bar/baz/2.x

This can be bit tedious when directory structure is bit more complex -
maybe some kind of script generating a filelist.am with the contents
above could be employed, but it would obscure the build system more.

Another solution would be just using install-{data,exec}-hook.

My proposal would be maybe a special dynamic prefix like
`nobasecut<num>', where `<num>' is a number of directories to strip from
name (just like -p parameter in `patch' utility works) before installing
it in target directory. That way, we could then write in our top-level
Makefile.am:
list_of_files = foo/bar/baz/1.x foo/bar/baz/2.x foo/bar/3.x foo/4.x
qazdir = $(datadir)/qaz
nobasecut1_dist_qaz_DATA = $(list_of_files)

Question is if this is even possible for Automake to deduce from
`nobasecut1' that one level of directories should be stripped and what
additional features of make that would need?

What do you think?





Acknowledgement sent to Krzesimir Nowak <krnowak@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-automake@HIDDEN. Full text available.
Report forwarded to owner <at> debbugs.gnu.org, bug-automake@HIDDEN:
bug#9289; Package automake. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.