Use Makefiles

If your flow is currently managed by Makefiles, you may perform a conversion of the Makefile into a trace using the utility vovmake.

  • To convert Makefiles to TCL flows use the following command line:
    % vovmake -f Makefile
  • vovmake executes the following steps:
    1. Parse the Makefile with gmake_with_vov_extension to generate a Tcl representation of the dependencies in the Makefile
    2. Use vovbuild to parse the file and to build a flow
    3. Request an update (a retrace, in FlowTracer lingo) of all the jobs thus created

There are limitations to this approach, because not all Makefiles represent a proper flow. The conversion may not be 100% complete. This is not necessarily bad, as an improper flow will not produce predictable results anyway.

Options for vovmake

In addition to a list of Makefile targets, vovmake accepts a set of options to change the conversion process.
Option Description
-help Show the usage.
-clean Cleanup the auxiliary directories and scripts created by vovmake.
-wrapper <WRAPPER> Choose the wrapper to prefix each tool invocation. By default, no wrapper is used, so that runtime tracing is not active on the resulting flow. This means that the default behavior is to use exactly the dependencies specified in the Makefile.
-res <RESOURCES> Resource expression to be used with the jobs in the flow. By default, the resource expression is empty.
vovmake -help
   This is a script used to convert makefiles into FlowTracer flows.
   1. First the makefiles are interpreted by a modified gmake, 
      called gmake_with_vov_extension, which contains some 
      Altair Engineering extension and supports the option -F to dump
      the dependencies into Tcl file.
   2. The resulting Tcl file is then mapped into a flow by means of the 
      script $(VOVDIR)/tcl/vtcl/vovmaketoflow.tcl.

    % vovmake [VOVMAKEOPTIONS] [gmake_options]

   -help                     -- Print this help.
   -clean                    -- Just cleanup the generated files.
   -nocleanup                -- Do not cleanup temporary files
                                (for debugging).
   -gmake <GMAKEBIN>         -- Use specified gmake binary 
                                This must be one with the Altair Engineering
                                Default gmake_with_vov_extension
   -build "options"          -- Options passed to vovbuild, with flow
   -version                  -- Show gmake version and exit
   -wrapper <dfltwrapper>    -- Specify default wrapper for jobs in  
                                flow.  It is passed to vovbuild.
   -run [ft|no]              -- Run Flowtracer to get more information about
                                input makefile. Default is ft.

  % vovmake -help

  % vovmake install      
  % vovmake <SOME_MAKE_TARGET>
  % vovmake -clean

  % vovmake -nocleanup  all
  % vovmake -gmake  ~/bin/my_gmake_with_vov_extension
  % vovmake -wrapper vrt
  % vovmake -build "-env BASE" install

To find the options of vovmaketoflow.tcl, you can use
  % vovbuild -f  $VOVDIR/tcl/vtcl/vovmaketoflow.tcl -- -help

Conversion Examples

Some simple example makefiles are available in $VOVDIR/training/vovmake. The simplest example is called Makefile_1, as shown here:
########## Simple Makefile for training with vovmake

# Experiment 1:   % vovmake all
# Experiment 2:   % vovmake -wrapper vw all

all: dd ee

bb: aa
	cp aa bb

cc: bb
	cp bb cc

dd: cc
	cp cc dd

ee: cc
	cp cc ee
% cp $VOVDIR/training/vovmake/Makefile_1 Makefile
% vovconsole -view graph -set System:nodes &
% touch aa
% vovmake
% vovforget -allnodes
% vovmake -wrapper vw

vovmake Uses GNU gmake with Some Extensions

The vovmake script uses gmake_with_vov_extension to parse the Makefile and dump it into a Tcl script. The program gmake_with_vov_extension is a variant of GNU-make 3.81. In compliance with the GNU license, the source code for gmake_with_vov_extension is included in the distribution in $VOVDIR/src/vmake381_src.tgz.