[Fedora-directory-devel] Why is there a Makefile in CVS?

Andrew Bartlett abartlet at samba.org
Tue Mar 13 22:24:12 UTC 2007


On Tue, 2007-03-13 at 16:14 -0600, Richard Megginson wrote:
> Andrew Bartlett wrote:
> > On Tue, 2007-03-13 at 08:09 -0600, Richard Megginson wrote:
> >   
> >> Andrew Bartlett wrote:
> >>     
> >>> <snip>
> >>> It was this bit in Makefile.am that seems odd to me:
> >>>
> >>> # these are for the config files and scripts that we need to generate
> >>> and replace
> >>> # the paths and other tokens with the real values set during
> >>> configure/make
> >>> # note that we cannot just use AC_OUTPUT to do this for us, since it
> >>> will do things like this:
> >>> # LD_LIBRARY_PATH = ${prefix}/lib/fedora-ds
> >>> # i.e. it literally copies in '${prefix}' rather than expanding it out -
> >>> we want this instead:
> >>> # LD_LIBRARY_PATH = /usr/lib/fedora-ds
> >>> if BUNDLE
> >>> fixupcmd = sed \
> >>>         -e 's, at bindir\@,$(bindir),g' \
> >>>         -e 's, at sbindir\@,$(sbindir),g' \
> >>>
> >>>   
> >>>       
> >> It seems odd because it is odd - but there is no other way to replace 
> >> things like @localstatedir@, @sysconfdir@, @sbindir@, etc. in .in files 
> >> that we use during the build.  I don't know how other projects do this - 
> >> perhaps they ignore the "mandated GNU coding standards" and just have 
> >> ${prefix} and ${exec_prefix} expanded during configure, and just let 
> >> AC_CONFIG_FILES and AC_OUTPUT create all of the real files from their 
> >> corresponding .in file.
> >>     
> >
> > I think so.  The coding standard seems to imply that you must be able to
> > change the $prefix and $exec_prefix in the install, but that all
> > internal references must be as if they had *not* been changed.
> So, let me see if I understand what you're saying.  Let's say I have 
> some .in files which have references to @prefix@ and @bindir@ (which is 
> ${prefix}/bin).  I run configure which creates realfile from realfile.in 
> - I don't pass in --prefix to configure, which means @prefix@ will 
> expand to "/usr" and @bindir@ to "/usr/bin" in realfile.  Next, I run 
> make prefix=/myprefix install.  realfile will still refer to "/usr" even 
> though I've told make to use "/myprefix" instead.

Hmm, I was reading the case about 'make install' and not 'make'.  I
think the GNU standards are insane at this point, and I don't know of
any packages or users who need this functionality.
Re-running ./configure isn't a very high price...

> Where does it say or imply that?  Isn't that what "make DESTDIR=/path 
> install" for?

DESTDIR helps, because you don't have to specify a global prefix, which
makes creating RPMs sane.

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
Samba Developer, Red Hat Inc.                  http://redhat.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/fedora-directory-devel/attachments/20070314/05d20e9e/attachment.sig>


More information about the Fedora-directory-devel mailing list