Age | Commit message (Collapse) | Author |
|
rescinded 22 July 1999. Proofed by myself and Theo.
|
|
ok krw@, matthieu@, deraadt@
|
|
the great intial witch hunt, as prompted by tdeval@
os-aix-dso.c: ok henning@
ab.C: ok drahn@
|
|
deraadt@ ok
|
|
espie@ ok for make/,
deraadt@ one extra eye,
millert@ ok
|
|
ok millert@
|
|
|
|
ok millert@, miod@
|
|
|
|
initialize create in main.c.
|
|
|
|
pointers is simpler than calling a function.
Recognize purely static lst headers, which don't really need any
initialization.
ok miod@
|
|
POSIX counterparts.
|
|
Removes remaining lint stuff from lst.lib.
|
|
- cut up those huge include files into separate interfaces for all modules.
Put the interface documentation there, and not with the implementation.
- light-weight includes for needed concrete types (lst_t.h, timestamp_t.h).
- cut out some more logically separate parts: cmd_exec, varname, parsevar,
timestamp.
- put all error handling functions together, so that we will be able to
clean them up.
- more systematic naming: functioni to handle interval, function to handle
string.
- put the init/end code apart to minimize coupling.
- kill weird types like ReturnStatus and Boolean. Use standard bool (with a
fallback for non-iso systems)
- better interface documentation for lots of subsystems.
As a result, make compilation goes somewhat faster (5%, even considering
the largish BSD copyrights to read). The corresponding preprocessed
source goes down from 1,5M to 1M.
A few minor code changes as well: Parse_DoVar is no longer destructive.
Parse_IsVar functionality is folded into Parse_DoVar (as it knows what an
assignment is), a few more interval handling functions. Avoid calling
XXX_End when they do nothing, just #define XXX_End to nothing.
Parse_DoVar is slightly more general: it will handle compound assignments
as long as they make sense, e.g., VAR +!= cmd
will work. As a side effect, VAR++=value now triggers an error
(two + in assignment).
- this stuff doesn't occur in portable Makefiles.
- writing VAR++ = value or VAR+ +=value disambiguates it.
- this is a good thing, it uncovered a bug in bsd.port.mk.
Tested by naddy@. Okayed millert@. I'll handle the fallback if there is
any. This went through a full make build anyways, including isakmpd
(without mickey's custom binutils, as he didn't see fit to share it with me).
|
|
Numerous changes:
- generate can build several tables
- style cleanup
- statistics code
- use variable names throughout (struct Name)
- recursive variables everywhere
- faster parser (pass buffer along instead of allocating multiple copies)
- correct parser. Handles comments everywhere, and ; correctly
- more string intervals
- simplified dir.c, less recursion.
- extended for loops
- sinclude()
- finished removing extra junk from Lst_*
- handles ${@D} and friends in a simpler way
- cleaned up and modular VarModifiers handling.
- recognizes some gnu Makefile usages and errors out about them.
Additionally, some extra functionality is defined by FEATURES. The set of
functionalities is currently hardcoded to OpenBSD defaults, but this may
include support for some NetBSD extensions, like ODE modifiers.
Backed by miod@ and millert@, who finally got sick of my endless patches...
|
|
though...
Ok'ed miod@.
|
|
Define two possible interfaces: the classic one,
and the new one (used where available) that depends on timespec.
Better granularity, make is now able to distinguish between files that
were built during the same second.
|
|
Replace the time stamp hash in dir.c with an open hashing structure.
In doing so, remove some nasty casts, simplify code a bit:
Dir_MTime can return a modification time, since make does not make
a distinction between out-of-date and non-existent files.
|
|
open hashing.
An interesting optimization is that the open hashing interface is more
fine-grained, hence we can compute the correct hash value at the start
of Dir_FindFile, and reuse it for each hash structure into which we look
(the effect is measurable on large directories along with objdir/VPATH).
Remove a few unnecessary Lst_Open/Lst_Close that serve no purpose except
obfuscating the code.
The interface to dir.h changes slightly, hence tedious includes changes...
|
|
- UNUSED macro that expands to __attribute__((unused)) for gcc
- move rcsid around so that they can be tagged UNUSED.
- activate -Wunused.
- use UNUSED instead of kludgy junk for function arguments.
- add extern to all extern prototypes.
- update comments in lst.h.
- clean up var.c a little bit, constifying arguments, updating comments...
|
|
make -n mode.
Currently works only in sequential make mode. In parallel make mode,
it's just a no-op.
Useful to debug recursive Makefiles, and part of POSIX.
|
|
In particular, Dir_MakeFlags is abusing str_concat, and works much better
with buffers.
|
|
the GNode's context directly. We rename that special Lst to `SymTable *'
in prevision of things to come.
Along the line, we lose the special GNodes affected to VAR_CMD, VAR_GLOBAL,
VAR_ENV, which become simple Lsts... This is not a problem, except when
getting to a context's name for debugging (handled very nicely by
offsetof).
Again, this is a preparatory patch, which does not gain anything except
for cleaning up issues...
Reviewed by millert@ and miod@, like the previous patch
|
|
This patch may seem a bit non-sensical at first. It simply introduces some
new interface. Specifically, recognizes that some variable names
(.TARGET/$@, .OODATE/$?, .ALLSRC/$>, .IMPSRC/$<, .PREFIX/$*, .ARCHIVE/$!,
.MEMBER/$%) are `special' (the actual variables which are local to a
target, e.g. GNode).
Currently, The Varq functions (for Varquick access) are only stubs to the
normal functions.
This fixes a very important detail before proceeding to turn variable lists
into hash tables: if every GNode holds a hash table, initialization times
for those will be very costly. But generic GNodes only hold those seven
special variables... which can be stored directly into a small array;
the only general cases are the environment, the command line and
global variables.
|
|
- audit code for Lst_Datum, it's never applied to an empty pointer,
so check can be removed -> turn into a macro,
- Lst_First, Lst_Last can become macro as well
- specialized version of Lst_Succ (Lst_Adv) to use in loops where it cannot
fail,
- Lst_Open can no longer fail. Trim down corresponding code.
Reviewed millert@, miod@
|
|
Lst_Init (constructor) and Lst_New (allocation + construction)
Lst_Destroy (destructor) and Lst_Delete (deallocation + destruction),
and uses that to turn most dynamic allocation of lists (Lst pointers)
into static structures (LIST).
Most of this is mundane, except for allGNs in targ.c, where the code must
be checked to verify that Targ_Init is called soon enough.
Lst_New is a temporary addition. All lists will soon be static.
Reviewed by millert@, like the previous patch.
|
|
|
|
In fact, it can become a macro based on Lst_ForEachFrom.
This also introduces Lst_Every, as a shortcut for the very common case where
Lst_ForEach does not need any user data.
Finally, make consistent use of a few function typedefs, instead of having
explicit void (*)(Lst) arguments all over the place.
|
|
sense is reversed (Lst_Find returns when proc says 0, whereas Lst_ForEach
goes on while proc says 0).
This patch turns a number of Lst_ForEach into Lst_Find.
Specifically, all Lst_ForEach that actually may return quickly as proc
does not always returns zero.
Of course, the corresponding proc need to be tweaked to swap 0 and 1...
|
|
They serve no purpose, except hiding potential bugs.
In particular, remove (ClientData) cast from macro, showing potentially
troublesome use of Hashes to store time_t.
|
|
Those casts are evil...
|
|
|
|
avoid races.
Make use of basic Unix semantics, namely you can unlink a file while holding
open fd on the data. Avoid all the mess of having to track useless file names
around.
|
|
|
|
Lst_AtEnd, Lst_Concat, Lst_Remove, Lst_Replace.
Don't bother returning one.
|
|
|
|
Get rid of them.
Get rid of list.h, nothing uses it anyway.
|
|
|
|
split the function specific to for.c out, and give them more sensible
arguments at the same time.
This makes .for loop handling more efficient, as we have some heuristic
to evaluate the size of the buffer needed...
|
|
|
|
|
|
make spends time freeing data structures right before exiting.
So don't bother.
Keep the code inside #ifdef, so that it's still there if someone
ever wants to use make code inside a library.
|
|
- don't interfere with MACHINE/MACHINE_ARCH defines for bootstrap
- type clean-up, time_t, and printing `unknown' ints
- fix TARGET/MEMBER bug in archive rules
- memmove...
- cleaner Error handler.
- reentrant brk_string
- .MAKE env variable
- preliminary scaffolding for .NOPATH
Other improvements:
- efree
- shellneed streamlined
- display Stop in .CURDIR after an error.
- document most features and misfeatures.
- add a few OpenBSD notes to the tutorial.
|
|
to simulate a crypt, like login does.
Use SEEK_* not L_* and kill some 0L's used in lseek while we're there.
|
|
|
|
|
|
|
|
|
|
- Merge in FreeBSD and Lite2 changes.
- Fix bug where a non-archive target with a .a suffix would always
be considered to be out of date, since it does not have a TOC.
- Fix NetBSD PR #2930: declare missing variable.
|