[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: top_srcdir and subpackages
From: |
Ralf Wildenhues |
Subject: |
Re: top_srcdir and subpackages |
Date: |
Wed, 7 Sep 2005 09:57:53 +0200 |
User-agent: |
Mutt/1.4.1i |
Hi Harlan,
* Harlan Stenn wrote on Wed, Sep 07, 2005 at 02:12:43AM CEST:
> I have 2 auto* packages, and one subdir (sntp/) is a subpackage of the parent.
>
> I'm using autoconf 2.59 and automake 1.9.6.
>
> I see this:
>
> address@hidden> grep '^top_srcdir' A.pogo/sntp/Makefile
> A.rackety/sntp/Makefile
> A.pogo/sntp/Makefile:top_srcdir = ../../sntp
> A.rackety/sntp/Makefile:top_srcdir = ../../sntp
> address@hidden> grep '^top_srcdir' A.pogo/sntp/libopts/Makefile
> A.rackety/sntp/libopts/Makefile
> A.pogo/sntp/libopts/Makefile:top_srcdir = ../../..
> A.rackety/sntp/libopts/Makefile:top_srcdir = ../../..
> address@hidden>
>
> top_srcdir in the sntp/libopts/ subdir seems Wrong.
Yes, it does. However, I can't reproduce it with the versions you used:
mkdir src src/sub src/subpkg src/subpkg/sub
cd src
echo "SUBDIRS = sub subpkg" > Makefile.am
echo "SUBDIRS = sub" > subpkg/Makefile.am
touch sub/Makefile.am subpkg/sub/Makefile.am
cat >configure.ac <<EOF
AC_INIT([pkg], [1], [nowhere])
AC_CONFIG_SUBDIRS([subpkg])
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_FILES([Makefile sub/Makefile])
AC_OUTPUT
EOF
sed s/pkg/subpkg/ < configure.ac > subpkg/configure.ac
autoreconf -vif
cd ..
mkdir build
cd build
../src/configure
find . -name Makefile | xargs grep \^top_src
gives me:
| ./Makefile:top_srcdir = ../src
| ./sub/Makefile:top_srcdir = ../../src
| ./subpkg/Makefile:top_srcdir = ../../src/subpkg
| ./subpkg/sub/Makefile:top_srcdir = ../../../src/subpkg
So, what's the difference between your setup and my example above?
Cheers,
Ralf