[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
make dist, hierarchical projects, and automake -ac
From: |
Niels Möller |
Subject: |
make dist, hierarchical projects, and automake -ac |
Date: |
17 Mar 2004 10:04:49 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
I'm using automake-1.8.2 and autoconf-2.59.
I have a tree of several automake projects. It basically looks like
this:
lsh/configure.ac
lsh/Makefile.am
src/Makefile.am
src/argp/configure.ac
src/argp/Makefile.am
src/nettle/configure.ac
src/nettle/Makefile.am
Each Makefile.am lists the subdirectories in SUBDIRS. The idea is that
I should be able to (cd src/argp && make dist) or (cd src/nettle &&
make dist) to create separate distribution tarballs of nettle and
argp.
I also let automake install common files, like depcomp and install-sh.
I do this with automake -ac (symlinks are useless when I access the
source tree via NFS from machines with no automake installation).
However, this doesn't quite work. The problem is that
src/argp/Makefile.in is created with references to the parent
directory, like
DIST_COMMON = $(am__configure_deps) $(noinst_HEADERS) \
$(srcdir)/../../depcomp $(srcdir)/../../install-sh \
$(srcdir)/../../missing $(srcdir)/../../mkinstalldirs \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/config.h.in $(top_srcdir)/configure ChangeLog TODO \
mempcpy.c strcasecmp.c strchrnul.c strndup.c vsnprintf.c
depcomp = $(SHELL) $(top_srcdir)/../../depcomp
^^^^^
I've seen sligtly different variants too, the above refers to files
in the top-level lsh directory, I've also seen
DIST_COMMON = $(am__configure_deps) $(noinst_HEADERS) \
$(srcdir)/../depcomp $(srcdir)/../install-sh \
$(srcdir)/../missing $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/configure ChangeLog TODO mempcpy.c strcasecmp.c \
strchrnul.c strndup.c vsnprintf.c
depcomp = $(SHELL) $(top_srcdir)/../depcomp
which refers to files in the lsh/src directory.
An argp distribution made with this Makefile.in (for example by cd
src/argp && make dist) obviously won't work.
I can reproduce the problem as follows:
1. Make a fresh checkout of lsh
cvs -d :pserver:address@hidden:/cvsroot/lsh co lsh
2. Run automake at toplevel,
cd lsh
aclocal && autoconf && autoheader && automake -ac
3. Run automake in the argp sub directory,
cd src/argp
aclocal && autoconf && autoheader && automake -ac
Now, src/argp/Makefile.in is broken, as described above. Also, no
copies of depcomp, missing, install-sh etc are created in the src/argp
directory.
4. After some more steps to create makefiles and lsh-specific symlinks
(./.bootstrap && ./configure at top-level), I can try
cd src/argp && make distcheck
I get errors from make distcheck, although it's not obvious that they
are caused by the broken Makefile.in:
ERROR: files left in build directory after distclean:
./depcomp
./install-sh
./missing
The complete list of depcomp files in the tree at this stage is
lsh/depcomp
lsh/src/depcomp
lsh/src/argp/argp-standalone-1.3/_build/depcomp
lsh/src/argp/depcomp
I'm not sure which of these copies should exists, or exactly when in
step 4 they were created. I would imagine that depcomp, and other
missing files, are only ever installed in directories where there
exists a configure.ac (i.e. the first and the last place on the above
list).
It seems to work better if I use automake -a instead of automake -ac,
but that shouldn't matter.
Regards,
/Niels
- make dist, hierarchical projects, and automake -ac,
Niels Möller <=