[Top][All Lists]

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

Re: project structure question

From: Ralf Wildenhues
Subject: Re: project structure question
Date: Mon, 9 Jun 2008 19:19:34 +0200
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

* John Calcote wrote on Mon, Jun 09, 2008 at 06:44:06PM CEST:
> projects/
>   flaim/
>     ftk->../ftk
>     src/
>     util/
>   ftk/
>     src/
>     util/
>   xflaim/
>     ftk->../ftk
>     src/
>     util/

> 3. I've considered creating a at the "projects" level, and
> making all three components sub-projects.

That's the way to go.

> This would alleviate the
> problem mentioned with point 2 above, but I don't think there's a way to
> specify the order that such sub-projects are built.

Not sure what you mean.  You projects directory would contain little
more than

AC_INIT([projects], [0.1], [bug-address])
AC_CONFIG_SUBDIRS([ftk flaim xflaim])

SUBDIRS = ftk flaim xflaim

and that SUBDIRS ordering determines the order in which things are

> Additionally, the
> flaim and xflaim sub-projects would still have to somehow refer to the
> ftk directory, which is outside of their individual source trees. They'd
> still have to treat is as a dependency.

What do they need from ftk?  An include path and a library dependency?
Like this?

  FTK_INCLUDE='-I$(top_srcdir)/../ftk -I$(top_builddir)/../ftk'
  FTK_LIBS='-L$(top_builddir)/../ftk -lftk'

Later, when you want ftk to be installable as an independent package in
its own right, you may want to generalize this and write a macro JC_FTK
to produce suitable values of FTK_{INCLUDE,LIB,LTLIB}, AC_SUBSTED, for a
pre-installed or in-tree ftk package.  The macro JC_FTK can live in a
file ftk.m4 which gets used in flaim and xflaim, called in their scripts.

BTW, unless your FTK is already widely known and published, I recommend
using a more descriptive name, and probably at least 4 letters of
abbreviation.  Last I heard TLAs are pretty much used up (for whatever),
and you don't want to start this fight over naming your then-hugely
successful tool kit several years down the road.


reply via email to

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