| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
MFC after: 12 days
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
variable to NULL, to avoid using it uninitialized in certain cases.
This fixes the following clang 3.2 warning:
usr.bin/make/var.c:1770:10: error: variable 'error' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
if (vp->execute) {
^~~~~~~~~~~
usr.bin/make/var.c:1777:10: note: uninitialized use occurs here
if (error)
^~~~~
usr.bin/make/var.c:1770:6: note: remove the 'if' if its condition is always true
if (vp->execute) {
^~~~~~~~~~~~~~~~~
usr.bin/make/var.c:1768:23: note: initialize the variable 'error' to silence this warning
const char *error;
^
= NULL
MFC after: 1 week
|
|
|
|
| |
Submitted by: Simon Gerraty <sjg@juniper.net>
|
|
|
|
|
|
|
| |
modifiers for ":tu" and ":tl" from OSF's ODE, which made its way into
NetBSD's make, which is the source for the Portable Berkeley Make.
Submitted by: Simon Gerraty <sjg@juniper.net>
|
| |
|
|
|
|
| |
Reviewed by: rodrigc
|
|
|
|
|
| |
newly created 'Var' back to the caller.
Also, back out an accidentally commented WIP comment.
|
|
|
|
|
| |
- Enable -Q by default for the moment - there is something weird
going on in the rescue build.
|
|
|
|
| |
in the case the var already exists.
|
| |
|
|
|
|
|
| |
Reviewed by: harti
Obtained from: NetBSD (mostly)
|
|
|
|
|
|
|
|
|
| |
than strlen(var) + 1)
- ReadMakeFile: prevent `fname' memory leak
- ReadMakeFile: prevent double free (caused by double fclose) --
ParsePopInput() closes input file
Reviewed by: harti
|
|
|
|
|
|
| |
this clear by constifying the return value.
Obtained from: DragonFlyBSD
|
|
|
|
|
|
| |
to has always been set to NULL for some time now.
Obtained from: DragonFlyBSD
|
|
|
|
|
|
|
|
| |
introduce a struct that holds all the information about an argument
vector and pass that around.
Author: Max Okumoto <okumoto@ucsd.edu>
Obtained from: DragonFlyBSD
|
|
|
|
| |
Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.237)
|
|
|
|
| |
Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.233)
|
|
|
|
| |
Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.232)
|
|
|
|
|
|
|
| |
remove nonints.h.
Patch: 7.204
Submitted by: Max Okumoto <okumoto@ucsd.edu>
|
|
|
|
|
|
|
| |
results in a warning that will go away soon.
Patch: 7.198
Submitted by: Max Okumoto <okumoto@ucsd.edu>
|
|
|
|
|
|
|
|
| |
context (and only in one place to substitute the .for variable). Therefor
there is no need to pass the context as a parameter.
Patch: 7.197
Submitted by: Max Okumoto <okumoto@ucsd.edu>
|
|
|
|
|
| |
Patch: 7.195
Submitted by: Max Okumoto <okumoto@ucsd.edu>
|
|
|
|
|
|
|
| |
that are now used only in var.c from var.h to var.c
Patches: 7.193,7.194
Submitted by: Max Okumoto <okumoto@ucsd.edu>
|
|
|
|
|
| |
Patch: 7.192
Submitted by: Max Okumoto <okumoto@ucsd.edu>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
take everything after -- as either a macro assignment or a target.
Note that make still reorders arguments before --: anything starting
with a dash is considered an option, anything which contains an equal
sign is considered a macro assignment and everything else a target.
This still is not POSIX with regard to the options, but it will probably
not change because it has been make's behaviour for ages.
Add a new function Var_Match() that correctly skips a macro call by just
doing the same as Var_Subst() but without producing output. This will help
making the parser more robust.
Patches: 7.190,7.191
Submitted by: Max Okumoto <okumoto@ucsd.edu>
|
|
|
|
|
|
|
|
|
|
| |
only one variable and Var_Subst() which substitutes all. Split out the
test whether a variable should not be expanded into match_var().
Make access to the input string consistently using str[]. Remove two
unused functions: Var_GetTail() and Var_GetHead().
Patches: 7.184-7.189
Submitted by: Max Okumoto <okumoto@ucsd.edu>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
make macro into the environment of programs executed by make. This
has approximately the same function as gmake's export directive.
The form of a pseudo target was deliberately choosen to minimize work
for POSIX compatibility (Makefiles are not allowed to use any targets
starting with a dot and consisting only of uppercase letters except those
specified in the standard when they want POSIX compatible behaviour, so
such a Makefile can never contain .EXPORTVAR.)
Change the handling of macros coming from the environment: instead
of asking the environment for each variable we could not find otherwise
put all the environment variables in a special variable environment just
at start up.
This has been tested on the ports cluster by kris.
Submitted by: Max Okumoto <okumoto@ucsd.edu>
|
|
|
|
|
|
|
|
|
| |
of flags originally passed to VarFind(). This eliminates the code by
removing a bunch of tests.
Patch: 7.173
Submitted by: Max Okumoto <okumoto@ucsd.edu>
|
|
|
|
|
|
|
|
|
|
| |
characters so it is not safe to move around code from
before it to after it. This should fix problems with building the
documentation.
Patch: 7.170
Submitted by: Max Okumoto <okumoto@ucsd.edu>
|
| |
|
|
|
|
|
|
| |
Patch: 7.163
Submitted by: Max Okumoto <okumoto@ucsd.edu>
|
|
|
|
|
|
| |
Patch: 7.162
Submitted by: Max Okumoto <okumoto@ucsd.edu>
|
|
|
|
|
|
| |
Patch: 7.161
Submitted by: Max Okumoto <okumoto@ucsd.edu>
|
|
|
|
|
|
|
| |
Patch: 7.160
Requested by: harti
Submitted by: Max Okumoto <okumoto@ucsd.edu>
|
|
|
|
|
|
|
|
| |
Store a Buf object in struct VarPattern instead of a char * and a length.
Patch: 7.158
Submitted by: Max Okumoto <okumoto@ucsd.edu>
|
|
|
|
|
|
|
|
| |
to store the left expression of a C modificator.
Patch: 7.157
Submitted by: Max Okumoto <okumoto@ucsd.edu>
|
|
|
|
|
|
|
|
| |
out common code.
Patch: 7.156
Submitted by: Max Okumoto <okumoto@ucsd.edu>
|
|
|
|
|
|
| |
Patch: 7.153
Submitted by: Max Okumoto <okumoto@ucsd.edu>
|
|
|
|
|
|
|
|
| |
appropriate.
Patch: 7.147-7.151
Submitted by: Max Okumoto <okumoto@ucsd.edu>
|
|
|
|
|
|
|
|
|
| |
Remove unreachable code for VAR_NOSUBST - it was never set.
Replace redundant code with calls to VarGetPattern().
Patch: 7.143-7.145
Submitted by: Max Okumoto <okumoto@ucsd.edu>
|
|
|
|
|
|
|
|
|
| |
Change the parsing of the C modifier flags so that specifying both
'1' and 'g' gives an error.
Patch: 7.141,7.142
Submitted by: Max Okumoto <okumoto@ucsd.edu>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
is always a '$'. This is not always correct, for example for
conditionals: .if defined(foobar).
Clean up some comments.
Move common code out of if-statements.
Patch: 7.140
Submitted by: Max Okumoto <okumoto@ucsd.edu>
|
|
|
|
|
|
| |
Patch: 7.139
Submitted by: Max Okumoto <okumoto@ucsd.edu>
|
|
|
|
|
|
|
|
| |
pointer we're talking.
Patch: 7.138
Submitted by: Max Okumoto <okumoto@ucsd.edu>
|
|
|
|
|
|
|
|
| |
simplify things. Correct a number comments.
Patch: 7.137
Submitted by: Max Okumoto <okumoto@ucsd.edu>
|
|
|
|
|
|
| |
Patch: 7.136
Submitted by: Max Okumoto <okumoto@ucsd.edu>
|
|
|
|
|
|
|
|
|
|
|
| |
by the caller. Don't pass 'endc' - it can be computed from 'startc'.
Remove unneccessary temporary variables. Remove constant if-expressions
and remove code before call Fatal() - there is no point to cleanup before
aborting.
Patch: 7.134,7.135
Submitted by: Max Okumoto <okumoto@ucsd.edu>
|
|
|
|
|
|
|
|
|
| |
occurence which actually holds always the same constant value.
Shorten the name pattern to patt.
Patch: 7.133
Submitted by: Max Okumoto <okumoto@ucsd.edu>
|
|
|
|
|
|
|
|
|
| |
by putting them into struct VarParser or computing them (consumed).
Change the loop termination condition in VarParseLong from endc to \0.
Patch: 7.128-7.132
Submitted by: Max Okumoto <okumoto@ucsd.edu>
|
|
|
|
|
|
|
|
| |
by passing them through struct VarParser.
Patch: 7.127
Submitted by: Max Okumoto <okumoto@ucsd.edu>
|