[plt-scheme] How can I automatically include module dependencies in a makefile?

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sun Oct 15 19:12:03 EDT 2006

At Sun, 15 Oct 2006 17:47:01 -0500, Robby Findler wrote:
> The easiest close thing would be to turn your exe into a shell scripts
> that does mzscheme -qu test-predictions.ss and then have your makefile
> do "mzc -k test-predictions.ss".

Or, roughly the same, if you have

  mzc --exe <exe> <src_1>.ss ... <src_n>.ss

you could run

  mzc --make <src_1>.ss ... <src_n>.ss

and then re-build <exe> when any "compiled/<src_i>.zo" changes.

> You could build that feature, if you wanted to, tho. You'd need to
> first compile the files, and then use read-syntax on the contents of
> the .zo files and then extract a the syntax properties (see the docs on
> 'module-direct-requires and similar) from the module that contains each
> file's dependencies.

You could also use the "cm.ss" library and extract the dependency
information from the ".dep" files that it generates. `mzc --make' is a
thin wrapper around "cm.ss".


Posted on the users mailing list.