From b451f13c26a90c1599717c5b384d0a8a7479f01a Mon Sep 17 00:00:00 2001 From: Alexandre Perrin Date: Thu, 21 Nov 2013 14:34:05 +0100 Subject: [PATCH 2/7] Revert local modification patches done to bmake. Preparing a clean vendor branch merge. --- contrib/bmake/README.DELETED | 3 --- contrib/bmake/README.DRAGONFLY | 17 ----------------- contrib/bmake/bmake.1 | 2 +- contrib/bmake/meta.c | 4 ++-- contrib/bmake/parse.c | 2 +- contrib/bmake/suff.c | 12 ++++++------ 6 files changed, 10 insertions(+), 30 deletions(-) delete mode 100644 contrib/bmake/README.DELETED delete mode 100644 contrib/bmake/README.DRAGONFLY diff --git a/contrib/bmake/README.DELETED b/contrib/bmake/README.DELETED deleted file mode 100644 index 1217c63..0000000 --- a/contrib/bmake/README.DELETED +++ /dev/null @@ -1,3 +0,0 @@ -unit-tests/ -PSD.doc/ -missing/ diff --git a/contrib/bmake/README.DRAGONFLY b/contrib/bmake/README.DRAGONFLY deleted file mode 100644 index c155ad7..0000000 --- a/contrib/bmake/README.DRAGONFLY +++ /dev/null @@ -1,17 +0,0 @@ -BMAKE 2012-10-10 -================ - -Original source can be downloaded from: -http://www.crufty.net/ftp/pub/sjg - -file = bmake-20121010.tar.gz -date = 13 October 2012 -size = 438070 -sha1 = 1a23e034d77459bc82e5259dea029514403ce484 - -The file README.DELETED contains a list of deleted files and directories. - -The following files have been patched: -bmake.1 -meta.c -suff.c diff --git a/contrib/bmake/bmake.1 b/contrib/bmake/bmake.1 index 3ffd525..d7ed08a 100644 --- a/contrib/bmake/bmake.1 +++ b/contrib/bmake/bmake.1 @@ -1482,8 +1482,8 @@ PATH := ${PATH} .Li .unexport-env .Li .export PATH .Li .endif -.Ed .Pp +.Ed Would result in an environment containing only .Ql Ev PATH , which is the minimal useful environment. diff --git a/contrib/bmake/meta.c b/contrib/bmake/meta.c index aca2716..77af4e8 100644 --- a/contrib/bmake/meta.c +++ b/contrib/bmake/meta.c @@ -626,7 +626,7 @@ meta_job_start(Job *job, GNode *gn) * It does not disturb our state. */ void -meta_job_child(Job __unused *job) +meta_job_child(Job *job) { #ifdef USE_FILEMON BuildMon *pbm; @@ -711,7 +711,7 @@ meta_job_output(Job *job, char *cp, const char *nl) } void -meta_cmd_finish(void __unused *pbmp) +meta_cmd_finish(void *pbmp) { #ifdef USE_FILEMON BuildMon *pbm = pbmp; diff --git a/contrib/bmake/parse.c b/contrib/bmake/parse.c index ff86465..0b18f5d 100644 --- a/contrib/bmake/parse.c +++ b/contrib/bmake/parse.c @@ -1206,7 +1206,7 @@ ParseDoDependency(char *line) */ int length; void *freeIt; - __unused char *result; /* XXX */ + char *result; result = Var_Parse(cp, VAR_CMD, TRUE, &length, &freeIt); if (freeIt) diff --git a/contrib/bmake/suff.c b/contrib/bmake/suff.c index 8a7a2e0..6abdeb0 100644 --- a/contrib/bmake/suff.c +++ b/contrib/bmake/suff.c @@ -2058,10 +2058,6 @@ SuffFindNormalDeps(GNode *gn, Lst slst) * children, then look for any overriding transformations they imply. * Should we find one, we discard the one we found before. */ - bottom = NULL; - targ = NULL; - - if (!(gn->type & OP_PHONY)) { while (ln != NULL) { /* @@ -2175,7 +2171,6 @@ SuffFindNormalDeps(GNode *gn, Lst slst) for (targ = bottom; targ->parent != NULL; targ = targ->parent) continue; } - } Var_Set(TARGET, gn->path ? gn->path : gn->name, gn, 0); @@ -2424,7 +2419,12 @@ SuffFindDeps(GNode *gn, Lst slst) */ Var_Set(TARGET, gn->path ? gn->path : gn->name, gn, 0); Var_Set(PREFIX, gn->name, gn, 0); - + if (gn->type & OP_PHONY) { + /* + * If this is a .PHONY target, we do not apply suffix rules. + */ + return; + } if (DEBUG(SUFF)) { fprintf(debug_file, "SuffFindDeps (%s)\n", gn->name); } -- 1.8.4.1