%% "Massonnier Laurent" <[EMAIL PROTECTED]> writes: ml> Thank you, for your quickness and accuracy. I've understood I ml> can't use these kind of variables to accurately define my ml> prerequisites. Ok.
ml> But, please, have you got an idea about how I could change my ml> makefile so as to dynamically load the prerequisites of a target ml> from another file, (whose name depends on the target name) ? Not ml> speaking about writing the makefile, but about the best mechanics ml> to do it ? There are two ways. First, you can use include files. If you include a file that contains the prerequisites, and create a rule so make knows how to build that file, then make will rebuild it whenever it's out of date then automatically re-exec itself to read in the new file. You can see an example of this method in the GNU make manual, section "Generating Prerequisites Automatically". Second, if you're willing to require GNU make 3.80 or above you can use the $(eval ...) function to generate prerequisites. Finally, if what you're trying to do is keep .h etc. files up to date, you should look at my web site below, which describes an advanced method used by automake (but you can use it without automake) that might be better for this specific job than either of the above. -- ------------------------------------------------------------------------------- Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at: http://www.gnu.org http://make.paulandlesley.org "Please remain calm...I may be mad, but I am a professional." --Mad Scientist _______________________________________________ Help-make mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/help-make
