At Thu, 26 Sep 2002 21:25:30 +0900,
I wrote:
> I created a sample package using Libtool, Automake, and Autoconf, then
> I ran `autoreconf -si', `./configure', and `make distcheck'.  I had
> not run `automake'.  I got an error below:

Sorry, this does not happen always.  It happens below:

$ ls -lR
.:
total 20
-rw-rw-r--    1 futoshi  futoshi        24 Sep 25 22:14 Makefile.am
drwxrwxr-x    2 futoshi  futoshi      4096 Sep 26 21:41 config
-rw-rw-r--    1 futoshi  futoshi       222 Sep 26 20:25 configure.in
drwxrwxr-x    2 futoshi  futoshi      4096 Sep 26 21:41 libhello
drwxrwxr-x    2 futoshi  futoshi      4096 Sep 26 21:41 src

./config:
total 0

./libhello:
total 12
-rw-rw-r--    1 futoshi  futoshi        89 Sep 25 22:37 Makefile.am
-rw-rw-r--    1 futoshi  futoshi        78 Sep 25 22:11 hello.h
-rw-rw-r--    1 futoshi  futoshi        77 Sep 25 22:11 libhello.c

./src:
total 8
-rw-rw-r--    1 futoshi  futoshi       132 Sep 25 22:09 Makefile.am
-rw-rw-r--    1 futoshi  futoshi        87 Sep 25 22:18 hello.c

$ cat Makefile.am 
SUBDIRS = libhello src

$ cat configure.in 
AC_INIT([hello], [0.0], [[EMAIL PROTECTED]])
AC_CONFIG_SRCDIR([src/hello.c])
AC_CONFIG_AUX_DIR([config])
AM_INIT_AUTOMAKE([foreign])
AC_PROG_LIBTOOL
AC_CONFIG_FILES([Makefile libhello/Makefile src/Makefile])
AC_OUTPUT
$ cat src/Makefile.am 
bin_PROGRAMS = hello
hello_SOURCES = hello.c
hello_LDADD = -L@top_builddir@/libhello -lhello
hello_CFLAGS = -I@top_srcdir@/libhello

$ cat src/hello.c 
#include <hello.h>

int
main (int argc, char **argv)
{
  print_hello ();
  return 0;
}

$ cat libhello/Makefile.am 
lib_LTLIBRARIES = libhello.la
libhello_la_SOURCES = libhello.c
include_HEADERS = hello.h

$ cat libhello/hello.h 
#ifndef HELLO_H
#define HELLO_H
void print_hello (void);
#endif /* HELLO_H */

$ cat libhello/libhello.c 
#include <stdio.h>
void print_hello (void)
{
  printf ("Hello, World!\n");
}


Thanks

-- 
Nishio Futoshi <[EMAIL PROTECTED]>


Reply via email to