Re: [gtk-list] Re: gtk+-971109 released

Jay Painter <> writes:
> On 10 Nov 1997, Raja R Harinath wrote:
> > Jay Painter <> writes:
> > > gtk+-971109 has been released.  Get it a /pub/gtk.
> > 
> > There's a `glib/glibconfig.h' file in the tar.gz -- not nice including
> > an autoconfed file into the source distrib.  Hopefully this was an
> > oversight.
> > 
> > If its there on purpose, and is a hack to make srcdir != builddir work,
> > I think it is a bad solution.
> It is on puropse, it is a hack, and I'll fix it soon.

I try to install packages for both Linux and Solaris, and I handle it by
using the same ${prefix}, but different ${exec_prefix}, and by using
${srcdir} != ${builddir}.

The way I fixed the problems with the build is that wherever there is a with an

	INCLUDES = ${top_srcdir}/glib

I changed it to 

	INCLUDES = ${top_srcdir}/glib ${top_builddir}/glib

I guess it should be a general solution:  whenever you include some dir
in the source tree, include it's corresponding dir in the build tree,
and vice versa.  For eg.

	INCLUDES = . .. ../xyz ${top_srcdir}


	INCLUDES = . ${srcdir} \
                   .. ${srcdir}/.. \
                   ../xyz ${srcdir}/../xyz \
		   ${top_builddir} ${top_srcdir}

for srcdir == builddir, this just becomes doubled `-I's.  Maybe
`automake' should try to do something like this automatically -- or at
least suggest something like this in the docs.

There is however the problem with `make install'.  glib/ has

	include_HEADERS = glib.h glibconfig.h

This has two problems:

1) On the surface: glib.h is in ${srcdir}, and glibconfig.h, since it is
   autoconfed, is in ${builddir}.  the install-HEADERS rule, however,
   searches for the listed files only in ${srcdir}, and fails when it
   doesn't find `glibconfig.h'.  The above hack makes sure there's a
   glibconfig.h in ${srcdir}, but it is the wrong file.  We need the one
   in ${builddir}.

   I solve it by doing a make -k install, and hand-installing the
   `glibconfig.h' file once in a while.

2) There is a deeper problem here.  `glibconfig.h' is an autoconfed
   file, and is rightly generated in ${builddir}.  But, here, we are
   trying to install it into ${installdir}==${prefix}/include.  This 
   violates the general idea:

	${builddir}/... ==> ${exec_prefix}/...
        ${srcdir}/...   ==> ${prefix}/...

   Installing an autoconfed file into ${prefix} will generally be the
   wrong soln. 

   Maybe there should be an ${exec_includedir}==${exec_prefix}/include, 
   where you can put in autoconfed headers.
- Hari
Raja R Harinath ------------------------------
"When all else fails, read the instructions."      -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing."   -- Roy L Ash

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