[clug] Tricky 'make' problem

Hal Ashburner hal.ashburner at gmail.com
Thu Jan 7 01:54:00 MST 2010


Paul Matthews said:
=>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 ?
=>

does solaris make deal with implicit rules? eg something like

%.skl:  %.jcl
        tailor  $^ -o $@


More information about the linux mailing list