[clug] Tricky 'make' problem

Paul Matthews plm at netspace.net.au
Thu Jan 7 01:40:34 MST 2010


Trying to do something (potentially) tricky with make. And some advice
is required. The first trickiness is that it is not gnu-make, but the
more brain dead solaris 10 make.

There is a step in the build processes that will read in one file and
output an unknown number of output files. For some files there will be
one output file, for others two, all the way up to 36 output files
(potentially).
 
    file.in -> generate -> file1.skl
                        -> file2.skl

That would be all well and good, except that each .skl file requires one
more stage of file tailoring before they are finished.

    file1.skl -> tailor -> file1.jcl
    file2.skl -> tailor -> file2.jcl

In the Makefile the first step is easy

    # Will make all the file*.skl files
    skeletons:
        generate file.in

But how to tell make to loop over all the .skl files, tailoring each on
in turn ?

-- 
Fools ignore complexity. Pragmatists suffer it.
Some can avoid it. Geniuses remove it.



More information about the linux mailing list