On Mon, Mar 27, 2006 at 02:34:35PM -0500, Robert P. J. Day wrote:
>
> now, from each source file i'm given, i can *calculate* from its
> contents the object files that will be generated so being able to
> loop through the set of source files and generate each rule one at a
> time would be terrific.
>
Don't use "make" to do the loop. Use the shell for this. Use the shell
to generate a "new" Makefile, and included it from you "main"
Makefile. Something like this:
auto.mk : s1.c s2.c ... sN.c
rm -f $@
for i in $+; do
write_rule $i >> $@
done
include auto.mk
Where, obviously, "write_rule" is whatever is required to deduce the
prerequisites for "sX.c" and output the respective Make rule.
Hope this helps
/npat
--
Saw `cout' being shifted "Hello world" times to the left and stopped
right there.
-- Steve Gonedes
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make