OpenBSD CVS

CVS log for src/usr.bin/make/suff.c


[BACK] Up to [local] / src / usr.bin / make

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.103 / (download) - annotate - [select for diffs], Mon Sep 4 11:35:11 2023 UTC (8 months, 2 weeks ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, HEAD
Changes since 1.102: +1 -2 lines
Diff to previous 1.102 (colored)

GC old code that was originally implemented to facilitate adoption by
other BSDs, which never happened, so make things simpler for further
development.

Ditches config.h entirely since it gets reduced to 2 defines.

okay tb@

Revision 1.102 / (download) - annotate - [select for diffs], Mon Jan 13 15:41:53 2020 UTC (4 years, 4 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.101: +1 -2 lines
Diff to previous 1.101 (colored)

make the choice of engine explicit

simplify the running of .BEGIN/.END so that they pass through the engine
first (so they can now have dependencies). Error out properly if .BEGIN/.END
fails.

Revision 1.101 / (download) - annotate - [select for diffs], Mon Jan 13 14:07:35 2020 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.100: +3 -3 lines
Diff to previous 1.100 (colored)

concept borrowed from netbsd: turns out SPECIAL_SOURCE/TARGET is no longer
needed, because if we're special it's a target, if we have special_op,
it's a source.

There's just SPECIAL_WAIT which requires funny handling anyhow

Revision 1.100 / (download) - annotate - [select for diffs], Mon Jan 13 14:05:21 2020 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.99: +17 -207 lines
Diff to previous 1.99 (colored)

move a large chunk of suff.c into its own file (independent functions which
are not really directly related to suffix handling), so that I can eventually
understand how this whole thing works.

Revision 1.99 / (download) - annotate - [select for diffs], Mon Jan 13 14:03:12 2020 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.98: +12 -53 lines
Diff to previous 1.98 (colored)

move documentation around to be more specific to suff.c
Rename Suff_ClearSuffixes to the more explicit Suff_DisableAllSuffixes
which describes accurately what this function actually does.

remove outdated comments about .INCLUDE/.LIBS

Revision 1.98 / (download) - annotate - [select for diffs], Sat Dec 21 15:31:54 2019 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.97: +4 -4 lines
Diff to previous 1.97 (colored)

yet another mostly cosmetic diff
- rename context into localvars, which is more meaningful and less generic
- instantiate the random rumbling at the start of gnode.h with actual
variable names
- explain and group gnode.h variables better
- make some comments terser/more meaningful

okay millert@

Revision 1.97 / (download) - annotate - [select for diffs], Sat Dec 21 15:29:25 2019 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.96: +9 -9 lines
Diff to previous 1.96 (colored)

rename a few variable/functions to have better names.
adjust comments to be more meaningful
reorder predecessors/successors fields in an order that
makes more sense to me.

okay millert@

Revision 1.96 / (download) - annotate - [select for diffs], Sat Dec 21 15:28:17 2019 UTC (4 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.95: +2 -2 lines
Diff to previous 1.95 (colored)

rename built_status constants to be less quirky
fold back BEINGMADE and BUILDING which mean the same thing
GC CYCLE/ENDCYCLE

okay millert@

Revision 1.95 / (download) - annotate - [select for diffs], Tue Nov 13 14:51:35 2018 UTC (5 years, 6 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.94: +6 -12 lines
Diff to previous 1.94 (colored)

commit again the cleanup part that didn't break anything
and was ok'd millert@

Revision 1.94 / (download) - annotate - [select for diffs], Mon Oct 8 19:52:53 2018 UTC (5 years, 7 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.93: +14 -11 lines
Diff to previous 1.93 (colored)

back it out for now.

Revision 1.93 / (download) - annotate - [select for diffs], Sat Oct 6 14:00:30 2018 UTC (5 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.92: +12 -15 lines
Diff to previous 1.92 (colored)

fix problem reported by markweston@cock.li

specifically:
- suffix rules for the empty suffix shouldn't be prevented from triggering
by having dependencies.

but this exhibits another issue:
- .PHONY targets shouldn't trigger suffix rules.

(also clean up an utility function)

NetBSD make has got similar modernizations, but the code is entirely
different by now.


okay kn@, millert@

Revision 1.92 / (download) - annotate - [select for diffs], Mon Jul 24 12:07:46 2017 UTC (6 years, 9 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.91: +3 -3 lines
Diff to previous 1.91 (colored)

GC old cruft.
noticed and patch Michael W. Bombardieri

Revision 1.91 / (download) - annotate - [select for diffs], Fri Oct 21 16:12:38 2016 UTC (7 years, 6 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.90: +11 -11 lines
Diff to previous 1.90 (colored)

small obvious cleanups:
- remove a lot of unnecessary casts
- zap extra param that's no longer needed
- add proper prototype and make function static

okay natano@

Revision 1.90 / (download) - annotate - [select for diffs], Fri Jan 23 22:35:58 2015 UTC (9 years, 3 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.89: +2 -2 lines
Diff to previous 1.89 (colored)

a wee little bit more cleanup (more const and remove noise from CDIAGFLAGS...
-pedantic kind of requires -std=c99 here to avoid LL warnings)
okay miod@, millert@

Revision 1.89 / (download) - annotate - [select for diffs], Fri Jan 23 13:18:40 2015 UTC (9 years, 3 months ago) by espie
Branch: MAIN
Changes since 1.88: +5 -5 lines
Diff to previous 1.88 (colored)

remove a bunch of dangerous casts (useless casts from void * to something
else, in some cases by adding extra temporary variables.
IMO, it's much better practice to do

void *a;
int *p = a;
*p = 42;

rather than
void *a;
*(int *)a = 42;

okay miod@... to be revisited for some possible const additions later.

Revision 1.88 / (download) - annotate - [select for diffs], Mon May 12 19:11:19 2014 UTC (10 years ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.87: +2 -2 lines
Diff to previous 1.87 (colored)

adjust to ohash being in libutil now, and to the interface changes.
fix potential integer overflows in memory allocation (mostly for pedagogical
purposes, these are unlikely to overflow in practice)
move the rest of lst.lib stuff into its own directory.

Revision 1.87 / (download) - annotate - [select for diffs], Mon Jan 6 12:08:18 2014 UTC (10 years, 4 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.86: +3 -1 lines
Diff to previous 1.86 (colored)

fix error messages, avoid dereferencing null pointers.
- the code becomes too indented, pull it into a separate function
- add an extra hint, the current_gnode.
- specifically, variables may be expanded during
target: prereq  solving in Suff_FindDeps, this is after parsing,
not during command execution, and the only actual indication with have is
that we're resolving a prereq of.

(this ought to fix mk35, and partially solve mk34)

Revision 1.86 / (download) - annotate - [select for diffs], Fri Nov 22 15:47:35 2013 UTC (10 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.85: +3 -3 lines
Diff to previous 1.85 (colored)

wrappers for is*/to* that make damn sure their arguments are
cast to unsigned chars.

okay deraadt@

Revision 1.85 / (download) - annotate - [select for diffs], Tue Apr 23 14:32:53 2013 UTC (11 years ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.84: +4 -4 lines
Diff to previous 1.84 (colored)

remove TIMESTAMP abstraction layer, prodded by theo.
while there, clean up includes.
use strtoll for ar timestamps (pretty much unused in reality, more
standard conforming than anything)

use idea from Todd to adapt to time_t being 32 bits OR 64 bits
(pedantically correct: INT_MIN would work just fine up to 1910 or so...)

okay millert@, gone thru a make build.

Revision 1.84 / (download) - annotate - [select for diffs], Sat Dec 22 19:02:05 2012 UTC (11 years, 4 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.83: +57 -74 lines
Diff to previous 1.83 (colored)

cosmetic changes:
- pref -> prefix   as pref is somewhat ambiguous
- rework tests so loop doesn't intend off the screen
- zap unneeded variable
okay krw@

Revision 1.83 / (download) - annotate - [select for diffs], Thu Dec 6 10:33:16 2012 UTC (11 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.82: +1 -3 lines
Diff to previous 1.82 (colored)

old code is gone, remove comments and prototypes

Revision 1.82 / (download) - annotate - [select for diffs], Tue Oct 9 19:45:34 2012 UTC (11 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.81: +4 -9 lines
Diff to previous 1.81 (colored)

- SPECIAL_DEPRECATED -> SPECIAL_NOTHING
- nodes for .POSIX and .SCCS_GET (which don't do anything)
- zap remaining suffix crud.

new scaffolding:
- groupling list and HELDBACK state to avoid races in engine.
- parser recognizes lists of targets that shoul be grouped together
- OP_DOUBLE to mark nodes that have multiple lists of commands

Revision 1.81 / (download) - annotate - [select for diffs], Tue Oct 2 10:29:31 2012 UTC (11 years, 7 months ago) by espie
Branch: MAIN
Changes since 1.80: +94 -255 lines
Diff to previous 1.80 (colored)

more changes, discussed and tested by various people.
- put back some job control, turns out it's necessary when we don't run a
shell.
- zap old #ifdef CLEANUP code... probably doesn't even compile.
- kill most of the OP_LIB code. Just keep a wee little bit for compatibility
(deprecated .LIBS and .INCLUDES, warns for weird dependencies instead of
erroring out).
- much improved debugging and -p output: sort variables, targets, rules,
output stuff in a nicer format mimicing input.
- better error message when no command is found, explain where the target comes from.
- sort final error list by file.
- show system files in errors as <bsd.prog.mk>
- reincorporate random delay, that was dropped
- optimize siginfo output by not regenerating the whole string each time.
- finish zapping old LocationInfo field that's no longer used.

Revision 1.80 / (download) - annotate - [select for diffs], Sat Apr 21 04:35:32 2012 UTC (12 years, 1 month ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.79: +20 -18 lines
Diff to previous 1.79 (colored)

When a new parent is attached to an already examined child (prerequisite),
use the same logic to update the parent (factored out as SuffLinkParent())
as is used for updating the original parent.  Fixes the "make -j2" problem
reported by tedu@ at c2k11

ok espie@

Revision 1.79 / (download) - annotate - [select for diffs], Mon Jul 19 19:46:44 2010 UTC (13 years, 10 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.78: +1 -2 lines
Diff to previous 1.78 (colored)

Correct $OpenBSD$ stuff

Revision 1.78 / (download) - annotate - [select for diffs], Sun Apr 25 13:59:53 2010 UTC (14 years ago) by espie
Branch: MAIN
Changes since 1.77: +4 -4 lines
Diff to previous 1.77 (colored)

pure whitespace cleanup

Revision 1.77 / (download) - annotate - [select for diffs], Sat Nov 24 15:41:01 2007 UTC (16 years, 5 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.76: +28 -27 lines
Diff to previous 1.76 (colored)

more parallel make fixes.

Preparations to fix the engine:
- new function has_been_built(gn), that tells you what's the status of
a given node. Allows us to run Suff_FindDeps later, by updating the number
of unmade children correctly.
- take out the code that handles shell expansions in an expand_children*
set of functions, called by Suff_FindDeps, among others. These must be
called early in the engine to avoid creating bogus nodes.

Engine fixes:
- take the predecessor/successor special handling out, deal with it in
separate functions.
- don't count nodes. Explicitly track them all in a hash table (better
way to deal with non-built issues).
- don't run Suff_FindDeps at start, but just before building an actual node.
This allows make to find all dependencies correctly, as in groff.

Pfiou! now it works.

Revision 1.76 / (download) - annotate - [select for diffs], Sat Nov 17 16:39:45 2007 UTC (16 years, 6 months ago) by espie
Branch: MAIN
Changes since 1.75: +14 -14 lines
Diff to previous 1.75 (colored)

simplify dynamic variable handling a great deal:
first remove all usage of Varq_Append by building the string directly.
then replace `common' handling with specialized handling for dynamic
strings (since they no longer need a buffer). Finally, identify the place
where the variable value needs to be copied because it's going to be free'd
or erased soon, and finally, use simple char* pointers.

Shaves about 80 bytes off every gnode structure, and kills quite a few
unnecessary malloc()s as well.

Revision 1.75 / (download) - annotate - [select for diffs], Tue Nov 6 21:15:19 2007 UTC (16 years, 6 months ago) by espie
Branch: MAIN
Changes since 1.74: +1 -1 lines
Diff to previous 1.74 (colored)

bug-fix: try the empty suffix when we cannot find any transformation, not
when we cannot find any suffix.

This allows Makefiles like:

.SUFFIXES: .in .sh

all: truc.sh

truc.sh.in:
	echo "bonjour" >$@

.in:
	sed -e 's/a/b/' <$< >$@


to work (before that, the empty suffix would not be tried, since truc.sh
matches the .sh suffix, even though there is NO transformation).

Revision 1.74 / (download) - annotate - [select for diffs], Tue Nov 6 21:12:23 2007 UTC (16 years, 6 months ago) by espie
Branch: MAIN
Changes since 1.73: +4 -5 lines
Diff to previous 1.73 (colored)

simplify the way we deal with implicit rules and handle $<.

Having an `iParents' field is actually backwards, it's ways simpler to
store the pointer in the child, as an impliedsrc, and to set the variable
just in time along with all the rest in DoAllVar.

This is simpler, and it should allow us to call SuffFindDeps much later.

Revision 1.73 / (download) - annotate - [select for diffs], Fri Nov 2 17:27:24 2007 UTC (16 years, 6 months ago) by espie
Branch: MAIN
Changes since 1.72: +2 -1 lines
Diff to previous 1.72 (colored)

Work done at p2k7.


This is a really big step towards getting parallel make to work.


Note that this is not yet complete. There are still a few `details' to
fix before this works 100%.  Specifically: sequential make (compat) and
parallel make don't use the same engine, and the parallel engine still
has a few limitations. For instance, some known issues:
- parallel make does not deal with .phony targets correctly all the time.
- some errors are deadly in parallel make mode.
- parallel make NEEDS way more sturdy correspondance of file system paths
and target names, since it often needs to match dependencies to targets
before the corresponding files exist.
- some local variables like $* get set in a bogus way in some cases.
- suffix handling has issues, especially related to the NULL suffix.
So, if you find stuff that does NOT yet work with parallel make, don't go
blindly try to fix the Makefile. It's very likely you might have stumbled
into a make bug. (unless you really, really, understand Makefiles, DON'T
GO CHANGING THEM YET).



Tested by lots of people, thanks go to miod@, and robert@ among other people.

Quick summary of what this does:

- remove `saving commands' extension (it's not really usable, nor used)
- move compat job runner and parallel interrupt handling into engine.c
- tweak the code so that both compat and parallel mode use the same job runner
and the same interrupt handling. Remove the other one.
- optimize job runner so that, in parallel mode, the last command does not
fork if we can avoid it (as it's already running in a sub shell).
- scrape all the code that dealt with creating shell scripts from commands.
- scrape all the code that dealt with recognizing special sequences in
command output to print/not print output.
- fix the parallel job pipe to not keep around file descriptors that are not
needed.
- replace the parallel job buffering with a nicer one, that deals with
non-blocking descriptors to try to agregate as much output from one job in
one go (greed) to unconfuse the users.
- create two pipes per job, so that stdout and stderr stay separate.
- make job token printing a debug option.
- always use the parallel job-runner to `execute' commands, even if we just
print them out.
- store list of errors encountered during parallel make running, and print them
on exit, so that we know what went wrong.
- add a dirty hack to targ.c to deal with paths produced by gccmakedep.

Revision 1.72 / (download) - annotate - [select for diffs], Tue Sep 18 09:15:04 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.71: +60 -59 lines
Diff to previous 1.71 (colored)

better comments, sNum -> order. SUFF_EXISTS -> SUFF_ACTIVE

Revision 1.71 / (download) - annotate - [select for diffs], Tue Sep 18 08:31:15 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.70: +2 -2 lines
Diff to previous 1.70 (colored)

make -DCLEANUP compile again

Revision 1.70 / (download) - annotate - [select for diffs], Mon Sep 17 12:42:09 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.69: +639 -723 lines
Diff to previous 1.69 (colored)

rewrite of the basic suffix/target parsing: use hash for suffixes.

Store special targets in target hash, and use them for the parsing.

Use OP_DUMMY flag to mark targets that don't really exist yet, such
as interrupt and default nodes.

Also, .PATHxxx is special in suffixes.

Small tweaks to compat.c, so that run_commands does more stuff after
the fork() (and thus no need to free things).

Remove distinction between local and global jobs.

Revision 1.69 / (download) - annotate - [select for diffs], Mon Sep 17 11:43:12 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.68: +2 -2 lines
Diff to previous 1.68 (colored)

remove prototypes that now live in engine.h, adjust suff.c accordingly

Revision 1.68 / (download) - annotate - [select for diffs], Mon Sep 17 10:12:35 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.67: +2 -2 lines
Diff to previous 1.67 (colored)

reindent garray.h, add new function, to be used later

Revision 1.67 / (download) - annotate - [select for diffs], Mon Sep 17 09:28:36 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.66: +12 -12 lines
Diff to previous 1.66 (colored)

kill extra spaces at end of line

Revision 1.66 / (download) - annotate - [select for diffs], Mon Sep 17 09:16:58 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.65: +1127 -1107 lines
Diff to previous 1.65 (colored)

reindent

Revision 1.65 / (download) - annotate - [select for diffs], Mon Sep 17 08:36:57 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.64: +4 -4 lines
Diff to previous 1.64 (colored)

kill += 1, -= 1     -> ++, --

Revision 1.64 / (download) - annotate - [select for diffs], Sun Sep 16 12:30:35 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.63: +7 -7 lines
Diff to previous 1.63 (colored)

rename dirSearchPath -> defaultPath, and openDirectories -> knownDirectories

Revision 1.63 / (download) - annotate - [select for diffs], Sun Sep 16 10:14:26 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.62: +2 -1 lines
Diff to previous 1.62 (colored)

cut up dir.c into dir.c/direxpand.c as there is very little interface between
two modules that do different things.

Revision 1.62 / (download) - annotate - [select for diffs], Sun Sep 16 09:49:24 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.61: +1 -5 lines
Diff to previous 1.61 (colored)

more dead code: we always define LIBRARIES and INCLUDES

Revision 1.61 / (download) - annotate - [select for diffs], Sun Sep 16 09:46:14 2007 UTC (16 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.60: +0 -0 lines
Diff to previous 1.60 (colored)

remove dead code: #define RECHECK is always on

Revision 1.60 / (download) - annotate - [select for diffs], Mon Jul 30 09:51:53 2007 UTC (16 years, 9 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.59: +2 -2 lines
Diff to previous 1.59 (colored)

everywhere except in Var_Parse, we always add/append variables to the
VAR_GLOBAL context, so make it the common case: rename the basic functions
to Var_Set_with_ctxt/Var_Append_with_ctxt, define Var_Set and Var_Append
as macros that specify VAR_GLOBAL, and use these.

okay miod@

Revision 1.59 / (download) - annotate - [select for diffs], Tue Jul 24 18:58:48 2007 UTC (16 years, 9 months ago) by espie
Branch: MAIN
Changes since 1.58: +0 -0 lines
Diff to previous 1.58 (colored)

simplify computations in the var module: instead of advancing a char *
and keeping track of a length, we just advance the char *, and ditch
the length. We can still get the length at the end of the top-level
functions to satisfy existing interfaces.

Much simpler code, less error-prone.

Okay millert@

Revision 1.58 / (download) - annotate - [select for diffs], Tue Jul 24 18:56:15 2007 UTC (16 years, 9 months ago) by espie
Branch: MAIN
Changes since 1.57: +0 -0 lines
Diff to previous 1.57 (colored)

move the code that grabs a value in Var_Parse in its own function,
get_expanded_value.

Extend the code a bit to be much more thorough in case of a recursive
expansion: shows exactly the cycle of variable names involved.

okay millert@

Revision 1.57 / (download) - annotate - [select for diffs], Tue Jul 24 18:52:47 2007 UTC (16 years, 9 months ago) by espie
Branch: MAIN
Changes since 1.56: +2 -2 lines
Diff to previous 1.56 (colored)

change Var_ParseSkip API to increment the position instead of returning a
length, simplifies code.

(warns a bit, symptom of some further issues to fix).

okay millert@

Revision 1.56 / (download) - annotate - [select for diffs], Sun Sep 24 09:04:05 2006 UTC (17 years, 7 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.55: +17 -20 lines
Diff to previous 1.55 (colored)

revert for now, this breaks stuff elsewhere...

Revision 1.55 / (download) - annotate - [select for diffs], Sun Sep 17 19:03:15 2006 UTC (17 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.54: +21 -18 lines
Diff to previous 1.54 (colored)

on .SUFFIXES: <empty>
also reset one-suffix rules.

Revision 1.54 / (download) - annotate - [select for diffs], Mon Nov 29 06:20:03 2004 UTC (19 years, 5 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.53: +2 -2 lines
Diff to previous 1.53 (colored)

Spell precede correctly.
'looks fine' millert@, krw@. ok jmc@

Revision 1.53 / (download) - annotate - [select for diffs], Sat Jun 19 13:34:30 2004 UTC (19 years, 11 months ago) by robert
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.52: +3 -2 lines
Diff to previous 1.52 (colored)

avoid a null pointer dereference if the .DEFAULT target has no commands;
ok espie@

Revision 1.52 / (download) - annotate - [select for diffs], Wed May 5 09:10:47 2004 UTC (20 years ago) by espie
Branch: MAIN
Changes since 1.51: +48 -46 lines
Diff to previous 1.51 (colored)

constify char *.
Add lookup functions for suffixes and transforms, and stat them.
okay otto@

Revision 1.51 / (download) - annotate - [select for diffs], Wed Apr 7 13:11:36 2004 UTC (20 years, 1 month ago) by espie
Branch: MAIN
Changes since 1.50: +69 -108 lines
Diff to previous 1.50 (colored)

ISO function declarations, trim a few comments, rename a few variables to
more explicit/more consistent names.

okay otto@

Revision 1.50 / (download) - annotate - [select for diffs], Tue Jun 3 02:56:12 2003 UTC (20 years, 11 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.49: +2 -6 lines
Diff to previous 1.49 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.49 / (download) - annotate - [select for diffs], Tue Feb 26 14:33:45 2002 UTC (22 years, 2 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.48: +3 -1 lines
Diff to previous 1.48 (colored)

close PR 2311

Revision 1.48 / (download) - annotate - [select for diffs], Fri Nov 23 23:42:45 2001 UTC (22 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.47: +0 -2 lines
Diff to previous 1.47 (colored)

back out changes that break kernel compiles.  good testing jobmk install!

Revision 1.47 / (download) - annotate - [select for diffs], Thu Nov 22 21:18:10 2001 UTC (22 years, 6 months ago) by espie
Branch: MAIN
Changes since 1.46: +3 -1 lines
Diff to previous 1.46 (colored)

Explicitly mark nodes whose commands have been filled with
implicit (suffix) rules.  Then, only expand the IMPSRC/< variable
if the node has been marked.

This matches what Single Unix 2 and common sense say: implicit rules
shouldn't count when an explicit rule has been found (an explicit rule
being a full-scale dependency, with some associated commands)

Note that Single Unix leaves the `PREFIX' question open, so we leave
the PREFIX code as it is.

This fixes regression case mk14, which now fails as it should.

This is just a bug-fix. Some more correct (and faster) code should
probably be substituted. Namely, right now, the suffix code is too
greedy, whereas it should test for explicit rules earlier, and not
even bother instantiating implicit rules from templates when they
duplicate actual existing rules.

ok millert@

Revision 1.46 / (download) - annotate - [select for diffs], Sun Nov 11 12:35:03 2001 UTC (22 years, 6 months ago) by espie
Branch: MAIN
Changes since 1.45: +5 -5 lines
Diff to previous 1.45 (colored)

Fixed version... don't see how this could work on i386, since it didn't
initialize create in main.c.

Revision 1.45 / (download) - annotate - [select for diffs], Sun Nov 11 06:02:06 2001 UTC (22 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.44: +4 -4 lines
Diff to previous 1.44 (colored)

undo changes that crash on (at least) the alpha

Revision 1.44 / (download) - annotate - [select for diffs], Sun Nov 11 01:19:23 2001 UTC (22 years, 6 months ago) by espie
Branch: MAIN
Changes since 1.43: +5 -5 lines
Diff to previous 1.43 (colored)

Redo LstInit as a macro: smaller and faster code in all cases, zeroing two
pointers is simpler than calling a function.
Recognize purely static lst headers, which don't really need any
initialization.
ok miod@

Revision 1.43 / (download) - annotate - [select for diffs], Tue May 29 12:53:43 2001 UTC (22 years, 11 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.42: +2 -1 lines
Diff to previous 1.42 (colored)

Take includes out of lst.h, re-add what's needed to separate files.
Removes remaining lint stuff from lst.lib.

Revision 1.42 / (download) - annotate - [select for diffs], Wed May 23 12:34:49 2001 UTC (23 years ago) by espie
Branch: MAIN
Changes since 1.41: +68 -56 lines
Diff to previous 1.41 (colored)

Mostly clean-up:
- 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).

Revision 1.41 / (download) - annotate - [select for diffs], Thu May 3 13:41:11 2001 UTC (23 years ago) by espie
Branch: MAIN
Changes since 1.40: +620 -822 lines
Diff to previous 1.40 (colored)

Synch with my current work.
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...

Revision 1.40 / (download) - annotate - [select for diffs], Fri Nov 24 14:27:20 2000 UTC (23 years, 5 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.39: +5 -5 lines
Diff to previous 1.39 (colored)

Clean-ups:
* Buf_Destroy can be a macro
* X_ instead of _X for struct names, to avoid infringing on the system's
namespace.
* better wildcard detection heuristics
* fix #ifdef CLEANUP code
* a few comments

Revision 1.39 / (download) - annotate - [select for diffs], Wed Nov 22 17:22:28 2000 UTC (23 years, 6 months ago) by espie
Branch: MAIN
Changes since 1.38: +12 -5 lines
Diff to previous 1.38 (colored)

Don't use light-weight Lst_ForEach when the list is going away from under
us. Need to cache the `next' pointer instead.

Do this manually, as adding a new function for one place in make where it's
needed is a bit icky, especially since suff.c's code might get cleaned up
at some point.

Bug reported by Niels.

Revision 1.38 / (download) - annotate - [select for diffs], Thu Sep 14 13:46:45 2000 UTC (23 years, 8 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8
Changes since 1.37: +4 -3 lines
Diff to previous 1.37 (colored)

Replace the old hash used to hold file names within a directory with
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...

Revision 1.37 / (download) - annotate - [select for diffs], Thu Sep 14 13:40:03 2000 UTC (23 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.36: +3 -3 lines
Diff to previous 1.36 (colored)

Use the new hash scheme to store the target nodes.
Scrap the list of all targets: it only slows make down.
The only visible difference is that the list of all targets is not
shown in order when debugging.

Revision 1.36 / (download) - annotate - [select for diffs], Thu Sep 14 13:32:07 2000 UTC (23 years, 8 months ago) by espie
Branch: MAIN
Changes since 1.35: +10 -44 lines
Diff to previous 1.35 (colored)

Some systematic clean-up.
- 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...

Revision 1.35 / (download) - annotate - [select for diffs], Fri Jun 23 16:41:53 2000 UTC (23 years, 11 months ago) by espie
Branch: MAIN
Changes since 1.34: +3 -3 lines
Diff to previous 1.34 (colored)

This patch replaces str_concat with a slightly unobfuscated version.

In particular, Dir_MakeFlags is abusing str_concat, and works much better
with buffers.

Revision 1.34 / (download) - annotate - [select for diffs], Fri Jun 23 16:21:43 2000 UTC (23 years, 11 months ago) by espie
Branch: MAIN
Changes since 1.33: +5 -13 lines
Diff to previous 1.33 (colored)

In various places, VAR_CMD is used to actually mean `no real context',
since lookup will start with VAR_CMD in any case.
This fixes VarFind and Var_Parse to handle ctxt == NULL correctly, and
replace those confusing VAR_CMD with proper NULL pointers.

This patch also handles three small details:
- .CURDIR is necessarily set in VAR_GLOBAL,
- suffix handling for archives copies two hard-coded variables, for
which it can use a quick path,
- typos in TargFreeGN.

Reviewed millert@, miod@.

Revision 1.33 / (download) - annotate - [select for diffs], Fri Jun 23 16:20:01 2000 UTC (23 years, 11 months ago) by espie
Branch: MAIN
Changes since 1.32: +6 -6 lines
Diff to previous 1.32 (colored)

Once those special variable are taken care of, other Var functions can take
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

Revision 1.32 / (download) - annotate - [select for diffs], Fri Jun 23 16:18:09 2000 UTC (23 years, 11 months ago) by espie
Branch: MAIN
Changes since 1.31: +13 -13 lines
Diff to previous 1.31 (colored)

Start of variable fixes and speed-ups.

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.

Revision 1.31 / (download) - annotate - [select for diffs], Fri Jun 23 16:15:50 2000 UTC (23 years, 11 months ago) by espie
Branch: MAIN
Changes since 1.30: +18 -23 lines
Diff to previous 1.30 (colored)

Trivial consequences of the previous list changes:

- 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@

Revision 1.30 / (download) - annotate - [select for diffs], Sat Jun 17 14:43:36 2000 UTC (23 years, 11 months ago) by espie
Branch: MAIN
Changes since 1.29: +75 -88 lines
Diff to previous 1.29 (colored)

This removes the few instances of Lst_New left.
- replaces Lst_Duplicate with Lst_Clone, which does not allocate storage
- split Lst_Concat into Lst_Concat/Lst_ConcatDestroy
Thus, all the LstValid checks are gone, since we always invoke list
functions with valid pointers.

Note that dynamic list allocation accounted for roughly 20% of all calls
to malloc.  The extraneous calls to malloc left are now mostly in parse.c,
which makes some wasteful usage of temporary buffers.

With those few patches, the code is sturdier, and easier to maintain.

Reviewed by millert@

Revision 1.29 / (download) - annotate - [select for diffs], Sat Jun 17 14:38:19 2000 UTC (23 years, 11 months ago) by espie
Branch: MAIN
Changes since 1.28: +136 -143 lines
Diff to previous 1.28 (colored)

This patch introduces a distinction between
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.

Revision 1.28 / (download) - annotate - [select for diffs], Sat Jun 10 01:41:06 2000 UTC (23 years, 11 months ago) by espie
Branch: MAIN
Changes since 1.27: +46 -46 lines
Diff to previous 1.27 (colored)

Clean-up patch: use `void *' instead of old-fashioned ClientData/Address.

Revision 1.27 / (download) - annotate - [select for diffs], Sat Jun 10 01:32:23 2000 UTC (23 years, 11 months ago) by espie
Branch: MAIN
Changes since 1.26: +78 -117 lines
Diff to previous 1.26 (colored)

Thus, Lst_ForEach no longer needs returning a status.
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.

Revision 1.26 / (download) - annotate - [select for diffs], Sat Jun 10 01:26:37 2000 UTC (23 years, 11 months ago) by espie
Branch: MAIN
Changes since 1.25: +3 -3 lines
Diff to previous 1.25 (colored)

Lst_Find and Lst_ForEach do the same thing, except that the comparison
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...

Revision 1.25 / (download) - annotate - [select for diffs], Sun Mar 26 16:21:33 2000 UTC (24 years, 1 month ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.24: +74 -78 lines
Diff to previous 1.24 (colored)

Remove idiotic, braindead casts T* -> void*
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.

Revision 1.24 / (download) - annotate - [select for diffs], Sun Mar 26 15:51:31 2000 UTC (24 years, 1 month ago) by espie
Branch: MAIN
Changes since 1.23: +10 -65 lines
Diff to previous 1.23 (colored)

Remove refCount for suffixes.
- suffixes can't be removed from suffList except when an explicit reset
is seen, e.g.,
.SUFFIXES:

This actually occurs seldom enough that the very small memory gain does
not justify the extra code and added complexity.

(Removing suffixes at other times, as the old code used to do, is a bug)

Revision 1.23 / (download) - annotate - [select for diffs], Tue Mar 14 19:00:32 2000 UTC (24 years, 2 months ago) by espie
Branch: MAIN
Changes since 1.22: +4 -2 lines
Diff to previous 1.22 (colored)

Disable suffix removal for now, as it's buggy.

*If* refcounting is to be useful, the actual erasure of suffixes data
should occur when stuff is moved from the suffList to the cleanList, and
it's not at all clear whether all the extra baggage is actually any use.
How many suffixes are we talking about anyway ?

This lets gnupg build correctly without gnu-make.

Revision 1.22 / (download) - annotate - [select for diffs], Sat Jan 8 09:45:15 2000 UTC (24 years, 4 months ago) by espie
Branch: MAIN
Changes since 1.21: +3 -3 lines
Diff to previous 1.21 (colored)

Finish changing all Var_Parse arguments to size_t. Thanks to millert@
for reminding me.

Revision 1.21 / (download) - annotate - [select for diffs], Sun Dec 19 00:04:25 1999 UTC (24 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.20: +21 -21 lines
Diff to previous 1.20 (colored)

Rearrange Lst_Find interface to conform better with other functions.

Revision 1.20 / (download) - annotate - [select for diffs], Sat Dec 18 21:58:07 1999 UTC (24 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.19: +30 -30 lines
Diff to previous 1.19 (colored)

Nothing ever checks ReturnStatus on Lst_Insert, Lst_Append, Lst_AtFront,
Lst_AtEnd, Lst_Concat, Lst_Remove, Lst_Replace.

Don't bother returning one.

Revision 1.19 / (download) - annotate - [select for diffs], Sat Dec 18 21:56:07 1999 UTC (24 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.18: +6 -14 lines
Diff to previous 1.18 (colored)

Lst_DeQueue already checks for empty lists.

Revision 1.18 / (download) - annotate - [select for diffs], Sat Dec 18 21:53:33 1999 UTC (24 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.17: +50 -50 lines
Diff to previous 1.17 (colored)

NIL, NILGNODE, etc, are only glorified NULL.
Get rid of them.

Get rid of list.h, nothing uses it anyway.

Revision 1.17 / (download) - annotate - [select for diffs], Sat Dec 18 02:11:27 1999 UTC (24 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.16: +28 -28 lines
Diff to previous 1.16 (colored)

make does not use circular lists, get rid of the extra weight.

Revision 1.16 / (download) - annotate - [select for diffs], Thu Dec 16 17:27:18 1999 UTC (24 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.15: +3 -3 lines
Diff to previous 1.15 (colored)

Var_Subst is actually two distinct functions folded into one:
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...

Revision 1.15 / (download) - annotate - [select for diffs], Mon Dec 6 22:28:44 1999 UTC (24 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.14: +3 -5 lines
Diff to previous 1.14 (colored)

Extra parameter no longer needed, ditch.

Revision 1.14 / (download) - annotate - [select for diffs], Tue Oct 5 22:06:24 1999 UTC (24 years, 7 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_2_6_BASE, OPENBSD_2_6
Changes since 1.13: +10 -2 lines
Diff to previous 1.13 (colored)

Efficiency patch from NetBSD:
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.

Revision 1.13 / (download) - annotate - [select for diffs], Sat Mar 6 20:27:40 1999 UTC (25 years, 2 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5
Changes since 1.12: +2 -7 lines
Diff to previous 1.12 (colored)

back out changes that should not have escaped my local tree

Revision 1.12 / (download) - annotate - [select for diffs], Sat Mar 6 20:19:20 1999 UTC (25 years, 2 months ago) by millert
Branch: MAIN
Changes since 1.11: +9 -4 lines
Diff to previous 1.11 (colored)

add missing reference to infocmp

Revision 1.11 / (download) - annotate - [select for diffs], Sat Dec 5 00:06:29 1998 UTC (25 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.10: +3 -6 lines
Diff to previous 1.10 (colored)

Modifications from netbsd:
- 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.

Revision 1.10 / (download) - annotate - [select for diffs], Fri Jul 3 18:51:14 1998 UTC (25 years, 10 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_4_BASE, OPENBSD_2_4
Changes since 1.9: +18 -8 lines
Diff to previous 1.9 (colored)

Better fix from Christos:
    deleting a suffix that has 0 source references causes core-dump.
    Fix: when an unused suffix gets removed, delete it from the suffix list.
There is still, however a duplicate free(), which I work around by passing
the Suffix back as a return value to SuffRemove() (it gets set to NULL
when the suffix is freed).  This is probably not the best way to fix this.

Revision 1.9 / (download) - annotate - [select for diffs], Thu Jul 2 21:32:10 1998 UTC (25 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.8: +4 -4 lines
Diff to previous 1.8 (colored)

Check against suffNull, not the contents of name

Revision 1.8 / (download) - annotate - [select for diffs], Thu Jul 2 21:25:40 1998 UTC (25 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.7: +7 -5 lines
Diff to previous 1.7 (colored)

better fix; may be a small memory leak though

Revision 1.7 / (download) - annotate - [select for diffs], Thu Jul 2 21:00:05 1998 UTC (25 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.6: +2 -8 lines
Diff to previous 1.6 (colored)

back out last patch; it causes incorrect behavior

Revision 1.6 / (download) - annotate - [select for diffs], Thu Jul 2 20:47:28 1998 UTC (25 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.5: +10 -2 lines
Diff to previous 1.5 (colored)

Fix a bug where make gets confused by targets beginning with a period (``.'')
and tried to do a suffix conversion, following a NULL pointer in the
proccess.  Also add some sanity checks so we don't blindly assume
strchr returns non-NULL.

Revision 1.5 / (download) - annotate - [select for diffs], Sat Nov 30 21:09:04 1996 UTC (27 years, 5 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE, OPENBSD_2_3, OPENBSD_2_2_BASE, OPENBSD_2_2, OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.4: +43 -43 lines
Diff to previous 1.4 (colored)

Sync with NetBSD:
- 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.

Revision 1.4 / (download) - annotate - [select for diffs], Mon Sep 2 16:04:19 1996 UTC (27 years, 8 months ago) by briggs
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.3: +12 -12 lines
Diff to previous 1.3 (colored)

Sync up with NetBSD:
(christos)
	Fix bug reported by Greg Hudson where leaf (source only) nodes were
	referenced only by their basename and not by their full pathname. This
	breaks when .PATH or MAKEOBJDIR are used. There might be Makefiles
	around that try to work around this bug by prepending ${.CURDIR} to
	the sources, and they should be found and fixed. Also a lot of the gunk
	in suff.c that was attempting to work around the same problem could be
	removed.
(christos)
	- Move -D flags from Makefile to config.h and explain what they do. Add
	  -Wall -Wno-unused to CFLAGS. Add new define SYSVVARSUB to enable SysV
	  style variable substitutions and enable them.
	- Add SunOS style command substitutions via SUNSHCMD
	- Fix core dump with '{variable = value'
(christos)
	Fix bug where make will always exit with 0, even when one or more
	parallel jobs failed. (Only affects parallel make code)
(christos)
	Protect __P from being multiply defined (for systems that already
	define it)
(christos) Add strdup() since ultrix is missing it.
	From Larry Schwimmer <rosebud@cyclone.Stanford.EDU>
(christos) Add estrdup(), a checked version of strdup and use it.
(christos) Recognize SVR4 style long filename entries in archives.
(thorpej) Tidy up some RCS ids a bit.

Revision 1.3 / (download) - annotate - [select for diffs], Wed Jun 26 05:36:38 1996 UTC (27 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.2: +2 -1 lines
Diff to previous 1.2 (colored)

rcsid

Revision 1.2 / (download) - annotate - [select for diffs], Thu Dec 14 03:23:38 1995 UTC (28 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.1: +20 -9 lines
Diff to previous 1.1 (colored)

from christos@netbsd:
Minor:
    - ${.PREFIX} should never contain a full pathname
    - Fixed gcc -Wall warnings
Major:
    - compatMake is now FALSE. This means that we are now running in
      full pmake mode:
          * rules on dependency lines can be executed in parallel and or
            out of sequence:

            foo: bar baz

            can fire the rule for baz before the rule for bar is fired.
            To enforce bar to be fired before baz, another rule needs to be
            added. [bar: baz]
          * adjacent shell commands in a target are now executed by a single
            invocation of the shell, not one invocation of the shell per line
      (compatMake can be turned off using the -B flag)
    - The -j flag now works... I.e. make -j 4 will fork up to four jobs in
      parallel when it can. The target name is printed before each burst
      of output caused by the target execution as '--- target ---', when j > 1
    - I have changed all the Makefiles so that they work with make -j N, and
      I have tested the whole netbsd by:
          'make -j 4 cleandir; make -j 4 depend; make -j 4; make -j 4 install'
    - I have not compiled or tested this version of make with -DREMOTE.
- Turn compat mode on by default. It gets turned off when the -j without
  the -B flag is specified. [Thus you can use -j 1 to turn it off].
- Fix malloc -> emalloc as Gordon noted.
Updates for POSIX/SVR4 compiling:
arch.c:          Don't require ranlib stuff. Not everybody has it.
dir.c:           SunOS-4 != Solaris; change #ifdef sun to #if sun && !__svr4__
job.c, compat.c: Don't use 'union wait', use int and the W*() macros.
main.c:          Check for uname() == -1; some unames return > 0...
util.c, job.c:   Add signal() with BSD semantics for svr4, don't use bsd
                 sigmask and friends.

from cgd@netbsd:
pull in make.h.  (PAlloc() now uses emalloc(), which is prototyped in
make.h.  If the prototype is not in scope on the Alpha, I see lots
of "cast to pointer from integer of different size" warnings.)

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:45:43 1995 UTC (28 years, 7 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:45:43 1995 UTC (28 years, 7 months ago) by deraadt
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.