summaryrefslogtreecommitdiffstats
path: root/usr.bin/make
diff options
context:
space:
mode:
authorsteve <steve@FreeBSD.org>1996-11-03 03:29:57 +0000
committersteve <steve@FreeBSD.org>1996-11-03 03:29:57 +0000
commite0d5709e9072c365ddf81df4c993a04ac14519ab (patch)
tree9e0b1a5c68ea6d2e0fe63cbd1f89b36fb1b8e890 /usr.bin/make
parente0a6a5fe8fc502a5a27a7053e90ad85077118669 (diff)
downloadFreeBSD-src-e0d5709e9072c365ddf81df4c993a04ac14519ab.zip
FreeBSD-src-e0d5709e9072c365ddf81df4c993a04ac14519ab.tar.gz
Add a .POSIX directive. When the first non-comment
line of a Makefile contains this directive, make(1) will enter a POSIX 1003.2 compliant mode. Submitted by: Joerg Wunsch <joerg@freebsd.org>
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/parse.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c
index 07631a5..21e8a1e 100644
--- a/usr.bin/make/parse.c
+++ b/usr.bin/make/parse.c
@@ -35,7 +35,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: parse.c,v 1.14 1996/10/08 04:06:05 steve Exp $
*/
#ifndef lint
@@ -166,6 +166,9 @@ typedef enum {
Parallel, /* .PARALLEL */
ExPath, /* .PATH */
Phony, /* .PHONY */
+#ifdef POSIX
+ Posix, /* .POSIX */
+#endif
Precious, /* .PRECIOUS */
ExShell, /* .SHELL */
Silent, /* .SILENT */
@@ -219,6 +222,9 @@ static struct {
{ ".PARALLEL", Parallel, 0 },
{ ".PATH", ExPath, 0 },
{ ".PHONY", Phony, OP_PHONY },
+#ifdef POSIX
+{ ".POSIX", Posix, 0 },
+#endif
{ ".PRECIOUS", Precious, OP_PRECIOUS },
{ ".RECURSIVE", Attribute, OP_MAKE },
{ ".SHELL", ExShell, 0 },
@@ -1049,6 +1055,11 @@ ParseDoDependency (line)
case ExPath:
Lst_ForEach(paths, ParseClearPath, (ClientData)NULL);
break;
+#ifdef POSIX
+ case Posix:
+ Var_Set("%POSIX", "1003.2", VAR_GLOBAL);
+ break;
+#endif
default:
break;
}
OpenPOWER on IntegriCloud