[Fresco-devel] Re: automake for fresco

Warren Turkal <[email protected]>
Newsgroups gmane.comp.video.fresco.devel
Message-ID <[email protected]>
On Saturday 01 February 2003 09:32 pm, Stefan Seefeld wrote:
> wturkal wrote:
> >>what advantages do you expect from using automake instead
> >>of our current build system ?
> >
> > 1. Ability to build in and out of the source tree without
> > issue (think --disable-sdl and trying to build within the
> > source tree).
>
> hmm, given that the problem stems from a shortcoming in
> autoconf, which is used by automake, too, how does automake
> solve this issue ?

If you configure --disable-sdl, it knows not to even traverse that directory 
with my Makefile.am.

>
> > 2. Makefile.am is smaller than the Makefiles and usually
> > easier to understand. For instance, I have a top level
> > Makefile.am that only has like 20 lines. This includes the
> > logic for conditionally building certain subdirectories via
> > the enable/disable config commands for sdl, ggi, c++ demos,
> > python-runtime, and python-demos.
>
> right, Makefile.am files are more compact than Makefile.in files.
> That is not unexpected, given that the whole idea behind automake
> was to restrict the usage of 'make' to 'normal', i.e. the most

This is simply not true. The purpose of automake was to make a higher level 
description on a package build and use the automake program to "compile" the 
Makefile.am to Makefiles.in. These Makefile.in's are taken by configure to 
produce the Makefiles by doing some text replacement. 

> frequent cases. But it is exactly this inflexibility that let
> me refrain from using it, i.e. I wanted to do things that simply
> weren't possible with automake. But may be you can prove me wrong.

What things are not possible? I just want to take a look at the problems and 
see if I can address them.

> I'm curious to see your Makefile.am files, and to test whether they
> support all we want to be able to do.

My Makefile.am in it's current form, simply configures which packages to 
configure. It is more of a proof of concept at this stage. It is attached 
along with my configure.ac that is required automake capability. These files 
go in the root of the source tree. I am attempting to maintain the separate 
packagabilty of each of the packages under the source root.

>
> > 3. Reuse of the knowledge of the automake people in terms of
> > portability.
>
> In how far is an automake based Makefile (Makefile.am) more portable
> than our current Makefiles ?

You do not distribute Makefile.am's. You distribute Makefile.in's made from 
the Makefile.am's. The configure script deals with turning those into 
standard Makefiles. This is analogous to not distributing configure.ac in the 
source packages but instead distributing the generated configure script that 
is a portable shell script.

>
> > 4. Automatic dependency checking from automake.
>
> dependency of what, from what ?

Files, you don't have to try to homebrew things like header dependencies and 
what not in the make file. For instance, if I specify that a program called 
blah is built from blah.c, icky.c, and nick-nack.y, automake is smart enough 
to find out which other files they depend on to build.

>
> > 5. Parallel build ability without as much work.
>
> I seriously doubt that automake can help us. After all, it's
> a matter to clearly indicating dependencies, nothing more.

See last answer.

>
> > 6. Less work when new packages/binaries/libraries are added.
>
> How so ?

Assuming these packages use autoconf/make they will already conform to the 
patterns needed to use them in the tree.

Warren
-- 
Treasurer, GOLUM, Inc.
http://www.golum.org
configure.ac (text/plain, 3.9 KB)
dnl $Id: configure.ac,v 1.23 2003/01/21 07:45:31 stefan Exp $
dnl
dnl This source file is a part of the Fresco Project.
dnl Copyright (C) 1999, 2000 Stefan Seefeld <[email protected]> 
dnl http://www.fresco.org/
dnl
dnl This library is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Library General Public
dnl License as published by the Free Software Foundation; either
dnl version 2 of the License, or (at your option) any later version.
dnl
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
dnl Library General Public License for more details.
dnl
dnl You should have received a copy of the GNU Library General Public
dnl License along with this library; if not, write to the
dnl Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
dnl MA 02139, USA.
dnl
dnl Process this file with autoconf to produce a configure script.

dnl ------------------------------------------------------------------
dnl Autoconf initialization
dnl ------------------------------------------------------------------

AC_PREREQ(2.52)
AC_REVISION($Revision: 1.23 $)
AC_INIT(Fresco, M1, [email protected])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR(COPYING)
AC_CONFIG_AUX_DIR(config)

echo "The Fresco Windowing System,"
echo "Copyright (c) 2000 The Fresco Project <[email protected]>"
echo 

AC_ARG_ENABLE(ggi,
              AC_HELP_STRING([--enable-ggi],[Configure with ggi support]),
              [enable_ggi="$enableval"],[enable_ggi="yes"])
AC_ARG_ENABLE(sdl,
              AC_HELP_STRING([--enable-sdl],[Configure with sdl support]),
              [enable_sdl="$enableval"],[enable_sdl="yes"])
AC_ARG_ENABLE(c++-demos,
              AC_HELP_STRING([--enable-c++-demos],[Configure c++ demos support]),
              [enable_cxx_demos="$enableval"],[enable_cxx_demos="yes"])
AC_ARG_ENABLE(python-runtime,
              AC_HELP_STRING([--enable-python-runtime],[Configure python runtime support]),
              [enable_python_runtime="$enableval"],[enable_python_runtime="yes"])
AC_ARG_ENABLE(python-demos,
              AC_HELP_STRING([--enable-python-demos],[Configure python demos support]),
              [enable_python_demos="$enableval"],[enable_python_demos="yes"])

AM_CONDITIONAL([ENABLED_GGI],            [test "$enable_ggi" = yes])
AM_CONDITIONAL([ENABLED_SDL],            [test "$enable_sdl" = yes])
AM_CONDITIONAL([ENABLED_CXX_DEMOS],      [test "$enable_cxx_demos" = yes])
AM_CONDITIONAL([ENABLED_PYTHON_RUNTIME], [test "$enable_python_runtime" = yes])
AM_CONDITIONAL([ENABLED_PYTHON_DEMOS],   [test "$enable_demos" = yes])

if test -d $srcdir/Prague; then
  AC_CONFIG_SUBDIRS(Prague)
fi
if test -d $srcdir/Babylon; then
  AC_CONFIG_SUBDIRS(Babylon)
fi
if test -d $srcdir/Fresco-IDL; then
  AC_CONFIG_SUBDIRS(Fresco-IDL)
fi
if test -d $srcdir/Fresco-C++; then
  AC_CONFIG_SUBDIRS(Fresco-C++)
fi
if test -d $srcdir/Berlin; then
  AC_CONFIG_SUBDIRS(Berlin)
fi
if test -d $srcdir/GGI -a ".$enable_ggi" = ".yes"; then
  AC_CONFIG_SUBDIRS(GGI)
fi
if test -d $srcdir/SDL -a ".$enable_sdl" = ".yes"; then
  AC_CONFIG_SUBDIRS(SDL)
fi
if test -d $srcdir/Fresco-Python -a ".$enable_python_runtime" = ".yes"; then
  AC_CONFIG_SUBDIRS(Fresco-Python)
fi
if test -d $srcdir/Fresco-Java -a ".$enable_java_runtime" = ".yes"; then
  AC_CONFIG_SUBDIRS(Fresco-Java)
fi
if test -d $srcdir/Fresco-Perl -a ".$enable_perl_runtime" = ".yes"; then
  AC_CONFIG_SUBDIRS(Fresco-Perl)
fi
if test -d $srcdir/Fresco-C++-demos -a ".$enable_cxx_demos" = ".yes"; then
  AC_CONFIG_SUBDIRS(Fresco-C++-demos)
fi
if test -d $srcdir/Fresco-Python-demos -a ".$enable_python_demos" = ".yes"; then
  AC_CONFIG_SUBDIRS(Fresco-Python-demos)
fi
if test -d $srcdir/Documentation; then
  AC_CONFIG_SUBDIRS(Documentation)
fi
if test -d $srcdir/contrib/daVinci; then
  AC_CONFIG_SUBDIRS(contrib/daVinci)
fi

AC_CONFIG_FILES([Makefile])
dnl AC_CONFIG_FILES([config/synopsis.py])
AC_OUTPUT
Makefile.am (text/x-makefile, 492 B)
REQUIRED = Prague Babylon Fresco-IDL Fresco-C++ Berlin

if ENABLED_GGI
  GGI_BACKEND = GGI
endif
if ENABLED_SDL
  SDL_BACKEND = SDL
endif
if ENABLED_CXX_DEMOS
  CXX_DEMOS = Fresco-C++-demos
endif
if ENABLED_PYTHON_RUNTIME
  PYTHON_RUNTIME = Fresco-Python
endif
if ENABLED_PYTHON_DEMOS
  PYTHON_DEMOS = Fresco-Python-demos
endif

SUBDIRS = $(REQUIRED) $(GGI_BACKEND) $(SDL_BACKEND) $(CXX_DEMOS) \
          $(PYTHON_RUNTIME) $(PYTHON_DEMOS)

ACLOCAL_AMFLAGS = "-I $(srcdir)/config/aclocal.m4"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.