octave-maintainers
[Top][All Lists]
Advanced

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

Re: Correct compilation note?


From: Rik
Subject: Re: Correct compilation note?
Date: Fri, 15 Jan 2010 12:22:00 -0800

John W. Eaton wrote:
> On 15-Jan-2010, Rik wrote:
>
> | 1/15/10
> | 
> | John,
> | 
> | In src/Makefile.am I find the following note and make rule:
> | 
> | ## We want to force an update of defaults.h and oct-conf.h every
> | ## time make is run because some values may come from the command
> | ## line or the environment.  The substitution rules use move-if-change,
> | ## so this should not cause trouble if the file already exists and the
> | ## newly generated file is not different.
> | 
> | defaults.h: defaults.h.in Makefile
> |     $(do_subst_default_vals)
> | 
> | Is the note left over from the previous build system?  The current rule
> | seems to be just fine, but if we really required an unconditional build
> | then there should be no dependencies after defaults.h.
>
> Should we expect
>
>   configure --prefix=/some/dir
>   
This works just fine as any configure run regenerates the Makefiles from
Makefile.am and trips the Makefile dependency in the rule.
>   make prefix=/some/other/dir
>   
This doesn't work.  The only time this seems to be required is when
doing an install (make prefix=xxx install).  According to the autoconf
manual:

    All these directory variables have values that start with either
    ‘${prefix}’ or ‘${exec_prefix}’ unexpanded. This works fine in
    Makefiles, but it makes these variables hard to use in configure.
    This is mandated by the GNU coding standards, so that the user can
    run ‘make prefix=/foo install’. The Autoconf manual has a section
    with more details on this topic (see Installation Directory
    Variables
    
<http://www.gnu.org/software/autoconf/manual/autoconf.html#Installation-Directory-Variables>).
    See also Hard-Coded Install Paths
    
<http://sources.redhat.com/automake/automake.html#Hard_002dCoded-Install-Paths>.

The section on Installation Directory Variables is a little bit better
at explaining things.  It is still not clear how to fix this though.  I
tried both .PHONY and removing the dependencies so the rule would always
fire and in both cases "make prefix=xxx install" fails.

When it fails the error is

test -z "/home/rik/local5/lib/octave-3.3.50+" || /bin/mkdir -p
"/home/rik/local5/lib/octave-3.3.50+"
 /bin/sh ../libtool   --mode=install /usr/bin/install -c   liboctave.la
'/home/rik/local5/lib/octave-3.3.50+'
libtool: install: error: cannot install `liboctave.la' to a directory
not ending in /home/rik/local3/lib/octave-3.3.50+
make[4]: *** [install-octlibLTLIBRARIES] Error 1

where the build was configured with the prefix as ~/local3 but the make
install was run with a prefix of ~/local5.  Any ideas?

--Rik
> to work?
>
> If so, then any file that collects values from the Makefile would have
> to be built each time make runs, so I guess defaults.h would need to
> be marked as .PHONY, or depend on some nonexistent target like "FORCE".
>
> If not, then I guess we can leave the dependencies and drop the
> comment.
>
> jwe
>   



reply via email to

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