Re: gnome developer docs - not sgml



On Mon, Nov 02, 1998 at 05:05:32PM -0500, Jeff Garzik wrote:
> Unfortunately, automake requires both GNU make and GNU CC to do
> dependencies, which is a big hurdle given my preferences.  We discussed
> removing this automake requirement on the automake list a while back;
> basically Autoconf needs to have an AC_MAKEDEPEND macro, and then
> automake can take it from there.

My employer uses autoconf and automake on non-GNU systems. Automake tends
to get surly and want to calculate dependencies using GCC, so we add the
following definitions to our toplevel Makefile.am (be sure to indent this
properly):

  AUTOMAKE_OPTIONS = no-dependencies

  ###### ALTERNATE DEPENDENCY-TRACKING SYSTEM
  # Add an old-style 'make depend' to our generated makefile for use
  # by non-GCC users, who can't use the automatic dependency tracking.
  # We've modified the standard rule a bit so it doesn't need to go at
  # the end of a Makefile.
  depend:
	$(CC) ${CFLAGS} -c -MM *.c >makedep
	cp Makefile Makefile.bak
	echo '/^# DEP_START/+1,/^# DEP_END/-1d' >eddep
	echo '.-1r makedep' >>eddep
	echo 'w' >>eddep
	ed - Makefile < eddep
	rm eddep makedep

  # DEP_START - DO NOT DELETE THIS LINE -- make depend uses it

  # DEP_END - DO NOT DELETE THIS LINE -- make depend uses it

To use regular dependencies, comment out the AUTOMAKE_OPTIONS line and
rerun 'automake -i' and configure. It would certainly be possible to modify
automake and autoconf to deal with multiple ways of generating dependencies
in a more automated fashion than this, but we've never needed to do so.

Cheers,
Eric



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