help-make
[Top][All Lists]
Advanced

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

Re: how to define generic targets in an OSS-based recursive structure?


From: Robert P. J. Day
Subject: Re: how to define generic targets in an OSS-based recursive structure?
Date: Thu, 13 Jan 2005 08:22:26 -0500 (EST)

  as a followup to my question about how best to define a recursive
make structure involving OSS software, here's what i'm thinking.  for
every different OSS component, i clearly have to define the
component-specific generic targets, such as what it means for PPP to
"clean", "configure", "build" and so on (which will be different from
what it means to do that for the linux kernel, or busybox, or ...).

  i'd like to centralize all that stuff so others can take advantage
of it, so what are my options?

1) define all of that stuff in the single top-level makefile?  gack.
messy as heck, and not available to others.  not even remotely an
option.

2) define separate makefiles for each component -- kernel.mk, ppp.mk,
... -- and include those where i need them.  problem:  if i just do a
straight makefile "include", i can't define each of them with just a
simple "configure" target since they'd clash.  i'd have to define
targets like "kernel-configure:", "ppp-configure:" and so on.  yuck.

3) again, separate makefiles for each component with the standard
targets like "configure", "build" ... but invoke them with "make -f"
and pass them everything they need to change to the appropriate
directory and make that target.

  option 3) seems like the cleanest, and it's the one i'm leaning
towards.  it does add the extra complication that i have to pass
enough info to have that makefile "cd" into the actual source
directory to do the make, but i don't see a way around that.

  thoughts?

rday




reply via email to

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