DragonFly BSD

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

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

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.146: download - view: text, markup, annotated - select for diffs
Fri Jan 19 07:23:43 2007 UTC (7 years, 2 months ago) by dillon
Branches: MAIN
CVS tags: HEAD, DragonFly_RELEASE_2_0_Slip, DragonFly_RELEASE_2_0, DragonFly_RELEASE_1_8_Slip, DragonFly_RELEASE_1_8, DragonFly_RELEASE_1_12_Slip, DragonFly_RELEASE_1_12, DragonFly_RELEASE_1_10_Slip, DragonFly_RELEASE_1_10, DragonFly_Preview
Diff to: previous 1.145: preferred, unified
Changes since revision 1.145: +21 -25 lines
Rename /usr/src/sys/machine to /usr/src/sys/platform.  Give the platform
name its own variable, MACHINE_PLATFORM, instead of trying to use MACHINE
to name it.  Adjust the build infrastructure to match.

Revert MACHINE back to its original definition and remove uname shims.
This removes confusion with third party software.

This means a pc32 build has MACHINE=i386 and MACHINE_ARCH=i386, and a
vkernel build also has MACHINE=i386 and MACHINE_ARCH=i386.  The new
MACHINE_PLAFORM would be pc32 for a pc32 build, and vkernel for a vkernel
build.

Adjust all kernel configuration files to specify platform, machine, AND
machine_arch.

Revision 1.145: download - view: text, markup, annotated - select for diffs
Tue Nov 7 06:57:02 2006 UTC (7 years, 5 months ago) by dillon
Branches: MAIN
Diff to: previous 1.144: preferred, unified
Changes since revision 1.144: +37 -23 lines
Major kernel build infrastructure changes, part 2/2 (user).

These changes are primarily designed to create a 2-layer machine and cpu
build hierarchy in order to support virtual kernel builds in the near term
and future porting efforts in the long term.

* The make program now pulls MACHINE, MACHINE_ARCH, and MACHINE_CPU from
  the kernel hw.machine, hw.machine_arch, and hw.machine_cpu sysctl
  variables, unless overridden by environment variables.

* The config program now generates additional softlinks in the kernel build
  directory:

  machine	points to the platform architecture header files
  machine_base	points to the baes of the platform architecture directory.
  cpu		points to the cpu architecture header files
  cpu_base	points to the base of the cpu architecture directory

  Additionally, the config program generates forwarding header files as
  includes/machine/*.h.  Any cpu architecture header files that are not
  overridden by the platform architecture are generated in this directory.

  The kernel build's Makefile adjusts the -I paths to effectively merge
  machine/ and includes/machine/, presenting a uniform <machine/*.h>
  include file architecture to the kernel build.

  The kernel build's Makefile now automatically exports MACHINE and
  MACHINE_ARCH as environment variables.

  The kernel build's Makefile now makes opt_*, use_*, and IF header files
  directly available to the module build subsystem so the module build
  subsystem does not have to generate them in each module subdirectory.

* Kernel configuration files now require both a 'machine' and a 'machine_arch'
  directive.  Typically:

  machine	pc32		(subject to change)
  machine_arch	i386

* /usr/include/cpu has been added to augment /usr/include/machine.  The
  buildworld infrastructure also automatically merges any <cpu/*.h> header
  files that were not overridden by the <machine/*.h> header files into
  /usr/include/machine.

  Note that direct access to /usr/include/cpu is not recommended.

* A number of weird cases that generate extranious 'machine' softlinks
  (for <machine/*.h> header access) have been removed.

* The MACHINE_ARCH default to i386 has been removed.  If the make program
  does not define the MACHINE_ environment and sys.mk is included, sys.mk
  will now fail with an error.

* cpdup has been added to the bootstrap tools.

Revision 1.144: download - view: text, markup, annotated - select for diffs
Fri Aug 25 22:37:09 2006 UTC (7 years, 7 months ago) by swildner
Branches: MAIN
Diff to: previous 1.143: preferred, unified
Changes since revision 1.143: +0 -2 lines
Remove more DEC Alpha support.

Revision 1.143: download - view: text, markup, annotated - select for diffs
Sat Sep 24 07:27:26 2005 UTC (8 years, 6 months ago) by okumoto
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_6_Slip, DragonFly_RELEASE_1_6, DragonFly_RELEASE_1_4_Slip, DragonFly_RELEASE_1_4
Diff to: previous 1.142: preferred, unified
Changes since revision 1.142: +1 -1 lines
Remove Var_Exists() and just use Var_Value() and compare
with NULL.

Revision 1.142: download - view: text, markup, annotated - select for diffs
Sat Sep 17 11:07:23 2005 UTC (8 years, 7 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.141: preferred, unified
Changes since revision 1.141: +4 -1 lines
Change shell.c API to reduce usage of global commandShell.

Revision 1.141: download - view: text, markup, annotated - select for diffs
Thu Aug 18 07:58:30 2005 UTC (8 years, 8 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.140: preferred, unified
Changes since revision 1.140: +4 -2 lines
Check result of setenv(putenv) function.

Submitted by: Alexey Slynko

Revision 1.140: download - view: text, markup, annotated - select for diffs
Wed Aug 3 18:34:39 2005 UTC (8 years, 8 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.139: preferred, unified
Changes since revision 1.139: +1 -1 lines
Make debug definition match forward declaration.

Revision 1.139: download - view: text, markup, annotated - select for diffs
Fri Jul 29 22:48:41 2005 UTC (8 years, 8 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.138: preferred, unified
Changes since revision 1.138: +61 -61 lines
Use standard bool instead of our own Boolean type.

Revision 1.138: download - view: text, markup, annotated - select for diffs
Tue Jul 19 18:14:15 2005 UTC (8 years, 8 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.137: preferred, unified
Changes since revision 1.137: +2 -0 lines
Cleanup the signal handling.  A lot of unnecessary code was
added in the past due to miss-understanding of the signal code.

Now when a signal is delivered, a per signal variable is incremented.
[idea from OpenBSD]  Since the signal handler just set variables
the rest of the code does not need to block signals.  This makes
the mainline code much cleaner.

Revision 1.137: download - view: text, markup, annotated - select for diffs
Wed Jul 13 20:41:27 2005 UTC (8 years, 9 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.136: preferred, unified
Changes since revision 1.136: +20 -16 lines
Add better comments and renamed functions to match rest of the code
in make.

Revision 1.136: download - view: text, markup, annotated - select for diffs
Wed Jul 13 20:40:52 2005 UTC (8 years, 9 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.135: preferred, unified
Changes since revision 1.135: +4 -3 lines
Move mkfifio(), and FILENO() into util.c

Revision 1.135: download - view: text, markup, annotated - select for diffs
Wed Jul 13 20:39:59 2005 UTC (8 years, 9 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.134: preferred, unified
Changes since revision 1.134: +3 -4 lines
Group curdir and objdir code.

Revision 1.134: download - view: text, markup, annotated - select for diffs
Sat Jul 2 10:48:42 2005 UTC (8 years, 9 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.133: preferred, unified
Changes since revision 1.133: +1 -1 lines
Use LST_FOREACH() macro instead of for-loop

Revision 1.133: download - view: text, markup, annotated - select for diffs
Sat Jul 2 10:48:06 2005 UTC (8 years, 9 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.132: preferred, unified
Changes since revision 1.132: +4 -4 lines
Avoid comments using the word "variable", since it can be confused
with the make variables.

Revision 1.132: download - view: text, markup, annotated - select for diffs
Sat Jul 2 10:47:48 2005 UTC (8 years, 9 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.131: preferred, unified
Changes since revision 1.131: +37 -37 lines
Move code out of InitVariables() back into main(), to
clarify purpose of InitVariables().

Revision 1.131: download - view: text, markup, annotated - select for diffs
Sat Jul 2 10:45:29 2005 UTC (8 years, 9 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.130: preferred, unified
Changes since revision 1.130: +2 -4 lines
Moved exit status code into subroutine Make_Run()

Revision 1.130: download - view: text, markup, annotated - select for diffs
Wed Jun 22 22:03:36 2005 UTC (8 years, 9 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.129: preferred, unified
Changes since revision 1.129: +72 -72 lines
Renamed struct MakeFlags to struct CLI.

Revision 1.129: download - view: text, markup, annotated - select for diffs
Wed Jun 22 22:03:19 2005 UTC (8 years, 9 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.128: preferred, unified
Changes since revision 1.128: +2 -1 lines
Split Dir_Init() into two functions.

Revision 1.128: download - view: text, markup, annotated - select for diffs
Wed Jun 22 22:03:03 2005 UTC (8 years, 9 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.127: preferred, unified
Changes since revision 1.127: +24 -25 lines
Move sections of init code that do not take any input into the
above section.

Revision 1.127: download - view: text, markup, annotated - select for diffs
Wed Jun 22 22:02:43 2005 UTC (8 years, 9 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.126: preferred, unified
Changes since revision 1.126: +2 -19 lines
Cleanup Dir_Init*() functions.

Revision 1.126: download - view: text, markup, annotated - select for diffs
Wed Jun 22 18:04:49 2005 UTC (8 years, 9 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.125: preferred, unified
Changes since revision 1.125: +0 -7 lines
Remove extra semi colin and a few remove redundent checks.

Revision 1.125: download - view: text, markup, annotated - select for diffs
Wed Jun 22 18:04:13 2005 UTC (8 years, 9 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.124: preferred, unified
Changes since revision 1.124: +13 -25 lines
Some cleanup
 o constify input to Main_ParseArgLine()
 o split complex if-statement into seperate assignment and if-statements
 o use strsep()

Revision 1.124: download - view: text, markup, annotated - select for diffs
Tue Jun 21 21:06:24 2005 UTC (8 years, 9 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.123: preferred, unified
Changes since revision 1.123: +4 -11 lines
Use strsep() instead of custom loop.

Revision 1.123: download - view: text, markup, annotated - select for diffs
Tue Jun 21 21:05:54 2005 UTC (8 years, 9 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.122: preferred, unified
Changes since revision 1.122: +7 -7 lines
Move compatMake test up.

Revision 1.122: download - view: text, markup, annotated - select for diffs
Tue Jun 21 21:04:49 2005 UTC (8 years, 9 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.121: preferred, unified
Changes since revision 1.121: +9 -11 lines
cleanup ReadInputFiles()

Revision 1.121: download - view: text, markup, annotated - select for diffs
Tue Jun 21 20:59:42 2005 UTC (8 years, 9 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.120: preferred, unified
Changes since revision 1.120: +1 -3 lines
Move code from main into subroutine.

Revision 1.120: download - view: text, markup, annotated - select for diffs
Tue Jun 21 20:59:00 2005 UTC (8 years, 9 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.119: preferred, unified
Changes since revision 1.119: +15 -12 lines
cleanup built_stuff()
	moving function description comment
	move exit status, the code will be moved into the called function.

Revision 1.119: download - view: text, markup, annotated - select for diffs
Sun Jun 19 14:31:03 2005 UTC (8 years, 9 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.118: preferred, unified
Changes since revision 1.118: +47 -31 lines
cleanup exit status handling

Revision 1.118: download - view: text, markup, annotated - select for diffs
Sun Jun 19 14:30:29 2005 UTC (8 years, 9 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.117: preferred, unified
Changes since revision 1.117: +4 -4 lines
Rename noBuiltins to builtins and invert logic.

Revision 1.117: download - view: text, markup, annotated - select for diffs
Sun Jun 19 14:30:02 2005 UTC (8 years, 9 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.116: preferred, unified
Changes since revision 1.116: +8 -6 lines
Add better comments for main()

Revision 1.116: download - view: text, markup, annotated - select for diffs
Sun Jun 19 14:29:42 2005 UTC (8 years, 9 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.115: preferred, unified
Changes since revision 1.115: +7 -9 lines
o cleanup usage of outOfDate variable.

Revision 1.115: download - view: text, markup, annotated - select for diffs
Sat Jun 18 09:01:12 2005 UTC (8 years, 10 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.114: preferred, unified
Changes since revision 1.114: +1 -1 lines
Pass DEFSHELLNAME into Shell_Init(), and remove the dependency of
shell.o on the Makefile.

Revision 1.114: download - view: text, markup, annotated - select for diffs
Fri Jun 17 22:22:44 2005 UTC (8 years, 10 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.113: preferred, unified
Changes since revision 1.113: +11 -0 lines
Add a few highlevel comments in main, describing what variables should be set.

Revision 1.113: download - view: text, markup, annotated - select for diffs
Fri Jun 17 10:27:53 2005 UTC (8 years, 10 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.112: preferred, unified
Changes since revision 1.112: +5 -2 lines
Better comment for chdir_verify_path()

Revision 1.112: download - view: text, markup, annotated - select for diffs
Fri Jun 17 08:11:28 2005 UTC (8 years, 10 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.111: preferred, unified
Changes since revision 1.111: +1 -1 lines
Remove extra white space.

Revision 1.111: download - view: text, markup, annotated - select for diffs
Fri Jun 17 07:54:24 2005 UTC (8 years, 10 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.110: preferred, unified
Changes since revision 1.110: +3 -3 lines
Remove spaces infront of tabs.

Revision 1.110: download - view: text, markup, annotated - select for diffs
Mon May 23 20:05:05 2005 UTC (8 years, 10 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.109: preferred, unified
Changes since revision 1.109: +24 -10 lines
Move parseIncPath and sysIncPath out of global scope

Revision 1.109: download - view: text, markup, annotated - select for diffs
Mon May 23 20:04:43 2005 UTC (8 years, 10 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.108: preferred, unified
Changes since revision 1.108: +28 -25 lines
Move the create list variable out of global scope and put it into
the newly created Parser object.  And Pass the parser object around
as a function paramter.

Revision 1.108: download - view: text, markup, annotated - select for diffs
Mon May 23 20:04:04 2005 UTC (8 years, 10 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.107: preferred, unified
Changes since revision 1.107: +2 -21 lines
o Remove out of date comment about Compat_Init()
o Move init code into Make_Run()
o Have Compat_Run() always return a boolean value (FALSE) so it has
  same prototype as Make_Run().

Revision 1.107: download - view: text, markup, annotated - select for diffs
Mon May 23 18:26:25 2005 UTC (8 years, 10 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.106: preferred, unified
Changes since revision 1.106: +14 -7 lines
Pass queryFlag as a function paramter instead of a program
global variable.

Revision 1.106: download - view: text, markup, annotated - select for diffs
Thu May 19 17:07:17 2005 UTC (8 years, 11 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.105: preferred, unified
Changes since revision 1.105: +2 -0 lines
2nd Try.  The correct version.

Move shell code out of job.c into shell.[ch]

Revision 1.105: download - view: text, markup, annotated - select for diffs
Thu May 19 17:04:45 2005 UTC (8 years, 11 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.104: preferred, unified
Changes since revision 1.104: +0 -2 lines
Revert patch on 2005/05/19 17:53:58 it was the wrong one :-(

Revision 1.104: download - view: text, markup, annotated - select for diffs
Thu May 19 16:53:58 2005 UTC (8 years, 11 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.103: preferred, unified
Changes since revision 1.103: +2 -0 lines
Move shell code out of job.c into shell.[ch]

Revision 1.103: download - view: text, markup, annotated - select for diffs
Thu May 19 16:51:45 2005 UTC (8 years, 11 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.102: preferred, unified
Changes since revision 1.102: +0 -50 lines
Move RLIMIT_NOFILE code into Proc_Init()
Move check_make_level() into job.c

Revision 1.102: download - view: text, markup, annotated - select for diffs
Thu May 19 16:51:19 2005 UTC (8 years, 11 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.101: preferred, unified
Changes since revision 1.101: +8 -15 lines
Small cleanups

Revision 1.101: download - view: text, markup, annotated - select for diffs
Thu May 19 16:51:06 2005 UTC (8 years, 11 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.100: preferred, unified
Changes since revision 1.100: +108 -99 lines
Move make global variables setup into a sepearate function.

Revision 1.100: download - view: text, markup, annotated - select for diffs
Thu May 19 16:50:35 2005 UTC (8 years, 11 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.99: preferred, unified
Changes since revision 1.99: +21 -24 lines
Group code that sets global variables (make MACROs)

Revision 1.99: download - view: text, markup, annotated - select for diffs
Thu May 19 16:49:56 2005 UTC (8 years, 11 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.98: preferred, unified
Changes since revision 1.98: +49 -42 lines
Move code that reads in the input files into sepearte function.

Revision 1.98: download - view: text, markup, annotated - select for diffs
Thu May 19 16:49:32 2005 UTC (8 years, 11 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.97: preferred, unified
Changes since revision 1.97: +49 -42 lines
Move a few global variables into a struct and pass it as a parameter.

Revision 1.97: download - view: text, markup, annotated - select for diffs
Thu May 19 16:47:57 2005 UTC (8 years, 11 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.96: preferred, unified
Changes since revision 1.96: +9 -3 lines
Cleanup search for default Makefile, by adding comments and
retructuring code.

Revision 1.96: download - view: text, markup, annotated - select for diffs
Mon May 16 17:36:08 2005 UTC (8 years, 11 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.95: preferred, unified
Changes since revision 1.95: +157 -142 lines
       o Move code to determine objdir into determine_objdir().
       o Move curdir, and objdir out of global scope.
       o Clean up ReadMakefile()
               + put enough code into the #ifdef #endif section to
                 be a complete statement.
               + renamed var 'p' to file and elimiate as many uses of
                 strdup() copy as possible.  The strup() is a hack.
               + Eliminate goto by inlining the destination code.  Trust
                 the compiler to do its job.
               + inline setMAKEFILE.
               + Moved common code out of #ifdef sections.

Revision 1.95: download - view: text, markup, annotated - select for diffs
Mon May 16 17:35:39 2005 UTC (8 years, 11 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.94: preferred, unified
Changes since revision 1.94: +43 -36 lines
Clean up objdir determination code.  Create a local scope to prep
to move this code into it's own function.

Revision 1.94: download - view: text, markup, annotated - select for diffs
Mon May 16 17:32:15 2005 UTC (8 years, 11 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.93: preferred, unified
Changes since revision 1.93: +27 -8 lines
Clean up chdir_verify_path() and add comments.

Revision 1.93: download - view: text, markup, annotated - select for diffs
Mon May 16 17:30:24 2005 UTC (8 years, 11 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.92: preferred, unified
Changes since revision 1.92: +6 -3 lines
Constify the result of Var_Value().

Revision 1.92: download - view: text, markup, annotated - select for diffs
Mon May 16 17:29:42 2005 UTC (8 years, 11 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.91: preferred, unified
Changes since revision 1.91: +2 -3 lines
patch-7.278

o Cleanup Var_Value().  It doesn't need the third parameter since
  we only return references to values in a context.  This should
  have been done a while ago when I cleaned up VAR_ENV.

Revision 1.91: download - view: text, markup, annotated - select for diffs
Sat May 14 22:52:18 2005 UTC (8 years, 11 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.90: preferred, unified
Changes since revision 1.90: +6 -5 lines
FreeBSD-Date: 2005/05/12 15:16:44
Author: harti

Fix the fix for bin/72510 applied in job.c:1.70. Actually there have
been two maxJobs variables: one static in job.c and one global used in
main.c and parse.c. Makeing one global out of these was the wrong way
to fix the problem. Instead rename the global one to jobLimit and keep
maxJobs static in job.c.

Suggested by:   rwatson
PR:             bin/72510

Revision 1.90: download - view: text, markup, annotated - select for diffs
Thu May 5 09:08:42 2005 UTC (8 years, 11 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.89: preferred, unified
Changes since revision 1.89: +8 -9 lines
Cleanup globals in str.c
  o Create ArgArray object.
  o Rewrite brk_string() and MAKEFLAGS_break() to use ArgArray instead
    of global variables.
  o Rewrite code that uses brk_string() and MAKEFLAGS_break() to use
    ArgArray.
  o Remove str_init() code.

Revision 1.89: download - view: text, markup, annotated - select for diffs
Thu May 5 09:04:35 2005 UTC (8 years, 11 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.88: preferred, unified
Changes since revision 1.88: +7 -0 lines
Move #define of DEFMAXJOBS from config.h to main.c

Revision 1.88: download - view: text, markup, annotated - select for diffs
Fri Apr 29 22:44:38 2005 UTC (8 years, 11 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.87: preferred, unified
Changes since revision 1.87: +56 -4 lines
FreeBSD-Date: 2005/04/29 15:37:44
Author: harti

Implement a pseudo-target .WARN that allows toggeling the warning flags
for the current make. This does not override flags specified on the
command line and these settings are not passed to sub-makes.

Revision 1.87: download - view: text, markup, annotated - select for diffs
Fri Apr 29 03:46:01 2005 UTC (8 years, 11 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.86: preferred, unified
Changes since revision 1.86: +9 -1 lines
FreeBSD-Date: 2005/04/28 16:37:25
Author: harti

Introduce a flag to enable extended warnings (-x) and make them off
by default. This should fix the problem of getting lots of errors
when building with an up-to-date make and old *.mk files.

Revision 1.86: download - view: text, markup, annotated - select for diffs
Thu Apr 28 18:50:08 2005 UTC (8 years, 11 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.85: preferred, unified
Changes since revision 1.85: +52 -52 lines
Clean up main.c
      o Moved initialization of progam globals and file globals
        to top of main().
      o Grouped file and program globals defintions.
      o made chdir_verify_path() static since it is only used in main.c

Revision 1.85: download - view: text, markup, annotated - select for diffs
Thu Apr 28 18:49:40 2005 UTC (8 years, 11 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.84: preferred, unified
Changes since revision 1.84: +19 -19 lines
Reduce the use of global variables by creating Var_SetGlobal() and
replacing Var_Set(name, val, VAR_GLOBAL).

Revision 1.84: download - view: text, markup, annotated - select for diffs
Thu Apr 28 18:49:18 2005 UTC (8 years, 11 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.83: preferred, unified
Changes since revision 1.83: +29 -53 lines
Cleanup main()
 o Moved setting signal handler for SIGCHLD into job.c
 o Moved unsetenv("ENV") into job.c where it belongs.
 o Moved setting machine, machine_arch, machine_cpu close to its usage.
 o Invert negative logic.

Revision 1.83: download - view: text, markup, annotated - select for diffs
Thu Apr 28 18:48:52 2005 UTC (8 years, 11 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.82: preferred, unified
Changes since revision 1.82: +102 -107 lines
Remove prototype for usage(), and move the definition above its use.

Revision 1.82: download - view: text, markup, annotated - select for diffs
Thu Apr 28 18:48:15 2005 UTC (8 years, 11 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.81: preferred, unified
Changes since revision 1.81: +1 -30 lines
Move printing of variables into var.c

Revision 1.81: download - view: text, markup, annotated - select for diffs
Thu Apr 28 18:47:51 2005 UTC (8 years, 11 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.80: preferred, unified
Changes since revision 1.80: +0 -3 lines
Move some variables into the correct files.

Revision 1.80: download - view: text, markup, annotated - select for diffs
Sun Apr 24 12:39:45 2005 UTC (8 years, 11 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.79: preferred, unified
Changes since revision 1.79: +2 -1 lines
Copy string into temp variable to quiet warning.

Revision 1.79: download - view: text, markup, annotated - select for diffs
Fri Apr 22 16:01:03 2005 UTC (8 years, 11 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.78: preferred, unified
Changes since revision 1.78: +0 -1 lines
Move prototype for Main_ParseArgLine() into make.h so we can delete
nonints.h

Revision 1.78: download - view: text, markup, annotated - select for diffs
Fri Apr 22 10:38:30 2005 UTC (8 years, 11 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.77: preferred, unified
Changes since revision 1.77: +1 -1 lines
Change .EXPORT: to .EXPORTVAR: earlier versions of pmake used
.EXPORT: and .NOEXPORT: as special targets.

Revision 1.77: download - view: text, markup, annotated - select for diffs
Thu Apr 21 23:13:19 2005 UTC (8 years, 11 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.76: preferred, unified
Changes since revision 1.76: +0 -1 lines
Merge compat.[ch] into job.[ch]

Revision 1.76: download - view: text, markup, annotated - select for diffs
Thu Apr 21 23:11:40 2005 UTC (8 years, 11 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.75: preferred, unified
Changes since revision 1.75: +0 -109 lines
Move Cmd_Exec() from main.c to job.c

Revision 1.75: download - view: text, markup, annotated - select for diffs
Thu Apr 21 22:57:29 2005 UTC (8 years, 11 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.74: preferred, unified
Changes since revision 1.74: +18 -4 lines
Handle double dash '--' in command line.

Revision 1.74: download - view: text, markup, annotated - select for diffs
Sat Apr 16 10:34:26 2005 UTC (9 years ago) by okumoto
Branches: MAIN
CVS tags: DragonFly_Stable
Diff to: previous 1.73: preferred, unified
Changes since revision 1.73: +2 -2 lines
patch-7.184
	o Copy Var_Subst() into Var_SubstOnly(), the new function
	  is never passed NULL in the 'var' input parameter.
	o Modified Var_Subst() to always expect var==NULL as input paramter.
	o Update calling code by removing unused parameter.

Revision 1.73: download - view: text, markup, annotated - select for diffs
Fri Apr 15 21:06:34 2005 UTC (9 years ago) by okumoto
Branches: MAIN
Diff to: previous 1.72: preferred, unified
Changes since revision 1.72: +3 -1 lines
Create VAR_ENV context, and fill it with everything in the environment.

Revision 1.72: download - view: text, markup, annotated - select for diffs
Fri Apr 15 21:05:52 2005 UTC (9 years ago) by okumoto
Branches: MAIN
Diff to: previous 1.71: preferred, unified
Changes since revision 1.71: +1 -0 lines
add .EXPORT: special tag and add ST_EXPORT variable.

Revision 1.71: download - view: text, markup, annotated - select for diffs
Fri Apr 15 21:01:27 2005 UTC (9 years ago) by okumoto
Branches: MAIN
Diff to: previous 1.70: preferred, unified
Changes since revision 1.70: +0 -2 lines
FreeBSD-Date: 2005/04/11 08:20:09
FreeBSD-Date: 2005/04/11 08:26:21
FreeBSD-Date: 2005/04/11 08:40:54

Author: harti

Rework the directive parsing code. Instead of using a lot of strcmp()s
on every line that starts with a dot use a minimal perfect hash
function and a single strcmp() on the first word after the dot
to find out whether it is really a directive call and, if yes, which
one. Then directly dispatch to a handler function for that directive
(or fall through to the dependency handling code). This makes the
directive parse a little bit more strict about the syntax: the directive
word must be followed by a character that is not alphanumerical and not
an underline (making .undefFOO illegal); .endif and .else can only be
followed by comments.

Revision 1.70: download - view: text, markup, annotated - select for diffs
Tue Apr 12 08:26:17 2005 UTC (9 years ago) by okumoto
Branches: MAIN
Diff to: previous 1.69: preferred, unified
Changes since revision 1.69: +0 -4 lines
Removed un-nessisary comment.  We can get a zero length arg to make
if someone quotes it.
	% make ''

Revision 1.69: download - view: text, markup, annotated - select for diffs
Thu Apr 7 07:52:32 2005 UTC (9 years ago) by okumoto
Branches: MAIN
Diff to: previous 1.68: preferred, unified
Changes since revision 1.68: +36 -19 lines
Make should set optreset to one before it calls getopt() with a new
set of args.

    o Removed unnessisary forward declaration for MainParseArgs()

    o Use optreset global variable to inform getopt() that we are
      parsing another arg list.

    o Cleanup handling of remaining arguments after getopt()
      completes parsing arguments.  There is no reason to restart
      getopt() for single dash case, just ignore it.  And update
      comment to reflect code.

    o Removed missleading comments.

Revision 1.68: download - view: text, markup, annotated - select for diffs
Thu Apr 7 00:44:18 2005 UTC (9 years ago) by okumoto
Branches: MAIN
Diff to: previous 1.67: preferred, unified
Changes since revision 1.67: +137 -137 lines
FreeBSD-Date: 2005/04/01 10:53:43
FreeBSD-Date: 2005/04/01 11:12:29
FreeBSD-Date: 2005/04/01 11:20:17
FreeBSD-Date: 2005/04/01 12:31:15
FreeBSD-Date: 2005/04/01 12:42:03
FreeBSD-Date: 2005/04/01 13:02:17
FreeBSD-Date: 2005/04/01 13:06:05
FreeBSD-Date: 2005/04/01 13:25:45
Author: harti

Style: fix indentation

Revision 1.67: download - view: text, markup, annotated - select for diffs
Thu Apr 7 00:37:31 2005 UTC (9 years ago) by okumoto
Branches: MAIN
Diff to: previous 1.66: preferred, unified
Changes since revision 1.66: +7 -3 lines
FreeBSD-Date: 2005/03/31 11:35:56
FreeBSD-Date: 2005/03/31 11:40:53
Author: harti

Almost complete rewrite of the archive code (except for the Makefile parsing
part). Archive handling was broken at least since the move from BSD ar/ranlib
to GNU binutils because of the different archive format. This rewrite fixes
this by making make to carry around the defines for all formats (it supports)
so it can support all of them independent of the actually used one. The
supported formats are: traditional BSD (this seems to come from V7 at least,
short names only and __.SYMDEF), BSD4.4 (long names with #1/ and __.SYMDEF)
and SysV (extra name table and //). The only format not supported are broken
traditional archives where the member names are truncated to 15 characters.

Errors in the archive are not ignored anymore, but cause make to stop with
an error message. The command line option -A causes these errors to become
non-fatal. This is almost compatible with previous usage except for the
error message printed in any case.

Use a type-safe intrusive list for the archive cache.

Document the new -A flag for ignoring archive errors.

Reviewed by:    Max Okumoto <okumoto@ucsd.edu> (without new error handling)

Revision 1.66: download - view: text, markup, annotated - select for diffs
Tue Apr 5 07:55:02 2005 UTC (9 years ago) by joerg
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_2_Slip, DragonFly_RELEASE_1_2
Diff to: previous 1.65: preferred, unified
Changes since revision 1.65: +6 -5 lines
Since optind=0 has a special meaning for GNU getopt compatibility,
always use optind=1 and increment argc / decrement argv beforehand.

Revision 1.65: download - view: text, markup, annotated - select for diffs
Thu Mar 31 22:16:35 2005 UTC (9 years ago) by okumoto
Branches: MAIN
Diff to: previous 1.64: preferred, unified
Changes since revision 1.64: +10 -9 lines
FreeBSD-Date: 2005/03/23 12:56:15
Author: harti

Make paths an explicite datatype instead of using the generic Lst.
A Path is now a TAILQ of PathElements each of which just points to
a reference counted directory. Rename all functions dealing with Paths
from the Dir_ prefix to a Path_ prefix.

Revision 1.64: download - view: text, markup, annotated - select for diffs
Sat Mar 19 00:19:55 2005 UTC (9 years, 1 month ago) by okumoto
Branches: MAIN
Diff to: previous 1.63: preferred, unified
Changes since revision 1.63: +1 -1 lines
patch-7.151
	- Use Buf_Data() to simplify code.
	- Use Buf_Peel() to simplify code.

Revision 1.63: download - view: text, markup, annotated - select for diffs
Fri Mar 18 22:12:47 2005 UTC (9 years, 1 month ago) by okumoto
Branches: MAIN
Diff to: previous 1.62: preferred, unified
Changes since revision 1.62: +14 -8 lines
FreeBSD-Date: 2005/03/18 15:23:49
FreeBSD-Date: 2005/03/18 15:25:23
Author: harti

o Replace a bogus use of Lst_Find with explicite LST_FOREACH calls
  and remove the unneeded second argument to ReadMakefile.

o Replace Lst_Find calls with LST_FOREACH loops. This helps in
  constification and simplifies the code because the one-liner
  predicates can be inlined into the code.

Revision 1.62: download - view: text, markup, annotated - select for diffs
Fri Mar 18 18:39:07 2005 UTC (9 years, 1 month ago) by okumoto
Branches: MAIN
Diff to: previous 1.61: preferred, unified
Changes since revision 1.61: +1 -1 lines
Fix dangling ref to auto variable.

Revision 1.61: download - view: text, markup, annotated - select for diffs
Thu Mar 17 02:34:31 2005 UTC (9 years, 1 month ago) by okumoto
Branches: MAIN
Diff to: previous 1.60: preferred, unified
Changes since revision 1.60: +0 -22 lines
Remove pc98 support as a gift to Sascha Wildner :-)

Revision 1.60: download - view: text, markup, annotated - select for diffs
Sat Mar 12 11:29:33 2005 UTC (9 years, 1 month ago) by okumoto
Branches: MAIN
Diff to: previous 1.59: preferred, unified
Changes since revision 1.59: +8 -8 lines
Remove leading underscores from the pathname defines. All identifiers
with leading underscore followed by an uppercase letter are in the
implementation namespace.

FreeBSD-Date: 2005/03/11 13:02:38
Author: harti

Revision 1.59: download - view: text, markup, annotated - select for diffs
Sat Mar 12 10:17:00 2005 UTC (9 years, 1 month ago) by okumoto
Branches: MAIN
Diff to: previous 1.58: preferred, unified
Changes since revision 1.58: +3 -4 lines
compat.c:
	Use the Buf_Peel function to get to the string contained into a
	buffer without using an extra local variable.
main.c
	Use Buf_Peel to get rid of a local variable.

FreeBSD-Date: 2005/03/08 14:33:58
FreeBSD-Date: 2005/03/08 14:37:47
Author: harti

Revision 1.58: download - view: text, markup, annotated - select for diffs
Thu Mar 3 23:39:06 2005 UTC (9 years, 1 month ago) by okumoto
Branches: MAIN
Diff to: previous 1.57: preferred, unified
Changes since revision 1.57: +5 -2 lines
Reduce diffs between FreeBSD

Revision 1.57: download - view: text, markup, annotated - select for diffs
Mon Feb 28 12:17:37 2005 UTC (9 years, 1 month ago) by okumoto
Branches: MAIN
Diff to: previous 1.56: preferred, unified
Changes since revision 1.56: +10 -10 lines
The rest of the modifications that Harti made to patch-7.48.

Revision 1.56: download - view: text, markup, annotated - select for diffs
Wed Feb 16 22:38:03 2005 UTC (9 years, 2 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.55: preferred, unified
Changes since revision 1.55: +4 -7 lines
Add better comments.

Revision 1.55: download - view: text, markup, annotated - select for diffs
Tue Feb 15 01:01:18 2005 UTC (9 years, 2 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.54: preferred, unified
Changes since revision 1.54: +1 -1 lines
Make sure the $FreeBSD$ tags are correct.

Revision 1.54: download - view: text, markup, annotated - select for diffs
Fri Feb 4 22:35:42 2005 UTC (9 years, 2 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.53: preferred, unified
Changes since revision 1.53: +3 -1 lines
- In main.c use NULL instead of 0
- In str.c check if brk_string() is passed a null pointer in
  store_argc.  If so then don't return argc.

Taken-from: FreeBSD

Revision 1.53: download - view: text, markup, annotated - select for diffs
Thu Feb 3 23:41:05 2005 UTC (9 years, 2 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.52: preferred, unified
Changes since revision 1.52: +0 -1 lines
Remove duplicate #include of <sys/sysctl.h>

Revision 1.52: download - view: text, markup, annotated - select for diffs
Tue Feb 1 22:05:36 2005 UTC (9 years, 2 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.51: preferred, unified
Changes since revision 1.51: +5 -6 lines
- Fix some duplicate commenting for struct Job, struct GNode and
  struct Shell by removing one version and inlining the comments
  into the structure declaration (the comments have been somewhat
  outdated).

- Remove the 3rd clause (from 4) of the BSD license because those
  files have only the UCB copyright

Taken-from: FreeBSD

Revision 1.51: download - view: text, markup, annotated - select for diffs
Mon Jan 31 21:11:26 2005 UTC (9 years, 2 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.50: preferred, unified
Changes since revision 1.50: +78 -59 lines
Fixes in main.c
- Cleanup VPATH variable expansion and parsing.
- Cleanup -V flag handling.
- Added comments.
- Fixed negative logic in if-statements.

Revision 1.50: download - view: text, markup, annotated - select for diffs
Mon Jan 31 08:30:51 2005 UTC (9 years, 2 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.49: preferred, unified
Changes since revision 1.49: +12 -2 lines
- Convert negative logic, so code is easyer to read.

- Start using Buffer objects, instead of c strings.  That way we
  can pass back one object, instead of passing back seperate length
  and character arrays.

Revision 1.49: download - view: text, markup, annotated - select for diffs
Thu Jan 27 10:25:19 2005 UTC (9 years, 2 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.48: preferred, unified
Changes since revision 1.48: +24 -50 lines
- Add Buf_StripNewlines().
- Modified Cmd_Exec() to return a Buffer object instead of a 'char *', and
  updated all the callers.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Wed Jan 26 09:44:21 2005 UTC (9 years, 2 months ago) by joerg
Branches: MAIN
Diff to: previous 1.47: preferred, unified
Changes since revision 1.47: +21 -8 lines
Fix the quoting of MAKEFLAGS as noted in rev. 1.47.
This still has a slight problem with trailing backslashes
on the comment line, but that will be documented in the man page.

Written-by: Harti Brandt, harti AT freebsd DOT org

Revision 1.47: download - view: text, markup, annotated - select for diffs
Fri Jan 14 11:30:16 2005 UTC (9 years, 3 months ago) by joerg
Branches: MAIN
Diff to: previous 1.46: preferred, unified
Changes since revision 1.46: +0 -5 lines
Back out part of rev 1.24. The intention the quoting backfires and bad
quoting is generated. Running 'make all-depends-list' in x11-fonts/libXft
does something like this:
PARENT_CHECKED=/usr/ports/x11-fonts/fontconfig /usr/ports/devel/pkgconfig
/usr/ports/print/freetype2 /usr/ports/devel/gmake /usr/ports/converters/libiconv
/usr/ports/devel/gettext
/usr/ports/devel/libtool13
/usr/ports/devel/libtool15
/usr/ports/textproc/expat2

After quoting this becomes:
PARENT_CHECKED=/usr/ports/x11-fonts/fontconfig\ /usr/ports/devel/pkgconfi
g\
/usr/ports/print/freetype2\ /usr/ports/devel/gmake\ /usr/ports/converters/libico
nv\
/usr/ports/devel/gettext\
/usr/ports/devel/libtool13\
/usr/ports/devel/libtool15\
/usr/ports/textproc/expat2\

The next make tries to do this, the following happens:
before: PARENT_CHECKED=/usr/ports/x11-fonts/fontconfig /usr/ports/devel/pkgconfi
g\
after: PARENT_CHECKED=/usr/ports/x11-fonts/fontconfig\ /usr/ports/devel/pkgconfi
g\\
and the final \\ confuses the shell.

Thanks to asmodai for suggesting a make problem as source.

Revision 1.46: download - view: text, markup, annotated - select for diffs
Mon Jan 10 01:07:42 2005 UTC (9 years, 3 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.45: preferred, unified
Changes since revision 1.45: +2 -1 lines
- Last of the easy constifications.

Revision 1.45: download - view: text, markup, annotated - select for diffs
Sat Jan 8 22:27:02 2005 UTC (9 years, 3 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.44: preferred, unified
Changes since revision 1.44: +1 -1 lines
Constify more functions.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Sat Jan 8 21:58:23 2005 UTC (9 years, 3 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.43: preferred, unified
Changes since revision 1.43: +14 -10 lines
Constifying functions.

Revision 1.43: download - view: text, markup, annotated - select for diffs
Sat Jan 8 13:13:22 2005 UTC (9 years, 3 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.42: preferred, unified
Changes since revision 1.42: +1 -0 lines
Add missing #include

Revision 1.42: download - view: text, markup, annotated - select for diffs
Thu Jan 6 13:18:58 2005 UTC (9 years, 3 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.41: preferred, unified
Changes since revision 1.41: +2 -1 lines
Hiding pointer in typedefs is evil. 'Buffer *' -> 'Buffer'

Revision 1.41: download - view: text, markup, annotated - select for diffs
Thu Jan 6 10:53:00 2005 UTC (9 years, 3 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.40: preferred, unified
Changes since revision 1.40: +18 -13 lines
Clean up include header mess. Split nonints into separate header files.
Headers now only include other headers so they can compile.  Source
files include all required headers.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Wed Jan 5 23:28:20 2005 UTC (9 years, 3 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.39: preferred, unified
Changes since revision 1.39: +0 -8 lines
Remove cleanup functions. There is no reason to free memory
just before exiting (especially given the number of memory leaks) -
it just costs time.

Taken-from: FreeBSD
Author: harti

Revision 1.39: download - view: text, markup, annotated - select for diffs
Fri Dec 17 21:09:04 2004 UTC (9 years, 4 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.38: preferred, unified
Changes since revision 1.38: +2 -3 lines
Reduce white space diffs between FreeBSD.

Revision 1.38: download - view: text, markup, annotated - select for diffs
Fri Dec 17 08:17:05 2004 UTC (9 years, 4 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.37: preferred, unified
Changes since revision 1.37: +5 -8 lines
Fix a long-standing bug when make(1) is passed the -V and
-f options in MAKEFLAGS environment variable, and some of
these options are also specified on the command line.

Taken-from: FreeBSD
Author: ru

Revision 1.37: download - view: text, markup, annotated - select for diffs
Fri Dec 17 08:13:30 2004 UTC (9 years, 4 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.36: preferred, unified
Changes since revision 1.36: +50 -41 lines
Instead of dynamically allocating list heads allocated them statically
now that their size is only two pointers. This eliminates a lot of calls
to Lst_Init and from there to malloc together with many calls to
Lst_Destroy (in places where the list is obviously empty). This also
reduces the chance to leave a list uninitilized so we can remove more
NULL pointer checks and probably eliminates a couple of memory leaks.

Taken-from: FreeBSD
Author: harti

Revision 1.36: download - view: text, markup, annotated - select for diffs
Fri Dec 17 07:53:57 2004 UTC (9 years, 4 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.35: preferred, unified
Changes since revision 1.35: +4 -3 lines
Constify the arguments to the list compare function. This temporarily
requires to make a copy of the filename in ReadMakefile and to
duplicate two small functions in suff.c. This hopefully will go
away when everything is constified.

Taken-from: FreeBSD
Author: harti

Revision 1.35: download - view: text, markup, annotated - select for diffs
Fri Dec 17 00:02:57 2004 UTC (9 years, 4 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.34: preferred, unified
Changes since revision 1.34: +10 -10 lines
Typedefs of pointers to structs are evil. Make Lst and LstNode typedef of
the structs itself not of pointers to them. This will simplify constification.

Taken-from: FreeBSD
Author: harti

Revision 1.34: download - view: text, markup, annotated - select for diffs
Thu Dec 16 23:24:09 2004 UTC (9 years, 4 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.33: preferred, unified
Changes since revision 1.33: +5 -5 lines
Make needs no circular lists so remove them from the list code.

Taken-from: FreeBSD
Author: harti

Revision 1.33: download - view: text, markup, annotated - select for diffs
Thu Dec 16 22:20:12 2004 UTC (9 years, 4 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.32: preferred, unified
Changes since revision 1.32: +10 -11 lines
Use size_t to fix 64-bit platforms

Taken-from: FreeBSD
Author: harti

Revision 1.32: download - view: text, markup, annotated - select for diffs
Thu Dec 16 00:17:05 2004 UTC (9 years, 4 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.31: preferred, unified
Changes since revision 1.31: +9 -11 lines
Style: remove a lot of unnecessary casts, add some and spell the null
pointer constant as NULL.

Checked by: diff -r on the object files before and after

Taken-from: FreeBSD
Author: harti

Revision 1.31: download - view: text, markup, annotated - select for diffs
Fri Dec 10 19:22:24 2004 UTC (9 years, 4 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.30: preferred, unified
Changes since revision 1.30: +39 -38 lines
Stylification: missing spaces, extra space after function names,
casts and the sizeof operator, missing empty lines, void casts,
extra empty lines.

Checked by: diff on make *.o lst.lib/*.o

Author: harti, okumoto

Revision 1.30: download - view: text, markup, annotated - select for diffs
Fri Dec 10 01:16:25 2004 UTC (9 years, 4 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.29: preferred, unified
Changes since revision 1.29: +3 -0 lines
Add code to enforce the paralleism count (-j N) for the entire tree
of submakes spawned during processing.

We create a fifo and stuff one character into it for each job we are
allowed to run.  The name of the fifo is passed to child processes
in the MAKE_JOBS_FIFO environment variable.

A make which finds this variable on startup will open the fifo and
only spawn jobs when it managed to read a token from the fifo.
When the job completes a token is writen back to the fifo.

Slave make processes get one token for free: the one their parent
make got in order to run them.  This makes the make processes
themselves invisible in the process counts.

The net effect is that "make -j 12 -s buildworld" will start at
most 12 jobs at the same time, instead of as previously up to
65 jobs would get started.

Taken-from: FreeBSD
Author: phk

Revision 1.29: download - view: text, markup, annotated - select for diffs
Fri Dec 10 01:03:46 2004 UTC (9 years, 4 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.28: preferred, unified
Changes since revision 1.28: +10 -2 lines
o Allow use of the ${MAKE_SHELL} variable to specify alternate
  shells for make(1) to use.  Setting it to "sh" and "ksh" are the
  only values which work right ATM; I wouldn't expect "csh" to get
  you far ;)

o Include -DDEFSHELL=1 in Makefile.dist so people boostrapping will
  have a sane default.  And add DragonFly tag

o Add ability to use csh(1) as the make(1) shell.

o Expand the scope of the .SHELL specification to also cover the
  compat mode of operation and the != operator.

  While here, fixed a bug in the .SHELL directive processing when
  only the name= attribute is specified and no built-in shell matches
  this name, causing null pointer dereference.

o Fix a very long-standing error in handling .SHELL targets: this
  target uses the brk_string function to parse the line. That
  function uses static storage for both the expanded string and the
  returned argv[] vector.   The JobParseShell function simply stored
  away pointers into this static storage. On the next use of something
  like ${FOO:O} this storage would get overwritten with fatal
  results.

  This also allows us to make the shells[] array const bringing us
  one step further in making make WARNS=4 ready.

o Constify the array of predefined shells. It turns out that we
  need two versions of the structure definition for this: one with
  const char pointers, because otherwise gcc won't let us initialize
  the fields with constant strings, and one without the const,
  because we need to work with the structure.

Note: This patch is really a hack for a coping with slow /bin/sh.
      We are importing it to reduce the differences between us and
      the FreeBSD version.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Thu Dec 9 23:33:36 2004 UTC (9 years, 4 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.27: preferred, unified
Changes since revision 1.27: +5 -8 lines
Move catch_child() to reduce diffs between FreeBSD make.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Thu Dec 9 19:08:35 2004 UTC (9 years, 4 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.26: preferred, unified
Changes since revision 1.26: +1 -1 lines
Use typedefs for the types of the functions that are passed as
arguments to the list functions for better readability.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Wed Dec 8 10:55:16 2004 UTC (9 years, 4 months ago) by okumoto
Branches: MAIN
Diff to: previous 1.25: preferred, unified
Changes since revision 1.25: +0 -2 lines
o Include sys/sysctl.h on all architectures not only i386.
o Increased WARNS to 3

Taken-from: FreeBSD
Author: harti

Revision 1.25: download - view: text, markup, annotated - select for diffs
Wed Dec 1 15:44:20 2004 UTC (9 years, 4 months ago) by joerg
Branches: MAIN
Diff to: previous 1.24: preferred, unified
Changes since revision 1.24: +29 -27 lines
compat.c:1.38->1.39
job.c:1.55->1.56
Author: harti
Log:
Fix a (very) long standing bug in make (this has been there probably
from the beginning). Make used to handle all its interrupt-time stuff
directly from the signal handler, including calls to printf, accessing
global data and so on. This is of course wrong and could provoke a core
dump when interrupting make. Just set a flag in the signal handler and
do everything else from the main thread.

PR:             bin/29103

config.h:1.14->1.15
main.c:1.97->1.98
parse.c:1.57->1.58
Author: harti
Log:
Eliminate the define for POSIX and build with Posix behaviour.
Our make has been build with POSIX enabled from the first day
and the ifdef'ed out code served no purpose.

Obtained-from: FreeBSD
Submitted-by: Max Okumoto <okumoto@ucsd.edu>

Revision 1.24: download - view: text, markup, annotated - select for diffs
Wed Dec 1 02:02:14 2004 UTC (9 years, 4 months ago) by joerg
Branches: MAIN
Diff to: previous 1.23: preferred, unified
Changes since revision 1.23: +3 -36 lines
job.c:1.52->1.53
job.h:1.22->1.23
main.c:1.92->1.93
Author: harti
Log:
Remove the remote stuff from make. This actually never worked in our make
because the necessary files were not imported with the original import.
If somebody really needs it, there is still the devel/pmake port.

This is just the first step and removes just everything that is ifdef'ed out.
Otherwise the code is unchanged.

Checked by:     md5

Approved by:    no objections on arch@

config.h:1.12->1.13
job.c:1.53->1.54
job.h:1.23->1.24
Author: harti
Log:
Now with the remote job support removed there can be no remote jobs and
no jobs that need to be remigrated. Remove the flags and the associated
code.

config.h:1.13->1.14
main.c:1.93->1.94
Author: phk
Log:
Get rid of now unused maxLocal variables.

job.c:1.54->1.55
job.h:1.24->1.25
main.c:1.94->1.95
Author: phk
Log:
Get rid of more local/remote leftovers

Obtained-from: FreeBSD
Submitted-by: Max Okumoto <okumoto@ucsd.edu>

Revision 1.23: download - view: text, markup, annotated - select for diffs
Wed Dec 1 01:29:31 2004 UTC (9 years, 4 months ago) by joerg
Branches: MAIN
Diff to: previous 1.22: preferred, unified
Changes since revision 1.22: +7 -6 lines
Makefile: 1.32->1.33
main.c: 1.90->1.91
nonints.h: 1.22->1.23
var.c: 1.47->1.48
Author: harti
Log:
Put variable assignments on .MAKEFLAGS and .MFLAGS targets into
the .MAKEFLAGS variable so that these are also passed to sub-makes.
This makes the handling of variables in the command environment more
consistent.

PR:             bin/68853
Submitted by:   Martin Kamerhofer <data@sbox.tugraz.at>

make.1:1.78->1.79
Author: ru
Log:
Document the effects of modifying the .MAKEFLAGS internal
variable and using the .MAKEFLAGS special target, and the
differences between them.

Reviewed by:    harti

Obtained-from: FreeBSD
Submitted-by: Max Okumoto <okumoto@ucsd.edu>

Slightly adjust the change Var_Quote to not cast away a const.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Wed Dec 1 01:10:17 2004 UTC (9 years, 4 months ago) by joerg
Branches: MAIN
Diff to: previous 1.21: preferred, unified
Changes since revision 1.21: +39 -31 lines
Makefile: 1.31->1.32
main.c: 1.89->1.90
nonints.h: 1.21->1.22
var.c: 1.46->1.47
Author: harti
Log:
Put variable assignments from the command line into the MAKEFLAGS
variable as required by POSIX. This causes such variables to be
pushed into all sub-makes called by the make (except when the MAKEFLAGS
variable is explicitely changed in the sub-make's environment).
This makes them also mostly un-overrideable in sub-makes except on the
sub-make's command line. Therefor specifying 'make CC=icc' will cause
icc to be used as C compiler in all sub-makes no matter what the Makefiles
itself try to do to the CC variable.

This patch also corrects the handling of the MFLAGS variable. MFLAGS
contains all the command line flags but not the command line variable
assignments. The evaluation of the .MFLAGS or .MAKEFLAGS target now
changes both MFLAGS and MAKEFLAGS (they used to change MAKEFLAGS only).
Makefiles can use MFLAGS for their own purposes given that they do not
except MFLAGS to be undefined at the beginning and that they don't evaluate
.MFLAGS or .MAKEFLAGS. MFLAGS should be removed for POSIX compliance,
but it is unfortunately heavily used by the X makefiles.

This has been extensively tested by port builds (thanks to portmgr), new
worlds and kernels.

PR:             standards/57295 (1st part above)
Submitted by:   James E. Flemer <jflemer@alum.rpi.edu>
Approved by:    portmgr
Obtained from:  NetBSD (1st part above)
MFC after:      4 weeks

make.1: 1.75->1.76
Author: harti
Log:
Correct the description of the MFLAGS and .MAKEFLAGS variables. Add
the MFLAGS target. Document that variable assignments from the MAKEFLAGS
environment variable and the .MAKEFLAGS and .MFLAGS target have the
same precedence as command line variable assignments.

make.1: 1.76->1.77
Author: harti
Log:
Correct the .Dd date. Pluralize 'assignment' in one place.

Requested by: ru

Revision 1.21: download - view: text, markup, annotated - select for diffs
Tue Nov 30 15:52:57 2004 UTC (9 years, 4 months ago) by joerg
Branches: MAIN
Diff to: previous 1.20: preferred, unified
Changes since revision 1.20: +1 -0 lines
dir.c: 1.31->1.32
Author: ru
Log:
Fix a bug that prevented exists() from finding "foo/", "foo/."
and "foo/.." when ".PATH: foo" was also given.

PR:             bin/34062

Members:
        dir.c:1.31->1.32

compat.c: 1.35->1.36
main.c: 1.84->1.85
Author: ru
Log:
Make the -q option DTRT in the compat mode.

PR:     48210

var.c: 1.43->1.44
Author: ru
Log:
Fix a bug in variable parsing code that could cause a segfault.

PR:             bin/46203
Submitted by:   Stefan Farfeleder <stefan@fafoe.dyndns.org>

Obtained-from: FreeBSD
Submitted-by: Max Okumoto <okumoto@ucsd.edu>

Revision 1.20: download - view: text, markup, annotated - select for diffs
Tue Nov 30 15:22:46 2004 UTC (9 years, 4 months ago) by joerg
Branches: MAIN
Diff to: previous 1.19: preferred, unified
Changes since revision 1.19: +60 -58 lines
author: ru
Log:
- Cut out the code that caches the "." directory out of Dir_Init()
  into a separate function, Dir_InitDot().

- Postpone the current and object directories detection (and caching
  of the "." directory) until after all command line arguments are
  parsed.  This makes the -C option DTRT.

PR:             bin/47149

Obtained-from: FreeBSD
Submitted-by: Max Okumoto <okumoto@ucsd.edu>

Revision 1.19: download - view: text, markup, annotated - select for diffs
Tue Nov 30 15:04:56 2004 UTC (9 years, 4 months ago) by joerg
Branches: MAIN
Diff to: previous 1.18: preferred, unified
Changes since revision 1.18: +3 -3 lines
main.c: 1.81->1.82
Author: imp
Log:
No need to check to see if we're running a version of FreeBSD 3.0 current or
newer anymore.

cond.c: 1.26->1.27
Author: imp
Log:
Keep up with minor changes to NetBSD.  Consider a variable empty when
not define.

Obtained From: NetBSD (rev 1.18; sjg)

for.c: 1.19->1.20
Author: ru
Log:
Command line variables take precedence over global variables.
Make this true in the .for loops too.  The following fragment,

        FOO=    foo bar

        all:
        .for f in ${FOO}
                @echo ${f}
        .endfor

when run as "make FOO=xxx" should print "xxx".  (OpenBSD had
this bug fixed for some time.)

Obtained-from: FreeBSD
Submitted-by: Max Okumoto <okumoto@ucsd.edu>

Revision 1.18: download - view: text, markup, annotated - select for diffs
Wed Nov 24 07:19:14 2004 UTC (9 years, 4 months ago) by dillon
Branches: MAIN
Diff to: previous 1.17: preferred, unified
Changes since revision 1.17: +56 -37 lines
o Pacify ``make -f /dev/null -V FOO''.
o Add empty default cases where they should be, remove
  non-local execution stuff in compat.c which doesn't even
  have preprocessor-conditional-hidden support code, and
  add a debugging statement where we might end up with a
  nil list somehow, but where I doubt it.
o Makeing make(1) WARNS=6 cleanup
o In lieu of a good way to prevent every possible looping
  in make(1), stop there from being more than 500 processes
  forked by make(1), to prevent a forkbomb from happening,
  in a dumb and mechanical way.
o Some ANSI changes that we missed

Submitted-by: Max Okumoto <okumoto@ucsd.edu>
Taken-from: FreeBSD

Revision 1.17: download - view: text, markup, annotated - select for diffs
Wed Nov 24 07:11:33 2004 UTC (9 years, 4 months ago) by dillon
Branches: MAIN
Diff to: previous 1.16: preferred, unified
Changes since revision 1.16: +7 -10 lines
patch-4.10: Clean some includes and remove ifdef __STDC__, -Wall cleanup,
unifdef -D__STDC__, Sort #includes, remove <sys/types.h> (made redundant
by <sys/param.h>), add <signal.h> (needed for sigaction()),
Unbreak compilation on RELENG_4.

Submitted-by: Max Okumoto <okumoto@ucsd.edu>

Revision 1.16: download - view: text, markup, annotated - select for diffs
Thu Nov 18 02:01:39 2004 UTC (9 years, 5 months ago) by dillon
Branches: MAIN
Diff to: previous 1.15: preferred, unified
Changes since revision 1.15: +12 -37 lines
Bring in various fixes from FreeBSD:

* MAXPATHLEN includes the trailing NUL, Correct array sizes to reflect this.
* Correct NUL termination after strncpy.
* Make ${.OBJDIR} canonical.
* -Wall cleanup.
* unifdef -D__STDC__
* Sort #includes, remove <sys/types.h> (made redundant by <sys/param.h>),
  add <signal.h> (needed for sigaction())
* Unbreak compilation on RELENG_4.
* unifdef -UWANT_ENV_PWD. No one ever going to use this bugfeature.
* Reorder #include. Cast arg #2 of lseek to an off_t when constant. No need to
  test if failsafe memory allocation fails, it can't. perror -> warn. Use
  failsafe memory allocation provided.
* And some other doc cleanup.
* Reduce diffs between FreeBSD and DragonFly Makefile
* Added the MAKE_VERSION global that could be useful in determining
  if a given make(1) is feature-compatible with a set of makefiles.
  When merged, this will be used to replace the ugly upgrade_checks
  hacks in src/Makefile.
  Version has the RYYYYMMDDX format, where R is from RELENG_<R> and
  X allows for 10 distinguishable changes per day.
* make(I) appeared in PWB UNIX.
* Add MAKE_VERSION variables
* Don't do stupid things to avoid unused parameters, mark them __unused.
* Use %p to print a pointer, not %lx and a cast to (unsigned long).  Yuck.
* Avoid classy use of a variable one time with a constant value.
* Bit-width fields should be of type 'int'.

Submitted-by: Max Okumoto <okumoto@home>

Revision 1.15: download - view: text, markup, annotated - select for diffs
Sun Nov 14 20:05:25 2004 UTC (9 years, 5 months ago) by dillon
Branches: MAIN
Diff to: previous 1.14: preferred, unified
Changes since revision 1.14: +1 -2 lines
Continuing synchronization from FreeBSD.

Submitted-by: Max Okumoto <okumoto@ucsd.edu>

Revision 1.14: download - view: text, markup, annotated - select for diffs
Sat Nov 13 07:25:17 2004 UTC (9 years, 5 months ago) by dillon
Branches: MAIN
Diff to: previous 1.13: preferred, unified
Changes since revision 1.13: +9 -6 lines
Make both arguments to str_concat() const char *'s and remove STR_DOFREE
support.  Manually free the strings in the one routine in dir.c that used
that option, plus some other minor cleanups.

Reported-by: Max Okumoto <okumoto@home>

Revision 1.13: download - view: text, markup, annotated - select for diffs
Fri Nov 12 22:57:04 2004 UTC (9 years, 5 months ago) by dillon
Branches: MAIN
Diff to: previous 1.12: preferred, unified
Changes since revision 1.12: +16 -264 lines
Convert make(1) to use ANSI style function declarations.  Variable
documentation already adequatedly existed in the description in most
cases.  Where it did not, it was added.  If no documentation existed
beforehand, then none was added.  Some unused dummies for use in the
traversal functions were marked as __unused during the conversion.
Occasionally, local style fixes were applied to lines already being
modified or influenced.

Taken-from: FreeBSD/jmallett

Revision 1.12: download - view: text, markup, annotated - select for diffs
Fri Nov 12 22:42:36 2004 UTC (9 years, 5 months ago) by dillon
Branches: MAIN
Diff to: previous 1.11: preferred, unified
Changes since revision 1.11: +22 -0 lines
Make the DEBUGF() macro portable by (ugh) adding a Debug() function, which
is merely printf() but to stderr.  This takes care of the caveat which lead
to the use of a vararg macro -- getting everything to stderr.

Move common use of if (DEBUG(FOO)) printf... to DEBUGF(FOO, ...), using
variable length arguments to a macro.  Bump version as this makes DEBUG
statements *always* go to stderr rather than sometimes stdout.  There are
a few stragglers, which I will take care of as soon as I can.  Mostly these
relate to the need-for-death-of some of the remote job code.

Taken-From: FreeBSD/jmallett

Revision 1.11: download - view: text, markup, annotated - select for diffs
Fri Nov 12 22:11:33 2004 UTC (9 years, 5 months ago) by dillon
Branches: MAIN
Diff to: previous 1.10: preferred, unified
Changes since revision 1.10: +4 -40 lines
Partial sync from  FreeBSD/jmallet:

String lengths and sizeof()s are size_t not int.  Mark an unused parameter
of ReadMakefile as __unused, it's there because this function is used by
the abstracted list interface

Revision 1.10: download - view: text, markup, annotated - select for diffs
Fri Nov 12 22:02:51 2004 UTC (9 years, 5 months ago) by dillon
Branches: MAIN
Diff to: previous 1.9: preferred, unified
Changes since revision 1.9: +2 -1 lines
Do some deregisterization.

Taken-From: FreeBSD/obrien.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Fri Nov 12 21:52:04 2004 UTC (9 years, 5 months ago) by dillon
Branches: MAIN
Diff to: previous 1.8: preferred, unified
Changes since revision 1.8: +2 -2 lines
efree()->free().  remove #define efree (which was defined to free).

Taken-From: FreeBSD

Revision 1.8: download - view: text, markup, annotated - select for diffs
Fri Nov 12 21:41:51 2004 UTC (9 years, 5 months ago) by dillon
Branches: MAIN
Diff to: previous 1.7: preferred, unified
Changes since revision 1.7: +18 -17 lines
Remove various forms of NULL, and cleanup types.  This is a partial sync from
FreeBSD's make.

Submitted-by: Max Okumoto <okumoto@home>

Revision 1.7: download - view: text, markup, annotated - select for diffs
Sun Oct 24 22:43:58 2004 UTC (9 years, 5 months ago) by dillon
Branches: MAIN
Diff to: previous 1.6: preferred, unified
Changes since revision 1.6: +23 -1 lines
Synchronize bug fixes from FreeBSD/RELENG_4.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Fri Jul 23 07:11:03 2004 UTC (9 years, 8 months ago) by asmodai
Branches: MAIN
CVS tags: DragonFly_Snap29Sep2004, DragonFly_Snap13Sep2004
Diff to: previous 1.5: preferred, unified
Changes since revision 1.5: +2 -4 lines
Use err() instead of a perror()/exit() combination.

Synchronises with:	FreeBSD v1.52 (partially)
Submitted by:		Douwe Kiela <virtus@wanadoo.nl>

Revision 1.5: download - view: text, markup, annotated - select for diffs
Thu Jan 29 22:40:36 2004 UTC (10 years, 2 months ago) by dillon
Branches: MAIN
CVS tags: DragonFly_1_0_REL, DragonFly_1_0_RC1, DragonFly_1_0A_REL
Diff to: previous 1.4: preferred, unified
Changes since revision 1.4: +1 -0 lines
Set a variable indicating that we support .makeenv, so we can conditionalize
its use.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Mon Jan 26 18:16:18 2004 UTC (10 years, 2 months ago) by drhodus
Branches: MAIN
Diff to: previous 1.3: preferred, unified
Changes since revision 1.3: +2 -5 lines
*	DragonFly<-FreeBSD Name clean ups

Revision 1.3: download - view: text, markup, annotated - select for diffs
Mon Nov 3 19:31:30 2003 UTC (10 years, 5 months ago) by eirikn
Branches: MAIN
Diff to: previous 1.2: preferred, unified
Changes since revision 1.2: +6 -6 lines
Remove __P macros from src/usr.bin and src/usr.sbin.

Reviewed by: David Rhodus <drhodus@catpa.com> and
             Matthew Dillon <dillon@apollo.backplane.com>

Revision 1.2: download - view: text, markup, annotated - select for diffs
Tue Jun 17 04:29:29 2003 UTC (10 years, 10 months ago) by dillon
Branches: MAIN
Diff to: previous 1.1: preferred, unified
Changes since revision 1.1: +5 -15 lines
Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids.  Most
ids have been removed from !lint sections and moved into comment sections.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Tue Jun 17 02:56:20 2003 UTC (10 years, 10 months ago) by dillon
Branches: MAIN
CVS tags: FREEBSD_4_FORK
import from FreeBSD RELENG_4 1.35.2.9

Diff request

This form allows you to request diffs 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.

Log view options