automake
[Top][All Lists]
Advanced

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

Re: How to trigger actions after recursing in directories...


From: Alexandre Duret-Lutz
Subject: Re: How to trigger actions after recursing in directories...
Date: Fri, 22 Feb 2002 17:20:23 +0100
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.1 (i386-debian-linux-gnu)

[Daniel Shane]
| TOP
|  configure, configure.in, Makefile.am,...
|  -projects
|    Makefile.am, ...
|    -app1
|      configure, configure.in, Makefile.am...
|    -app2 
|      configure, configure.in, Makefile.am...
|    -app3
|      configure, configure.in, Makefile.am...
|  -image
|    Makefile.am, ...
|    floppy.img
| 
| How I build is : 
| 
|   *Run configure in app1, app2 and app3 via AC_CONFIG_SUBDIRS(projects/*) in
| the TOP configure.in.
|   *Specify images as the last subdir, so that it gets trigered last
|   *run make... (recursion)
|   *Since the image directory is last, it can assume all the apps where
| compiled successfully.
| 
| However I do not need the image directory. I would like the main Makefile.am
| to say that BUILT_SOURCES is floppy.img, but that this target should get
| executed *after* all the recursion takes place. Just like make dist created
| the tar.gz in the top directory.

Automake's Makefiles recurse directories in the order specified
in SUBDIRS, and process the current directory after all
subdirectories (this can be changed, see SUBDIRS documentation
in the manual).

If you don't want the image/ directory (i.e. create floppy.img
in the top directory) it seems to be you simply want a
Makefile.an like the following at the root of your tree:

: # make everything in projects, then the current directory
: SUBDIRS = projects
: 
: # things to build in the current directory
: noinst_DATA = floppy.img
: floppy.img : your deps
:         how to make floppy.img

I don't think you have to consider BUILT_SOURCES here.  This
variable usually contains files which must be built before
anything else to work around dependency problems.
-- 
Alexandre Duret-Lutz




reply via email to

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