home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- # dodiff: Directory tree maintainer (v1.1)
- #
- # DMAKE 3.7 PATCH #2
- # ------------------
- # Priority: Medium
- #
- # Prerequisite: dmake 3.7 patch level 1 full distribution.
- #
- # Location: You can obtain a copy of the patch from watmsg.uwaterloo.edu
- # via anonymous ftp from the directory pub/dmake. The file is
- # dmake37-patch2.Z. The patch is also submitted for posting
- # to comp.sources.misc.
- #
- # Application: Change directory to the source directory containing the
- # dmake sources and run the patch through /bin/sh. It constructs
- # any required subdirectories and applies the patch program as
- # needed to apply patches to files. If you obtain the patch
- # files from a news group then you must first build the patch
- # source by running all parts of the patch through unshar or
- # /bin/sh.
- #
- # Acknowledgment: Thanks to everyone who wrote with suggestions or bug fixes.
- # In most cases your fixes and/or suggestions were
- # incorporated into the sources. Your continued input makes
- # dmake a better tool.
- #
- #
- # DETAILS OF FIXES:
- # -----------------
- # - Fixed a bug in function.c. If you used a $(shell ...) macro in a line
- # which got expanded from within the input buffer Buffer (eg. in a rule
- # definition) nasty things could happen since _exec_shell re-used Buffer
- # when it shouldn't have.
- #
- # - Made sure that -v and -n flags do not take effect across a $(shell ...)
- # macro expansion. This ensures that $(shell ...) recipes are always
- # executed when the macro is expanded and never contain noise from a -v
- # flag. Dunno how I missed this the first time around.
- #
- # - Fixed a bug that set Current_target to NULL when making successive recipe
- # lines individually. This meant that temp files were being deleted late,
- # possibly from the wrong places, and hence not deleted at all.
- #
- # - Fixed several inference bugs. Nothing too major:
- #
- # 1. a recipe of the form
- # %.foo:
- # @[
- # stuff ...
- # ]
- # didn't get the group recipe attribute attached to the %.foo node
- # so when the inference algorithm was run it failed to attach the
- # correct attribute to go along with the new recipe.
- #
- # 2. Inference algorithm now marks for REMOVAL, ALL intermediate nodes
- # (it did this before too -- but by luck), and marks ALL nodes as
- # TARGETS, and all but the first node as being INFERRED. I doubt
- # that anyone will notice these changes. I had to have a really
- # screwy makefile to find the bug.
- #
- # - Fixed $(shell ...) macro so that it can be nested to arbitrary depths.
- # It uses a single temporary file for the purpose and keeps reusing it for
- # each nested instance. Works like a charm.
- #
- # - Fixed bug in rulparse.c where an attribute flag variable was of type
- # int and not t_attr as it should be. This caused problems on 16-bit
- # machines (reported by lots of people).
- #
- # - Fixed a bug reported by paul@halserv2.hal.com, dmake.c line 373, would
- # dereference a NULL pointer if the hash table didn't contain an entry.
- #
- # - Fixed a bug reported by paul@halserv2.hal.com, rulparse.c line 949
- # would dereference a NULL pointer if it tried to match a certain sequence
- # of %-meta rules.
- #
- # - Fixed a bug reported by paul@halserv2.hal.com, make.c, the SET_TOKEN
- # call was getting called with a NULL pointer.
- #
- # - Minor tweaks to the OS/2 scripts as reported by Frank Waley. Should make
- # MSC compiles work now.
- #
- # - Changed sysvr4/stdarg.h to ensure that va_dcl is defined.
- #
- # - Modified man page. The diffs would have been bigger than the source so
- # I just included new copies.
- #
- #
- #
- # DETAILS OF ADDITIONS/CHANGES:
- # -----------------------------
- # - Added a sysvr3/pwd directory along with getcwd.c. The reason for this
- # addition is to hopefully eliminate once and for all the annoying
- # "lost a child" bug. If you see this bug appear then remake dmake with
- #
- # make sysvr3pwd
- # or make xenixpwd
- #
- # Both create a version of dmake that uses a local version of getcwd rather
- # than the C-library version. Thanks to Gwyn Dyer for providing the code
- # to getcwd.c. I used his version as it compiled on a xenix machine and
- # seemed to be the more widely used one. Thanks to all that sent me copies
- # of it. I hope this gets rid of the lost child issue once and for all.
- #
- # - The MSDOS version now behaves identically to the UNIX versions when
- # running recipes containing embedded cd calls. I changed dmake to restore
- # the directory it was in prior to invoking a child process.
- #
- # The following recipe will now behave identically under UNIX and DOS
- #
- # all:
- # cd foo; make ...
- # cd fee; make ...
- #
- # Previously to this change, the DOS version of DMAKE would have been in
- # the foo directory after the first line of the recipe, and would not
- # find fee.
- #
- # - Added the -B flag. This is in response to several requests at supporting
- # spaces in front of recipe lines. This does not come without a price.
- # By default the flag is off and tabs are required to start recipe lines
- # unless it is a group recipe. If you turn the flag on, either through
- # supplying -B on the command line or by putting ".NOTABS := y" in the
- # makefile then when dmake scans non-group recipes they are terminated at
- # the first line that is only white space or contains no leading white space
- # and is either a macro definition or a rule definition.
- #
- # Consider the following makefile:
- #
- # all:
- # <tab> echo hi there
- # <space>echo e:test
- # <tab> echo hello
- #
- # By default the recipe for all is simply: "echo hi there", and the remaining
- # two lines are parsed as a new rule definition with the associated recipe
- # being "echo hello". If you supply -B, then the recipe for 'all' is all
- # three lines above, since the second recipe line now begins with a space.
- #
- # If you change the makefile to contain:
- #
- # all:
- # <tab> echo hi there
- #
- # <space>echo e:test
- # <tab> echo hi there
- #
- # then the -B flag has no visible effect. The makefile is parsed the
- # same in both cases as the first recipe is terminated by the empty line.
- # or a valid recipe rule.
- #
- # If you now change the makefile to contain:
- #
- # all:
- # <tab> echo hi there
- #
- # <tab> echo e:test
- # <tab> echo hi there
- #
- # then by default all three lines form the recipe for 'all'.
- # Specifying -B terminates the first recipe after the first line and begins
- # a new rule definition with the line "echo e:test".
- #
- # In summary:
- # By default: (no -B) a recipe is terminated by a line containing some
- # text that does not begin with a <tab>.
- #
- # Specify -B: A recipe is terminated by a line that is only white space
- # or by a line containg text that contains NO leading
- # white space.
- #
- # You can use the .NOTABS macro to set/reset this behaviour at will from
- # within a makefile. See the man page.
- #
- # - Added OSRELEASE=coherent targets and directories to support Coherent
- # systems. Patches provided by David Fenyes (dfenyes@thesis1.med.uth.tmc.edu).
- #
- # - Added OSRELEASE=msdos OSENVIRONMENT=ztcdos targets and directories to
- # support making of dmake using Zortech C++ 2.1. Patches provided by
- # David Engel (ods@utdallas.edu).
- #
- # Remove Obsolete files from distribution
-
- # Now use a shar archive to add any new files to the distribution
- # This is a shell archive (produced by shar 3.49)
- # To extract the files from this archive, save it to a file, remove
- # everything above the "!/bin/sh" line above, and type "sh file_name".
- #
- # made 06/28/1991 13:27 UTC by dvadura@watdragon
- # Source directory /u2/dvadura/src/generic/dmake/src
- #
- # existing files will NOT be overwritten unless -c is specified
- #
- # This shar contains:
- # length mode name
- # ------ ---------- ------------------------------------------
- # 125864 -rw-r----- man/dmake.p
- # 98450 -r--r----- man/dmake.tf
- # 1976 -r--r----- msdos/ztcdos/config.h
- # 1990 -rw-r----- msdos/ztcdos/config.mk
- # 473 -r--r----- msdos/ztcdos/environ.c
- # 1 -rw-r----- msdos/ztcdos/lib.rsp
- # 1 -rw-r----- msdos/ztcdos/libswp.rsp
- # 3232 -rw-r----- msdos/ztcdos/mk.bat
- # 3235 -rw-r----- msdos/ztcdos/mkswp.bat
- # 614 -rw-r----- msdos/ztcdos/obj.rsp
- # 626 -rw-r----- msdos/ztcdos/objswp.rsp
- # 5417 -rw-r----- msdos/ztcdos/public.h
- # 3861 -rw-r----- msdos/ztcdos/startup.mk
- # 1738 -r--r----- msdos/ztcdos/tempnam.c
- # 1940 -r--r--r-- unix/coherent/config.h
- # 765 -rw-r--r-- unix/coherent/config.mk
- # 306 -r--r--r-- unix/coherent/getcwd.c
- # 2405 -rw-r--r-- unix/coherent/make.sh
- # 5318 -rw-r----- unix/coherent/public.h
- # 3221 -rw-r--r-- unix/coherent/startup.mk
- # 469 -r--r--r-- unix/coherent/stdarg.h
- # 346 -r--r--r-- unix/coherent/stdlib.h
- # 133 -r--r--r-- unix/coherent/time.h
- # 4312 -r--r--r-- unix/coherent/vfprintf.c
- # 559 -rw-r----- unix/sysvr3/pwd/config.mk
- # 5834 -r--r----- unix/sysvr3/pwd/getcwd.c
- # 2739 -rw-r----- unix/sysvr3/pwd/make.sh
- # 5318 -rw-r----- unix/sysvr3/pwd/public.h
- # 3221 -rw-r----- unix/sysvr3/pwd/startup.mk
- #
- # ============= man/dmake.p ==============
- if test ! -d 'man'; then
- echo 'x - creating directory man'
- mkdir 'man'
- fi
- if test -f 'man/dmake.p' -a X != X; then
- echo 'x - skipping man/dmake.p (File already exists)'
- else
- echo 'x - extracting man/dmake.p (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'man/dmake.p' &&
- X
- X
- X
- X
- DMAKE(p) Unsupported Free Software DMAKE(p)
- X
- X
- X
- NNAAMMEE
- X ddmmaakkee - maintain program groups, or interdependent files
- X
- SSYYNNOOPPSSIISS
- X ddmmaakkee [-ABceEhiknpqrsStTuVx] [-v{dfimt}] [-P#] [-{f|C|K}
- X file] [macro[*][+][:]=_v_a_l_u_e ...] [target ...]
- X
- DDEESSCCRRIIPPTTIIOONN
- X ddmmaakkee executes commands found in an external file called a
- X _m_a_k_e_f_i_l_e to update one or more target names. Each target
- X may depend on zero or more prerequisite targets. If any of
- X the target's prerequisites is newer than the target or if
- X the target itself does not exist, then ddmmaakkee will attempt to
- X make the target.
- X
- X If no --ff command line option is present then ddmmaakkee searches
- X for an existing _m_a_k_e_f_i_l_e from the list of prerequisites
- X specified for the special target _._M_A_K_E_F_I_L_E_S (see the STARTUP
- X section for more details). If "-" is the name of the file
- X specified to the --ff flag then ddmmaakkee uses standard input as
- X the source of the makefile text.
- X
- X Any macro definitions (arguments with embedded "=" signs)
- X that appear on the command line are processed first and
- X supersede definitions for macros of the same name found
- X within the makefile. In general it is impossible for defin-
- X itions found inside the makefile to redefine a macro defined
- X on the command line, see the MACROS section for an excep-
- X tion.
- X
- X If no _t_a_r_g_e_t names are specified on the command line, then
- X ddmmaakkee uses the first non-special target found in the
- X makefile as the default target. See the SSPPEECCIIAALL TTAARRGGEETTSS
- X section for the list of special targets and their function.
- X ddmmaakkee is a re-implementation of the UNIX Make utility with
- X significant enhancements. Makefiles written for most previ-
- X ous versions of _M_a_k_e will be handled correctly by ddmmaakkee..
- X Known differences between ddmmaakkee and other versions of make
- X are discussed in the CCOOMMPPAATTIIBBIILLIITTYY section found at the end
- X of this document.
- X
- OOPPTTIIOONNSS
- X --AA Enable AUGMAKE special inference rule transformations
- X (see the "PERCENT(%) RULES" section), these are set to
- X off by default.
- X
- X --BB Enable the use of spaces instead of <tabs> to begin
- X recipe lines. This flag equivalent to the .NOTABS spe-
- X cial macro and is further described below.
- X
- X --cc Use non-standard comment stripping. If you specify --cc
- X then ddmmaakkee will treat any ## character as a start of
- X
- X
- X
- Version 3.70 UW 1
- X
- X
- X
- X
- DMAKE(p) Unsupported Free Software DMAKE(p)
- X
- X
- X
- X comment character wherever it may appear unless it is
- X escaped by a \.
- X
- X --CC [[++]]ffiillee
- X This option writes to _f_i_l_e a copy of standard output
- X and standard error from any child processes and from
- X the ddmmaakkee process itself. If you specify a ++ prior to
- X the file name then the text is appended to the previous
- X contents of _f_i_l_e. This option is active in the MSDOS
- X implementation only and is ignored by non-MSDOS ver-
- X sions of ddmmaakkee..
- X
- X --ee Read the environment and define all strings of the form
- X 'EENNVV--VVAARR=_e_v_a_l_u_e' defined within as macros whose name is
- X EENNVV--VVAARR, and whose value is '_e_v_a_l_u_e'. The environment
- X is processed prior to processing the user specified
- X makefile thereby allowing definitions in the makefile
- X to override definitions in the environment.
- X
- X --EE Same as -e, except that the environment is processed
- X after the user specified makefile has been processed
- X (thus definitions in the environment override defini-
- X tions in the makefile). The -e and -E options are
- X mutually exclusive. If both are given the latter takes
- X effect.
- X
- X --ff ffiillee
- X Use ffiillee as the source for the makefile text. Only one
- X --ff option is allowed.
- X
- X --hh Print the command summary for ddmmaakkee.
- X
- X --ii Tells ddmmaakkee to ignore errors, and continue making other
- X targets. This is equivalent to the .IGNORE attribute
- X or macro.
- X
- X --KK ffiillee
- X Turns on ..KKEEEEPP__SSTTAATTEE state tracking and tells ddmmaakkee to
- X use _f_i_l_e as the state file.
- X
- X --kk Causes ddmmaakkee to ignore errors caused by command execu-
- X tion and to make all targets not depending on targets
- X that could not be made. Ordinarily ddmmaakkee stops after a
- X command returns a non-zero status, specifying --kk causes
- X ddmmaakkee to ignore the error and continue to make as much
- X as possible.
- X
- X --nn Causes ddmmaakkee to print out what it would have executed,
- X but does not actually execute the commands. A special
- X check is made for the string "$(MAKE)" inside a recipe
- X line, if found, the line is expanded and invoked,
- X thereby enabling recursive makes to give a full
- X
- X
- X
- Version 3.70 UW 2
- X
- X
- X
- X
- DMAKE(p) Unsupported Free Software DMAKE(p)
- X
- X
- X
- X description of all that they will do. The check for
- X "$(MAKE)" is disabled inside group recipes.
- X
- X --pp Print out a version of the digested makefile in human
- X readable form. (useful for debugging, but cannot be
- X re-read by ddmmaakkee)
- X
- X --PP## On systems that support multi-processing cause ddmmaakkee to
- X use _# concurrent child processes to make targets. See
- X the "MULTI PROCESSING" section for more information.
- X
- X --qq Check and see if the target is up to date. Exits with
- X code 0 if up to date, 1 otherwise.
- X
- X --rr Tells ddmmaakkee not to read the initial startup makefile,
- X see STARTUP section for more details.
- X
- X --ss Tells ddmmaakkee to do all its work silently and not echo
- X the commands it is executing to stdout (also suppresses
- X warnings). This is equivalent to the .SILENT attri-
- X bute or macro.
- X
- X --SS Force sequential execution of recipes on architectures
- X which support concurrent makes. For backward compati-
- X bility with old makefiles that have nasty side-effect
- X prerequisite dependencies.
- X
- X --tt Causes ddmmaakkee to touch the targets and bring them up to
- X date without executing any commands.
- X
- X --TT Tells ddmmaakkee to not perform transitive closure on the
- X inference graph.
- X
- X --uu Force an unconditional update. (ie. do everything that
- X would be done if everything that a target depended on
- X was out of date)
- X
- X --vv[[ddffiimmtt]]
- X Verbose flag, when making targets print to stdout what
- X we are going to make and what we think its time stamp
- X is. The optional flags [[ddffiimmtt]] can be used to restrict
- X the information that is displayed. In the absence of
- X any optional flags all are assumed to be given (ie. --vv
- X is equivalent to --vvddffiimmtt). The meanings of the
- X optional flags are:
- X
- X dd Notify of change directory operations only.
- X
- X ff Notify of file I/O operations only.
- X
- X ii Notify of inference algorithm operation only.
- X
- X
- X
- X
- Version 3.70 UW 3
- X
- X
- X
- X
- DMAKE(p) Unsupported Free Software DMAKE(p)
- X
- X
- X
- X mm Notify of target update operations only.
- X
- X tt Keep any temporary files created; normally they
- X are automatically deleted.
- X
- X --VV Print the version of ddmmaakkee, and values of builtin mac-
- X ros.
- X
- X --xx Upon processing the user makefile export all non-
- X internally defined macros to the user's environment.
- X This option together with the -e option allows SYSV
- X AUGMAKE recursive makes to function as expected.
- X
- IINNDDEEXX
- X Here is a list of the sections that follow and a short
- X description of each. Perhaps you won't have to read the
- X whole man page to find what you need.
- X
- X SSTTAARRTTUUPP Describes ddmmaakkee initialization.
- X
- X SSYYNNTTAAXX Describes the syntax of makefile expres-
- X sions.
- X
- X AATTTTRRIIBBUUTTEESS Describes the notion of attributes and
- X how they are used when making targets.
- X
- X MMAACCRROOSS Defining and expanding macros.
- X
- X RRUULLEESS AANNDD TTAARRGGEETTSS How to define targets and their prere-
- X quisites.
- X
- X RREECCIIPPEESS How to tell ddmmaakkee how to make a target.
- X
- X TTEEXXTT DDIIVVEERRSSIIOONNSS How to use text diversions in recipes and
- X macro expansions.
- X
- X SSPPEECCIIAALL TTAARRGGEETTSS Some targets are special.
- X
- X SSPPEECCIIAALL MMAACCRROOSS Macros used by ddmmaakkee to alter the pro-
- X cessing of the makefile, and those
- X defined by ddmmaakkee for the user.
- X
- X CCOONNTTRROOLL MMAACCRROOSS Itemized list of special control macros.
- X
- X RRUUNN--TTIIMMEE MMAACCRROOSS Discussion of special run-time macros
- X such as $@ and $<.
- X
- X FFUUNNCCTTIIOONN MMAACCRROOSS GNU style function macros, only $(mktmp
- X ...) for now.
- X
- X DDYYNNAAMMIICC PPRREERREEQQUUIISSIITTEESS
- X Processing of prerequisites which contain
- X
- X
- X
- Version 3.70 UW 4
- X
- X
- X
- X
- DMAKE(p) Unsupported Free Software DMAKE(p)
- X
- X
- X
- X macro expansions in their name.
- X
- X BBIINNDDIINNGG TTAARRGGEETTSS The rules that ddmmaakkee uses to bind a tar-
- X get to an existing file in the file sys-
- X tem.
- X
- X PPEERRCCEENNTT((%%)) RRUULLEESS Specification of recipes to be used by
- X the inference algorithm.
- X
- X MMAAKKIINNGG IINNFFEERREENNCCEESS The rules that ddmmaakkee uses when inferring
- X how to make a target which has no expli-
- X cit recipe. This and the previous sec-
- X tion are really a single section in the
- X text.
- X
- X MMAAKKIINNGG TTAARRGGEETTSS How ddmmaakkee makes targets other than
- X libraries.
- X
- X MMAAKKIINNGG LLIIBBRRAARRIIEESS How ddmmaakkee makes libraries.
- X
- X KKEEEEPP SSTTAATTEE A discussion of how .KEEP_STATE works.
- X
- X MMUULLTTII PPRROOCCEESSSSIINNGG Discussion of ddmmaakkee''ss parallel make
- X facilities for architectures that support
- X them.
- X
- X CCOONNDDIITTIIOONNAALLSS Conditional expressions which control the
- X processing of the makefile.
- X
- X EEXXAAMMPPLLEESS Some hopefully useful examples.
- X
- X CCOOMMPPAATTIIBBIILLIITTYY How ddmmaakkee compares with previous versions
- X of make.
- X
- X LLIIMMIITTSS Limitations of ddmmaakkee.
- X
- X PPOORRTTAABBIILLIITTYY Comments on writing portable makefiles.
- X
- X FFIILLEESS Files used by ddmmaakkee.
- X
- X SSEEEE AALLSSOO Other related programs, and man pages.
- X
- X AAUUTTHHOORR The guy responsible for this thing.
- X
- X BBUUGGSS Hope not.
- X
- SSTTAARRTTUUPP
- X When ddmmaakkee begins execution it first processes the command
- X line and then processes an initial startup-makefile. This
- X is followed by an attempt to locate and process a user sup-
- X plied makefile. The startup file defines the default values
- X of all required control macros and the set of default rules
- X
- X
- X
- Version 3.70 UW 5
- X
- X
- X
- X
- DMAKE(p) Unsupported Free Software DMAKE(p)
- X
- X
- X
- X for making targets and inferences. When searching for the
- X startup makefile, ddmmaakkee searches the following locations, in
- X the order specified, until a startup file is located:
- X
- X 1. The location given as the value of the macro MAK-
- X ESTARTUP defined on the command line.
- X
- X 2. The location given as the value of the environment
- X variable MAKESTARTUP defined in the current
- X environment.
- X
- X 3. The location given as the value of the macro MAK-
- X ESTARTUP defined internally within ddmmaakkee.
- X
- X The above search is disabled by specifying the -r option on
- X the command line. An error is issued if a startup makefile
- X cannot be found and the -r option was not specified. A user
- X may substitute a custom startup file by defining the MAKES-
- X TARTUP environment variable or by redefining the MAKESTARTUP
- X macro on the command line. To determine where ddmmaakkee looks
- X for the default startup file, check your environment or
- X issue the command _"_d_m_a_k_e _-_V_".
- X
- X A similar search is performed to locate a default user
- X makefile when no --ff command line option is specified. By
- X default, the prerequisite list of the special target
- X .MAKEFILES specifies the names of possible makefiles and the
- X search order that ddmmaakkee should use to determine if one
- X exists. A typical definition for this target is:
- X
- X .MAKEFILES : makefile.mk Makefile makefile
- X
- X ddmmaakkee will first look for makefile.mk and then the others.
- X If a prerequisite cannot be found ddmmaakkee will try to make it
- X before going on to the next prerequisite. For example,
- X makefile.mk can be checked out of an RCS file if the proper
- X rules for doing so are defined in the startup file.
- X
- SSYYNNTTAAXX
- X This section is a summary of the syntax of makefile state-
- X ments. The description is given in a style similar to BNF,
- X where { } enclose items that may appear zero or more times,
- X and [ ] enclose items that are optional. Alternative pro-
- X ductions for a left hand side are indicated by '->', and
- X newlines are significant. All symbols in bboolldd type are text
- X or names representing text supplied by the user.
- X
- X
- X
- X Makefile -> { Statement }
- X
- X
- X
- X
- X
- Version 3.70 UW 6
- X
- X
- X
- X
- DMAKE(p) Unsupported Free Software DMAKE(p)
- X
- X
- X
- X Statement -> Macro-Definition
- X -> Conditional
- X -> Rule-Definition
- X -> Attribute-Definition
- X
- X Macro-Definition -> MMAACCRROO == LLIINNEE
- X -> MMAACCRROO **== LLIINNEE
- X -> MMAACCRROO ::== LLIINNEE
- X -> MMAACCRROO **::== LLIINNEE
- X -> MMAACCRROO ++== LLIINNEE
- X -> MMAACCRROO ++::== LLIINNEE
- X
- X Conditional -> ..IIFF expression
- X Makefile
- X [ ..EELLIIFF expression
- X Makefile ]
- X [ ..EELLSSEE
- X Makefile ]
- X ..EENNDD
- X
- X expression -> LLIINNEE
- X -> SSTTRRIINNGG ==== LLIINNEE
- X -> SSTTRRIINNGG !!== LLIINNEE
- X
- X
- X Rule-Definition -> target-definition
- X [ recipe ]
- X
- X target-definition -> targets [attrs] op { PPRREERREEQQUUIISSIITTEE } [;; rcp-line]
- X
- X targets -> target { targets }
- X -> ""target"" { targets }
- X
- X target -> special-target
- X -> TTAARRGGEETT
- X
- X attrs -> attribute { attrs }
- X -> ""attribute"" { attrs }
- X
- X op -> :: { modifier }
- X
- X modifier -> ::
- X -> ^^
- X -> !!
- X -> --
- X
- X recipe -> { TTAABB rcp-line }
- X -> [@@][%%][--] [[
- X { LLIINNEE }
- X ]]
- X
- X
- X
- X
- X
- Version 3.70 UW 7
- X
- X
- X
- X
- DMAKE(p) Unsupported Free Software DMAKE(p)
- X
- X
- X
- X rcp-line -> [@@][%%][--][++] LLIINNEE
- X
- X
- X Attribute-Definition -> attrs :: targets
- X
- X
- X attribute -> ..EEPPIILLOOGG
- X -> ..IIGGNNOORREE
- X -> ..LLIIBBRRAARRYY
- X -> ..MMKKSSAARRGGSS
- X -> ..NNOOIINNFFEERR
- X -> ..NNOOSSTTAATTEE
- X -> ..PPHHOONNYY
- X -> ..PPRREECCIIOOUUSS
- X -> ..PPRROOLLOOGG
- X -> ..SSEETTDDIIRR==_p_a_t_h
- X -> ..SSIILLEENNTT
- X -> ..SSEEQQUUEENNTTIIAALL
- X -> ..SSWWAAPP
- X -> ..UUSSEESSHHEELLLL
- X -> ..SSYYMMBBOOLL
- X -> ..UUPPDDAATTEEAALLLL
- X
- X special-target -> ..EERRRROORR
- X -> ..EEXXPPOORRTT
- X -> ..GGRROOUUPPEEPPIILLOOGG
- X -> ..GGRROOUUPPPPRROOLLOOGG
- X -> ..IIMMPPOORRTT
- X -> ..IINNCCLLUUDDEE
- X -> ..IINNCCLLUUDDEEDDIIRRSS
- X -> ..MMAAKKEEFFIILLEESS
- X -> ..RREEMMOOVVEE
- X -> ..SSOOUURRCCEE
- X -> ..SSOOUURRCCEE.._s_u_f_f_i_x
- X -> ._s_u_f_f_i_x_1._s_u_f_f_i_x_2
- X
- X
- X Where, TTAABB represents a <tab> character, SSTTRRIINNGG represents
- X an arbitrary sequence of characters, and LLIINNEE represents a
- X possibly empty sequence of characters terminated by a non-
- X escaped (not immediately preceded by a backslash '\') new-
- X line character. MMAACCRROO, PPRREERREEQQUUIISSIITTEE, and TTAARRGGEETT each
- X represent a string of characters not including space or tab
- X which respectively form the name of a macro, prerequisite or
- X target. The name may itself be a macro expansion expres-
- X sion. A LLIINNEE can be continued over several physical lines
- X by terminating it with a single backslash character. Com-
- X ments are initiated by the pound ## character and extend to
- X the end of line. All comment text is discarded, a '#' may
- X be placed into the makefile text by escaping it with '\'
- X (ie. \# translates to # when it is parsed). An exception to
- X this occurs when a # is seen inside a recipe line that
- X
- X
- X
- Version 3.70 UW 8
- X
- X
- X
- X
- DMAKE(p) Unsupported Free Software DMAKE(p)
- X
- X
- X
- X begins with a <tab> or is inside a group recipe. If you
- X specify the --cc command line switch then this behavior is
- X disabled and ddmmaakkee will treat all # characters as start of
- X comment indicators unless they are escaped by \. A set of
- X continued lines may be commented out by placing a single #
- X at the start of the first line. A continued line cannot
- X span more than one makefile.
- X
- X wwhhiittee ssppaaccee is defined to be any combination of <space>,
- X <tab>, and the sequence \<nl> when \<nl> is used to ter-
- X minate a LINE. When processing mmaaccrroo definition lines, any
- X amount of white space is allowed on either side of the macro
- X operator (=, *=, :=, *:=, += or +:=), and white space is
- X stripped from both before and after the macro value string.
- X The sequence \<nl> is treated as white space during recipe
- X expansion and is deleted from the final recipe string. You
- X must escape the \<nl> with another \ in order to get a \ at
- X the end of a recipe line. The \<nl> sequence is deleted
- X from macro values when they are expanded.
- X
- X When processing ttaarrggeett definition lines, the recipe for a
- X target must, in general, follow the first definition of the
- X target (See the RULES AND TARGETS section for an exception),
- X and the recipe may not span across multiple makefiles. Any
- X targets and prerequisites found on a target definition line
- X are taken to be white space separated tokens. The rule
- X operator (_o_p in SYNTAX section) is also considered to be a
- X token but does not require white space to precede or follow
- X it. Since the rule operator begins with a `:', traditional
- X versions of make do not allow the `:' character to form a
- X valid target name. ddmmaakkee allows `:' to be present in
- X target/prerequisite names as long as the entire
- X target/prerequisite name is quoted. For example:
- X
- X a:fred : test
- X
- X would be parsed as TARGET = a, PREREQUISITES={fred, :,
- X test}, which is not what was intended. To fix this you must
- X write:
- X
- X "a:fred" : test
- X
- X Which will be parsed as expected. See the EXAMPLES section
- X for how to apply "" quoting to a list of targets.
- X
- AATTTTRRIIBBUUTTEESS
- X ddmmaakkee defines several target attributes. Attributes may be
- X assigned to a single target, a group of targets, or to all
- X targets in the makefile. Attributes are used to modify
- X ddmmaakkee actions during target update. The recognized attri-
- X butes are:
- X
- X
- X
- X
- Version 3.70 UW 9
- X
- X
- X
- X
- DMAKE(p) Unsupported Free Software DMAKE(p)
- X
- X
- X
- X ..EEPPIILLOOGG Insert shell epilog code when executing a group
- X recipe associated with any target having this
- X attribute set.
- X
- X ..IIGGNNOORREE Ignore an error when trying to make any target
- X with this attribute set.
- X
- X ..LLIIBBRRAARRYY Target is a library.
- X
- X ..MMKKSSAARRGGSS If running in an MSDOS environment then use MKS
- X extended argument passing conventions to pass
- X arguments to commands. Non-MSDOS environments
- X ignore this attribute.
- X
- X ..NNOOIINNFFEERR Any target with this attribute set will not be
- X subjected to transitive closure if it is
- X inferred as a prerequisite of a target whose
- X recipe and prerequisites are being inferred.
- X (i.e. the inference algorithm will not use any
- X prerequisite with this attribute set, as a tar-
- X get) If specified as '.NOINFER:' (ie. with no
- X prerequisites or targets) then the effect is
- X equivalent to specifying --TT on the command line.
- X
- X ..NNOOSSTTAATTEE Any target with this attribute set will not have
- X command line flag information stored in the
- X state file if .KEEP_STATE has been enabled.
- X
- X ..PPHHOONNYY Any target with this attribute set will have its
- X recipe executed each time the target is made
- X even if a file matching the target name can be
- X located. Any targets that have a .PHONY attri-
- X buted target as a prerequisite will be made each
- X time the .PHONY attributed prerequisite is made.
- X
- X ..PPRREECCIIOOUUSS Do not remove associated target under any cir-
- X cumstances. Set by default for any targets
- X whose corresponding files exist in the file sys-
- X tem prior to the execution of ddmmaakkee.
- X
- X ..PPRROOLLOOGG Insert shell prolog code when executing a group
- X recipe associated with any target having this
- X attribute set.
- X
- X ..SSEEQQUUEENNTTIIAALL Force a sequential make of the associated
- X target's prerequisites.
- X
- X ..SSEETTDDIIRR Change current working directory to specified
- X directory when making the associated target.
- X You must specify the directory at the time the
- X attribute is specified. To do this simply give
- X _._S_E_T_D_I_R_=_p_a_t_h as the attribute. _p_a_t_h is expanded
- X
- X
- X
- Version 3.70 UW 10
- X
- X
- X
- X
- DMAKE(p) Unsupported Free Software DMAKE(p)
- X
- X
- X
- X and the result is used as the value of the
- X directory to change to. If path is surrounded
- X by single quotes then path is not expanded, and
- X is used literally as the directory name. If the
- X _p_a_t_h contains any `:' characters then the entire
-