Re: dist target and bin_SCRIPTS

2003-09-26 Thread Alexandre Duret-Lutz
>>> "Magnus" == Magnus Therning <[EMAIL PROTECTED]> writes:

 Magnus> Sorry if this has been brought up before.
 Magnus> This behaviour is a bit odd to me:

 Magnus> bin_SCRIPTS = my_script

 Magnus> will not get 'my_script' included in the
 Magnus> dist-tarball. 

This is expected.  If instead you use 

  dist_bin_SCRIPTS = my_scripts 

it will be distributed.

 Magnus> I couldn't find this behaviour documented anywhere, 

Let's fix this.  I'm checking this in.

2003-09-26  Alexandre Duret-Lutz  <[EMAIL PROTECTED]>

* doc/automake.texi (Scripts): Update the example about automake.
Mention `dist_' for distributed scripts.

Index: doc/automake.texi
===
RCS file: /cvs/automake/automake/doc/automake.texi,v
retrieving revision 1.3
diff -u -r1.3 automake.texi
--- doc/automake.texi   24 Sep 2003 21:11:24 -  1.3
+++ doc/automake.texi   26 Sep 2003 17:29:53 -
@@ -3961,16 +3961,34 @@
 Automake does not assume that scripts are derived objects; such objects
 must be deleted by hand (@pxref{Clean}).
 
-The @code{automake} program itself is a Perl script that is generated at
-configure time from @file{automake.in}.  Here is how this is handled:
+The @code{automake} program itself is a Perl script that is generated
+from @file{automake.in}.  Here is how this is handled:
 
 @example
 bin_SCRIPTS = automake
+CLEANFILES = $(bin_SCRIPTS)
+
+do_subst = sed -e 's,[@@]datadir[@@],$(datadir),g' \
+-e 's,[@@]PERL[@@],$(PERL),g' \
+-e 's,[@@]PACKAGE[@@],$(PACKAGE),g' \
+-e 's,[@@]VERSION[@@],$(VERSION),g' \
+@dots{}
+
+automake: automake.in Makefile
+$(do_subst) < $(srcdir)/automake.in > automake
+chmod +x automake
 @end example
 
-Since @code{automake} appears in the @code{AC_OUTPUT} macro, a target
-for it is automatically generated, and it is also automatically cleaned
-(despite the fact it's a script).
+Because---as we have just seen---scripts can be built, they are not
+distributed by default.  Scripts that should be distributed can be
+specified using a @code{dist_} prefix as in other primaries.  For
+instance the following @file{Makefile.am} declares that
[EMAIL PROTECTED] should be distributed and installed in
[EMAIL PROTECTED](sbindir)}.
+
[EMAIL PROTECTED]
+dist_sbin_SCRIPTS = my_script
[EMAIL PROTECTED] example
 
 @cindex SCRIPTS, installation directories
 @cindex Installing scripts
-- 
Alexandre Duret-Lutz





dist target and bin_SCRIPTS

2003-09-25 Thread Magnus Therning
Sorry if this has been brought up before.

This behaviour is a bit odd to me:

bin_SCRIPTS = my_script

will not get 'my_script' included in the dist-tarball. I needed to add a

EXTRA_DIST = my_script

as well. I couldn't find this behaviour documented anywhere, and a quick
search on Google didn't turn up anything either (might be due to my
search skills).

automake version:
automake (GNU automake) 1.7.7
Written by Tom Tromey <[EMAIL PROTECTED]>.

Copyright 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

autoconf version:
autoconf (GNU Autoconf) 2.57
Written by David J. MacKenzie and Akim Demaille.

Copyright 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

A simple example that shows the behaviour:

autoconf.ac:
AC_INIT(test, 0)
AC_CONFIG_SRCDIR(my_script)
AM_INIT_AUTOMAKE
 
dnl Create the files
AC_CONFIG_FILES([Makefile])
AC_OUTPUT

Makefile.am:
bin_SCRIPTS = my_script

$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c

config.status: creating Makefile
$ make distcheck

configure: error: cannot find sources (my_script) in ..
make: *** [distcheck] Error 1

/M

-- 
Magnus Therning  mailto:[EMAIL PROTECTED]
+31-40-2745179  http://pww.innersource.philips.com/magnus/
OpenPGP:0x4FBB2C40

I'd doubt that it represents a threat to anything but the notion that you can
sell bad code by refusing to let anyone see what's in the box.
 -- Amy Wohl on Linux and Open Source


signature.asc
Description: Digital signature