sjg
bbf6dc9998
If a target is explicitly flagged .META,
...
a missing .meta file means it is out-of-date.
2011-08-18 00:00:21 +00:00
christos
ccb821a2ac
- remove gcc-4.5 warnings
...
- simplify job printing code
- document non-literal format strings
2011-08-14 13:06:09 +00:00
christos
3edabd2e8e
Don't attempt to touch special targets; make -t would create .END in every
...
directory.
2011-08-01 02:13:21 +00:00
wiz
4cbd24b23f
dependant -> dependent
2011-06-30 20:09:15 +00:00
sjg
ebe0193f6c
After each strsep(&p) check that p is valid.
...
If not the .meta file is corrupted (build interrupted?)
issue a warning and declare target oodate.
2011-06-22 21:13:12 +00:00
mrg
c111245a78
apply some -Wno-error and/or -fno-strict-aliasing.
...
all of this should be looked at closer, but some of them are not
very trivial.
2011-06-22 02:49:41 +00:00
sjg
0277db2f8c
Use %zu rather than cast
2011-06-11 02:10:48 +00:00
sjg
af8b888000
size_t on amd64 doesn't like %u, use a cast.
2011-06-10 23:57:39 +00:00
sjg
873dae776d
Some systems (eg. MirBSD) use a ksh, with an echo which cannot
...
be used for things containing \x: etc.
Check for print or printf as builtin and use if available.
Note that a builtin will fail, if make decides a shell is not needed.
2011-06-07 00:10:20 +00:00
sjg
43c87c739c
ApplyModifiers: if we parse a variable in the modifier list,
...
do not consider it a nested modifier set, unless it is followed by
endc, a ':' or end of string.
2011-06-03 21:10:42 +00:00
cheusov
a541b13903
fix bug in section .ORDER of make.1
2011-05-28 21:53:54 +00:00
tsutsui
56683e6b6e
Explicitly #include <time.h> for time(3) and strftime(3).
...
Fixes warnings on some non NetBSD hosts.
2011-05-21 07:30:42 +00:00
dsl
cf5ef24619
Back out a local change
2011-05-18 06:36:48 +00:00
dsl
c5191c6734
If a makefile if a multiple of the page size and doesn't end with a
...
newline, then it all goes horribly wrong when make tries to terminate
the last input line.
This was all ok before the mmap changes (rev 1.169) because the last
32 bytes of the input buffer were never read into.
The non-mmap case has a similar problem.
Bug found because my .depend files don't have a newline at the end of
the .OPTIO|NAL line (don't know if that is a local change).
2011-05-17 21:56:51 +00:00
wiz
9e66d3e091
Remove trailing whitespace.
2011-05-04 21:24:59 +00:00
christos
fc29dd21ad
Document what I wrote for PR/40115
2011-05-04 21:14:56 +00:00
sjg
48587910e0
Add .MAKE.META.BAILIWICK - to identify the scope of make's control.
...
meta_oodate: if a file that was written or linked within our bailiwick,
but outside of .OBJDIR is missing, add it to missingFiles.
If we get to the end of the .meta file without seeing it [re]moved,
then consider the target out-of-date.
2011-05-04 20:38:31 +00:00
sjg
2ac5d52245
Add a test case for sysV modifier subst
2011-04-11 15:10:15 +00:00
sjg
521f3749c8
If a "long" modifier name does not match, goto default case
...
so SysV modifier can be tried.
2011-04-11 14:49:09 +00:00
wiz
2974cb7ffe
Remove trailing whitespace.
2011-04-11 06:56:50 +00:00
sjg
b446ef338f
Add :localtime and :gmtime which use value as format string for strftime.
2011-04-11 01:44:15 +00:00
joerg
53d81ae021
Add the :hash modifier to compute a 32bit hash of an variable.
...
This uses MurmurHash3 to get a reasonable collission-free hash with
small code. The result is endian neutral.
2011-04-07 01:40:01 +00:00
mbalmer
18e7170716
Declare variable only once. Fixes PR 44795.
2011-04-02 07:58:30 +00:00
sjg
c76b9c11ac
Call meta_job_finish() from meta_job_error(), so that if
...
the .ERROR target copies the .meta file, it has been completed.
meta_job_finish() is safe to call again.
2011-03-31 06:50:43 +00:00
sjg
64809b8858
We must now call meta_job_finish() after meta_job_error()
...
so that .ERROR_META_FILE is captured.
2011-03-31 06:28:42 +00:00
sjg
ff54381362
Add NetBSD tags
2011-03-30 22:03:49 +00:00
sjg
be03bd0379
Check for extra commands as soon as we reach CWD,
...
so we return faster (if oodate) and give a more accurate debug message.
2011-03-29 17:29:20 +00:00
sjg
ede3eaf4a5
CondDoExists: Avoid use after free()
2011-03-29 17:19:22 +00:00
sjg
1e444cd2f2
Use curdirOk as the token
2011-03-27 19:47:46 +00:00
sjg
dd0a10eeff
When .MAKE.MODE inlcudes 'meta'; 'curdir=true' enables creating .meta
...
files in .CURDIR - such as when running make in .OBJDIR with a generated
makefile.
2011-03-27 19:39:21 +00:00
dholland
b82f0f1987
Catch up to Makefile rev 1.40 (from 2006): add lstPrev.o. Closes PR 43466.
2011-03-26 21:42:12 +00:00
sjg
c37859c219
Only need to getcwd() once
2011-03-06 17:41:11 +00:00
sjg
b9fa549592
CWD should be compared against cwd
2011-03-06 04:34:25 +00:00
sjg
8892f885fd
Add unit tests to check that exists(some/dir/) works
...
Also fix handling of sysV substitutions when lhs and variable are empty.
Also that modifiers do not cause errors during conditional tests
when undefined variables should otherwise be ok.
Ie. .if defined(nosuch) && ${nosuch:Mx} != ""
2011-03-06 00:02:14 +00:00
sjg
be4a1e2c49
Treat some/dir/ the same as some/dir/.
2011-03-05 23:57:05 +00:00
sjg
47311dc80a
main.c now exports curdir[] so we can use it.
2011-03-04 04:55:51 +00:00
nakayama
c09c2a7b34
Fix build on Solaris 10.
2011-03-03 14:53:01 +00:00
sjg
4fab365c37
Fix rendering of :? example
2011-02-26 01:17:24 +00:00
joerg
bfc4d64e8a
Use the current directory at start time for .PARSEDIR, if the filename
...
contains no /.
2011-02-20 23:12:09 +00:00
dholland
51eafd380d
Remove the extra blank line after "Fatal errors encountered -- cannot
...
continue". This has been there since 1.1 but I don't think it was
intentional. If anyone actually cares about the blank line being there
for some reason, go ahead and revert this change...
2011-02-20 20:17:35 +00:00
dholland
90b9a73922
Remove stray extra newline in error message.
2011-02-20 20:15:36 +00:00
sjg
0734782fbf
Mark unused args.
2011-02-13 21:24:42 +00:00
sjg
8bb1fe5d14
When making a target that involves creating itermediate dirs,
...
realpath() will fail until after those dirs exist.
Try to ensure the same meta file name is used regardless.
2011-02-13 21:22:41 +00:00
sjg
8d31de3127
tmplen should be static
2011-02-08 05:29:13 +00:00
dholland
626c509661
erm. fix previous...
2010-12-25 21:39:11 +00:00
dholland
ad5f4cbc2e
Maybe fix a problem that appeared on loonix.
2010-12-25 20:46:18 +00:00
dholland
f8d6aa2c68
Many C libraries don't set errno when malloc fails, so always use
...
strerror(ENOMEM).
2010-12-25 20:35:25 +00:00
dholland
305d151446
Improve confusing error message when getcwd() fails.
2010-12-25 20:34:08 +00:00
dholland
e05b408d55
Uses stat; needs sys/stat.h. No idea what's pulling it in implicitly on
...
NetBSD so I didn't notice. Woops. Noted by Kurt Schreiner on current-users.
2010-12-25 17:19:04 +00:00
dholland
3f9d98c828
Begin cleanup of the make parser: separate out the logic for reading files
...
from the parsing goo. This will now use mmap for reading if it works and
fall back to read only for pipes and such. Step 1 of a cleanup program
proposed without objection on tech-toolchain.
2010-12-25 04:57:07 +00:00