DragonFly submit List (threaded) for 2004-12
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
usr.bin/make 2nd try: we are POSIX
Remove ifdef since the code has always been built with POSIX defined.
Max
PatchSet 374
Date: 2004/11/17 11:32:46
Author: harti
Log:
Eliminate the define for POSIX and build with Posix behaviour.
Our make has been build with POSIX enabled from the first day
and the ifdef'ed out code served no purpose.
Members:
config.h:1.14->1.15
main.c:1.97->1.98
parse.c:1.57->1.58
Index: config.h
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/config.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- config.h 11 Nov 2004 12:23:39 -0000 1.14
+++ config.h 17 Nov 2004 11:32:46 -0000 1.15
@@ -78,15 +78,6 @@
#define RECHECK
/*
- * POSIX
- * Adhere to the POSIX 1003.2 draft for the make(1) program.
- * - Use MAKEFLAGS instead of MAKE to pick arguments from the
- * environment.
- * - Allow empty command lines if starting with tab.
- */
-#define POSIX
-
-/*
* SYSVINCLUDE
* Recognize system V like include directives [include "filename"]
* SYSVVARSUB
Index: main.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/main.c,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -r1.97 -r1.98
--- main.c 12 Nov 2004 20:37:27 -0000 1.97
+++ main.c 17 Nov 2004 11:32:46 -0000 1.98
@@ -612,11 +612,7 @@
* (Note this is *not* MAKEFLAGS since /bin/make uses that and it's
* in a different format).
*/
-#ifdef POSIX
Main_ParseArgLine(getenv("MAKEFLAGS"));
-#else
- Main_ParseArgLine(getenv("MAKE"));
-#endif
MainParseArgs(argc, argv);
@@ -766,11 +762,7 @@
/* Install all the flags into the MAKE envariable. */
if (((p = Var_Value(MAKEFLAGS, VAR_GLOBAL, &p1)) != NULL) && *p)
-#ifdef POSIX
setenv("MAKEFLAGS", p, 1);
-#else
- setenv("MAKE", p, 1);
-#endif
free(p1);
/*
Index: parse.c
===================================================================
RCS file: /usr/home/okumoto/Work/make/fbsd-cvs/src/usr.bin/make/parse.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -r1.57 -r1.58
--- parse.c 22 Jul 2004 11:12:01 -0000 1.57
+++ parse.c 17 Nov 2004 11:32:46 -0000 1.58
@@ -143,9 +143,7 @@
Parallel, /* .PARALLEL */
ExPath, /* .PATH */
Phony, /* .PHONY */
-#ifdef POSIX
Posix, /* .POSIX */
-#endif
Precious, /* .PRECIOUS */
ExShell, /* .SHELL */
Silent, /* .SILENT */
@@ -199,9 +197,7 @@
{ ".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 },
@@ -1034,11 +1030,9 @@
case ExPath:
Lst_ForEach(paths, ParseClearPath, (void *)NULL);
break;
-#ifdef POSIX
case Posix:
Var_Set("%POSIX", "1003.2", VAR_GLOBAL);
break;
-#endif
default:
break;
}
@@ -2428,9 +2422,6 @@
* If a line starts with a tab, it can only hope to be
* a creation command.
*/
-#ifndef POSIX
- shellCommand:
-#endif
for (cp = line + 1; isspace ((unsigned char) *cp); cp++) {
continue;
}
@@ -2474,10 +2465,6 @@
* line's script, we assume it's actually a shell command
* and add it to the current list of targets.
*/
-#ifndef POSIX
- Boolean nonSpace = FALSE;
-#endif
-
cp = line;
if (isspace((unsigned char) line[0])) {
while ((*cp != '\0') && isspace((unsigned char) *cp)) {
@@ -2486,44 +2473,24 @@
if (*cp == '\0') {
goto nextLine;
}
-#ifndef POSIX
- while ((*cp != ':') && (*cp != '!') && (*cp != '\0')) {
- nonSpace = TRUE;
- cp++;
- }
-#endif
}
-#ifndef POSIX
- if (*cp == '\0') {
- if (inLine) {
- Parse_Error (PARSE_WARNING,
- "Shell command needs a leading tab");
- goto shellCommand;
- } else if (nonSpace) {
- Parse_Error (PARSE_FATAL, "Missing operator");
- }
- } else {
-#endif
- ParseFinishLine();
+ ParseFinishLine();
- cp = Var_Subst (NULL, line, VAR_CMD, TRUE);
- free (line);
- line = cp;
+ cp = Var_Subst (NULL, line, VAR_CMD, TRUE);
+ free (line);
+ line = cp;
- /*
- * Need a non-circular list for the target nodes
- */
- if (targets)
- Lst_Destroy(targets, NOFREE);
+ /*
+ * Need a non-circular list for the target nodes
+ */
+ if (targets)
+ Lst_Destroy(targets, NOFREE);
- targets = Lst_Init (FALSE);
- inLine = TRUE;
+ targets = Lst_Init (FALSE);
+ inLine = TRUE;
- ParseDoDependency (line);
-#ifndef POSIX
- }
-#endif
+ ParseDoDependency (line);
}
nextLine:
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]