11# mamake and the MAM language #
22
33MAM (Make Abstract Machine) is a simple rule-based make language
4- that is implemented in just eight four-letter commands and four attributes,
4+ that is implemented in just ten four-letter commands and four attributes,
55yet allows unlimited flexibility as it can execute arbitrary shell code.
66The program implementing MAM, ` mamake ` ,
77is a portable C90 program written in a single file, ` mamake.c ` .
@@ -273,8 +273,6 @@ The following *attribute*s are available:
273273by * target* in a manner equivalent to an empty ` make ` * target* /` done ` block,
274274with the optional * attribute* s applied to the new rule. A nonexistent
275275prerequisite is an error unless a ` dontcare ` attribute is given.
276- Declaring a dependency on a prerequisite that is currently being made (i.e.:
277- directly or indirectly within that prerequisite's block) is an error.
278276
279277### Referencing previously defined rules ###
280278
@@ -284,9 +282,12 @@ If *target* matches a previously defined rule, `prev` adds a dependency on
284282that rule to the current rule. This is used to make a rule a prerequisite of
285283multiple ` make ` ...` done ` blocks without repeating the rule. It is an error
286284to specify attributes, because the attributes of the referenced rule are used.
287- In the legacy mode, attributes are silently ignored.
285+ Declaring a dependency on a prerequisite that is currently being made (i.e.:
286+ directly or indirectly within that prerequisite's block) is an error.
288287
289- > * Obsolete:* If the strict level is < 4, and if * target* does not match a
288+ > * Obsolete:*
289+ > In the legacy mode, attributes are silently ignored.
290+ > If the strict level is < 4, and if * target* does not match a
290291> previously defined rule, then the following applies. In the legacy mode,
291292> ` prev ` creates an empty dummy rule and ignores the * attribute* s; this is
292293> for backward compatibility. At strict levels 1 and up, ` prev ` in this
@@ -314,7 +315,8 @@ to probe the C compiler for flags and features,
314315or uses that script's stored results if not outdated.
315316The results are stored as a series of ` setv ` commands
316317in a file in the directory ` %{INSTALLROOT}/lib/probe/C/mam ` ,
317- the file name being a hash of full path to the compiler indicated by ` %{CC} ` .
318+ the file name being a hash of the full path to the compiler
319+ as indicated by ` %{CC} ` .
318320That results file is then read and included in the current Mamfile
319321as if it followed the ` setv CC ` command.
320322
0 commit comments