Commit Graph

16 Commits

Author SHA1 Message Date
rillig
6de75a95f8 make(1): clean up RCSID blocks
These blocks mostly consisted of redundant structure, following the same
#ifndef pattern over and over, with only minimal variation.

It's easier to maintain if the common structure is only written once and
encapsulated in a macro.

To avoid "defined but unused" warnings from GCC in the case where
MAKE_NATIVE is not defined, I had to add volatile.  Adding
MAKE_ATTR_UNUSED alone would not preserve the rcsid variable in the
resulting binary.
2020-09-13 15:15:51 +00:00
rillig
86abf69ed1 make(1): no declaration-after-statement anymore
NetBSD make is intended to be maximally portable, therefore it uses only
C89.  This was not declared in the Makefile before.

There are still a few places in parse.c and metachar.c that use
end-of-line comments.  These will be fixed in a follow-up commit.
2020-08-03 20:26:09 +00:00
rillig
ad6695e0a6 make(1): avoid calls to free(3) in the common case of a NULL pointer 2020-08-01 09:55:00 +00:00
rillig
ab2bfed61f make(1): let Var_Value return a const char *
The return value must not be modified anyway, so let the compiler check
this for free.
2020-08-01 09:25:36 +00:00
rillig
820b5caede make(1): remove trailing whitespace 2020-07-03 08:13:23 +00:00
christos
266b18d880 prepare for time_t 64 2008-12-28 18:31:51 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
christos
a686e4e754 back all changes out until I fix it properly. 2008-02-15 21:29:50 +00:00
christos
2b28370627 - use pid_t/size_t as appropriate instead of int.
- use %ld to print pids.
- fix a bit of lint.
- WARNS=4
2008-02-14 22:11:20 +00:00
dsl
913c34c213 Expunge last references to jobTokensFree 2006-01-04 21:35:44 +00:00
ross
42dbdbd46a Simplify build, no functional changes.
Instead of adding MAKE_BOOTSTRAP for hosted environments, i.e., when
you want things simple, instead add MAKE_NATIVE to get those hugely
important features like __RCSID().

It's now possible to build make on some hosts with: cc *.c */*.c
2004-05-07 00:04:38 +00:00
wiz
86ebbc3a0e Remove !__STDC__ stuff, de-__P(), ANSIfy, and de-register. 2002-06-15 18:24:55 +00:00
reinoud
a233fbd53e Fix major bug in make(1) ... due to shadowing of the dotLast path used for
the .DOTLAST primitive by a boolean variable with the same name, this whole
mechanism was broken ... it doesn't save much stat calls but it was wrong.

Thanks to Jason Thorpe for the other shadow-variable fixing patches he
made.
2002-01-27 01:50:54 +00:00
cgd
2f928e31d3 <sys/time.h>, rather than <time.h>. The former is actually the documented
way to get gettimeofday(), etc.  On some systems on which you might want
to host make (e.g. solaris), <time.h> won't get you a struct timeval
definition.
2001-01-23 02:48:05 +00:00
sommerfeld
1ef47ae656 Include token counts in trace output.
Don't let tokensFree go negative.
2000-12-30 16:38:22 +00:00
sommerfeld
694b899b9c Quick and dirty trace mechanism to make it easier to look at how different
parallel make job distribution algorithms work in practice.
2000-12-29 23:11:08 +00:00