Eric Blake wrote:
According to William Pursell on 10/13/2008 1:06 AM:
Thirdly, is there any standard way to take a file
foo.c and generate an autoconfiscated tree structure?
Not that I know of. What tree structure are you proposing?
I suspect that would be a contentious issue. Personally,
I like a recursive build with src/foo.c and tests/foo-test.c.
Maybe starting new projects is rare enough (only occurs
once in the life of a project) that there's no need
for such a script. Also, once a project has grown
to any significant state, automating the conversion
is difficult if not impossible, but there is a *lot*
of resistance to the autotools in general, and it
takes a lot of trial and error and reading before
one realizes that it's fairly easy to start a new
project.
It seems like it would be a good marketing move if
it were easy to start. eg, instead of requiring the
would be project developer to do:
mkdir hello;
cd hello;
mkdir src; mkdir tests;
echo "SUBDIRS = src tests" > Makefile.am
echo bin_PROGRAMS = hello > src/Makefile.am
echo check_PROGRAMS = hello > tests/Makefile.am
echo hello_SOURCES = '$(srcdir)/../src/hello.c' >> tests/Makefile.am
autoscan
mv configure.scan configure.ac
vi configure.ac
etc...
or to write their own script to do this, it would be
fantastic if the developer of a brand new implementation
of "Hello, World!" could write the initial hello.c
file and then use a script developed by those most
knowledgeable about the autotools to generate
a tree.
As I was writing this, I thought that the following
would be handy. My perl is weak, and I'm sure there
is a much terser way to do this:
diff --git a/bin/autoscan.in b/bin/autoscan.in
index 18d9ac1..064d2a3 100644
--- a/bin/autoscan.in
+++ b/bin/autoscan.in
@@ -528,7 +528,15 @@ sub output ($)
"# Process this file with autoconf to produce a configure
script.\n" .
"\n" .
"AC_PREREQ([@VERSION@])\n" .
- "AC_INIT([FULL-PACKAGE-NAME], [VERSION], BUG-REPORT-ADDRESS])\n");
+ "AC_INIT([FULL-PACKAGE-NAME], [VERSION], ");
+ if (defined $ENV{EMAIL})
+ {
+ print $file "[$ENV{EMAIL}])\n";
+ }
+ else
+ {
+ print $file "[BUG-REPORT-ADDRESS])\n";
+ }
if (defined $cfiles[0])
{
print $file "AC_CONFIG_SRCDIR([$cfiles[0]])\n";
--
William Pursell
_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf