Help!

I am building an application which uses a couple of external
libraries.  These libraries have their own 'configure' scripts.

In development, I use symbolic links from my application's directory
to the external library's directory, like this:

    projects/
       lib1/
       lib2/
       app/
           Makefile.am       (SUBDIRS = lib1 lib2 src)
           src               (my main source dir)
           lib1 => ../lib1   (symbolic link to ../lib1)
           lib2 => ../lib2   (symbolic link to ../lib2)

automake, autoconf, configure, and make work fine.  My problem is with
'make dist'.  It assumes that '..' points up, which is not true when
the subdir is a symbolic link.  Here's the output of 'make dist':

    for subdir in lib1 lib2 src; do \
      if test "$subdir" = .; then :; else \
        test -d app-1.0/$subdir \
        || mkdir app-1.0/$subdir \
        || exit 1; \
        chmod 777 app-1.0/$subdir; \
        (cd $subdir && make  top_distdir=../app-1.0 distdir=../app-1.0/$subdir 
distdir) \
          || exit 1; \
      fi; \
    done
    make[1]: Entering directory `/home/noel/projects/app/lib1'
    rm -rf ../app-1.0/lib1
    mkdir ../app-1.0/lib1
    mkdir: cannot make directory `../app-1.0/lib1': No such file or directory
    make[1]: *** [distdir] Error 1
    make[1]: Leaving directory `/home/noel/projects/app/lib1'
    make: *** [distdir] Error 1

How about using absolute paths instead of '..', like so: 
    
    here=`pwd`;
    (cd $subdir && make top_distdir=$here/app-1.0 distdir=$here/app-1.0/$subdir 
distdir)

Or, is there a better, officially approved way of doing this?

--Noel


       

Reply via email to