dmake

 view release on metacpan or  search on metacpan

man/dmake.nc  view on Meta::CPAN

                   each time the .PHONY attributed prerequisite is made.

       .PRECIOUS   Do  not  remove  associated target under any circumstances.
                   Set by default for any targets  whose  corresponding  files
                   exist in the file system prior to the execution of dmake.

       .PROLOG     Insert  shell  prolog  code  when  executing a group recipe
                   associated with any target having this attribute set.

       .SEQUENTIAL Force a sequential make of the associated target's  prereq-
                   uisites.  If set as a global attribute this implies setting
                   MAXPROCESS=1.

       .SETDIR     Change current working  directory  to  specified  directory
                   when  making  the  associated target.  You must specify the
                   directory at the time the attribute is  specified.   To  do
                   this  simply  give  .SETDIR=path as the attribute.  path is
                   expanded and the result is used as the value of the  direc-
                   tory  to  change to.  If path contains $$@ then the name of
                   the target to be built is used in  computing  the  path  to
                   change  directory  to.   If  path  is  surrounded by single
                   quotes then path is not expanded, and is used literally  as
                   the  directory  name.  If the path contains any `:' charac-
                   ters then the entire attribute string must be quoted  using
                   ".   If  a  target  having  this attribute set also has the
                   .IGNORE attribute set then if the change to  the  specified
                   directory  fails  it  will be ignored, and no error message
                   will be issued.

       .SILENT     Do not echo the recipe lines when making  any  target  with
                   this attribute set, and do not issue any warnings.

       .SWAP       Under  MSDOS  when  making a target with this attribute set
                   swap the dmake executable to disk prior  to  executing  the
                   recipe  line.  Also see the '%' recipe line flag defined in
                   the RECIPES section.

       .SYMBOL     Target is a library member and is an  entry  point  into  a
                   module  in  the  library.  This attribute is used only when
                   searching a library for a  target.   Targets  of  the  form
                   lib((entry)) have this attribute set automatically.

       .USESHELL   Force  each  recipe line of a target to be executed using a
                   shell.   Specifying  this  attribute   is   equivalent   to



Dmake Version 4.12                2008-02-26                                12





DMAKE(1)                                                              DMAKE(1)


                   specifying the '+' character at the start of each line of a
                   non-group recipe.

       .UPDATEALL  Indicates that all the targets  listed  in  this  rule  are
                   updated  by  the  execution  of the accompanying recipe.  A
                   common example is the production of the y.tab.c and y.tab.h
                   files  by  yacc  when  it  is run on a grammar.  Specifying
                   .UPDATEALL in such a rule  prevents  the  running  of  yacc
                   twice,  once  for the y.tab.c file and once for the y.tab.h
                   file.  .UPDATEALL targets that are specified  in  a  single
                   rule  are treated as a single target and all timestamps are
                   updated whenever any target in the set is made.  As a side-
                   effect,  dmake  internally  sorts such targets in ascending
                   alphabetical order and the value of $@ is always the  first
                   target in the sorted set.

       .WINPATH    Switch  between default (POSIX) and Windows style path rep-
                   resentation.  (This attribute is specific for cygwin  dmake
                   executables   and   non-cygwin   environments  ignore  this
                   attribute.)

                   Under Cygwin it can be useful  to  generate  Windows  style
                   paths  (with regular slashes) instead of the default cygwin
                   style  (POSIX)  paths  for  dmake's  dynamic  macros.   The
                   affected  macros  are  $@,  $*,  $>,  $?,  $<,  $&,  $^ and
                   $(MAKEDIR), $(PWD), $(TMD), $(TMPFILE) and the $(mktmp ...)
                   function  macro.   This  feature  can be used to create DOS
                   style path parameters for native W32 programs from  dynamic
                   macros.

                   Note that the Windows style paths use regular slashes ('/')
                   instead of the usual Windows backslash ('\')  as  directory
                   separator  to avoid quoting problems (after all it is still
                   a cygwin dmake!) and cygwin, as  well  as  native  Windows,
                   programs  should  have  no problems using this (c:/foo/bar)
                   path representation.

                   Example: Assuming the current target  to  be  /tmp/mytarget
                   the $@ macro without .WINPATH active expands to:

                          /tmp/mytarget

                   With .WINPATH set it expands to:

                          C:/cygwin/tmp/mytarget

       All  attributes are user setable and except for .UPDATEALL and .MKSARGS
       may be used in one of two forms.  The .MKSARGS attribute is  restricted
       to  use  as a global attribute, and the use of the .UPDATEALL attribute
       is restricted to rules of the second form only.

       ATTRIBUTE_LIST : targets

       assigns the attributes specified by ATTRIBUTE_LIST to  each  target  in
       targets or

       targets ATTRIBUTE_LIST : ...




Dmake Version 4.12                2008-02-26                                13





DMAKE(1)                                                              DMAKE(1)


       assigns  the  attributes  specified by ATTRIBUTE_LIST to each target in
       targets.  In the first form if targets is empty (ie. a NULL list), then

man/dmake.nc  view on Meta::CPAN





DMAKE(1)                                                              DMAKE(1)


       larger  recipe  if additional lines follow the rule definition.  If the
       semi-colon is present but the recipe line is empty  (ie.  null  string)
       then  it  is  taken  to be an empty rule.  Any target so defined causes
       target to be treated as a virtual target, see VIRTUAL TARGETS below.

RECIPES
       The traditional format used by most versions of Make defines the recipe
       lines  as  arbitrary  strings  that may contain macro expansions.  They
       follow a rule definition line and may be spaced  apart  by  comment  or
       blank  lines.   The  list of recipe lines defining the recipe is termi-
       nated by a new target definition, a macro definition,  or  end-of-file.
       Each  recipe  line  MUST  begin  with a <TAB> character (or spaces, see
       .NOTABS) which may optionally be followed with one or all the following
       recipe property characters '@%+-' which affect the recipe execution:

       '-'    indicates  that  non-zero  exit  values  (ie.  errors) are to be
              ignored when this recipe line is executed.

       '+'    indicates that the current recipe line is to be  executed  using
              the shell. Group recipes implicitely ignore this property.

       '%'    indicates that dmake should swap itself out to secondary storage
              (MSDOS only) before running the recipe.

       '@'    indicates that the recipe line should NOT be echoed to the  ter-
              minal prior to being executed.

       '@@'   is  a stronger version of the previous property. The recipe line
              and the output (stdout and stderr) of the  executed  recipe  are
              NOT shown on the terminal.

       Each  property  is  off by default (ie. by default, errors are signifi-
       cant, commands are echoed, no swapping is done and a shell is used only
       if  the  recipe  line  contains  a  character found in the value of the
       SHELLMETAS macro).  Global settings activated via command line  options
       or  special  attribute  or target names may also affect these settings.
       An example recipe:

              target :
                     first recipe line
                     second recipe line, executed independent of first.
                     @a recipe line that is not echoed
                     -and one that has errors ignored
                     %and one that causes dmake to swap out
                     +and one that is executed using a shell.

       The second and new format of the recipe block begins the block with the
       character  '['  (the  open group character) in the last non-white space
       position of a line, and terminates the block  with  the  character  ']'
       (the  close group character) in the first non-white space position of a
       line.  In this form each recipe line need not have a leading TAB.  This
       is called a recipe group.  Groups so defined are fed intact as a single
       unit to a shell for execution whenever the corresponding  target  needs
       to  be  updated.  If the open group character '[' is preceded by one or
       all of the recipe properties (-, %, @ and @@) then they  apply  to  the
       entire  group  in  the same way that they apply to single recipe lines.
       You may also specify '+' but it is redundant  as  a  shell  is  already
       being  used  to  run  the recipe.  See the MAKING TARGETS section for a
       description of how dmake invokes recipes.  Here  is  an  example  of  a



Dmake Version 4.12                2008-02-26                                21





DMAKE(1)                                                              DMAKE(1)


       group recipe:

              target :
              [
                 first recipe line
                 second recipe line
                 tall of these recipe lines are fed to a
                 single copy of a shell for execution.
              ]


BUILTIN COMMANDS
       dmake supports some builtin commands. An optional leading '+' describes
       that the builtin can be used also when being executed in a shell other-
       wise  it  is  only  implemented  when used directly. Remember that if a
       character of the recipe is found in the SHELLMETAS macro the  execution
       of the recipe in a shell is forced.

       [+]noop [something]
              The  noop internal command always returns success if used but it
              is not executed even though the rest of the commandline is eval-
              uated.  This command can be used to evaluate macro expansions at
              the runtime of the recipe without starting a real commmand.

       [+]<empty recipe>
              If an empty recipe line is encountered it is not executed.  This
              sounds  more  trivial than it really is because the recipe could
              consist of macros that evaluated to  empty  or  whitespace  only
              strings.

       echo [-n] data
              This  internal  command prints data (with all leading whitespace
              removed, but otherwise literally) to stdout. If the '-n'  switch
              is given no trailing newline is printed. Note that no quoting is
              removed nor that escape sequences are handled.

       No special treatment of buildin commands for group  recipes  is  imple-
       mented  even  though  the <empty recipe> will most propably also not be
       evaluated by most shells that can be used to handle the recipe  groups.

TEXT DIVERSIONS
       dmake  supports  the  notion of text diversions.  If a recipe line con-
       tains the macro expression



( run in 0.282 second using v1.01-cache-2.11-cpan-0d8aa00de5b )