automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

automake-1.9.6: wrong handling of self-defined directories


From: Adrian Bunk
Subject: automake-1.9.6: wrong handling of self-defined directories
Date: Tue, 2 Aug 2005 20:42:13 +0200
User-agent: Mutt/1.5.9i

I have the following Makefile.am:


<--  snip  -->

secondbindir = $(prefix)/bin2

bin_PROGRAMS = test1
secondbin_PROGRAMS = test2

install-exec-hook:
        cd $(DESTDIR)$(bindir) && ln -fs test1 test11
        cd $(DESTDIR)$(secondbindir) && ln -fs test2 test22

<--  snip  -->


and the following configure.ac:


<--  snip  -->

AC_INIT(test, 1)
AM_INIT_AUTOMAKE([foreign])
AC_PROG_CC
AC_CONFIG_FILES([Makefile])
AC_OUTPUT

<--  snip  -->


test1.c and test2.c are arbitrary C files.

"make install" fails with the following error:


<--  snip  -->

$ 
make[1]: Entering directory `/TMP/test/automake-bug'
test -z "/tmp/ttt/bin" || mkdir -p -- "/tmp/ttt/bin"
  /usr/bin/install -c 'test1' '/tmp/ttt/bin/test1'
make  install-exec-hook
make[2]: Entering directory `/TMP/test/automake-bug'
cd /tmp/ttt/bin && ln -fs test1 test11
cd /tmp/ttt/bin2 && ln -fs test2 test22
/bin/sh: line 0: cd: /tmp/ttt/bin2: No such file or directory
make[2]: *** [install-exec-hook] Error 1
make[2]: Leaving directory `/TMP/test/automake-bug'
make[1]: *** [install-exec-am] Error 2
make[1]: Leaving directory `/TMP/test/automake-bug'
make: *** [install-am] Error 2
$ 

<--  snip  -->


The problem is the following part of Makefile.in:


<--  snip  -->

install-data-am: install-secondbinPROGRAMS

install-exec-am: install-binPROGRAMS
        @$(NORMAL_INSTALL)
        $(MAKE) $(AM_MAKEFLAGS) install-exec-hook

<--  snip  -->


automake knows that secondbin_PROGRAMS contains programs, and it should 
therefore call the install target from install-exec-am.


cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed





reply via email to

[Prev in Thread] Current Thread [Next in Thread]