summaryrefslogtreecommitdiff
path: root/usr.bin/make
AgeCommit message (Collapse)Author
2001-12-25- partially fix ${foo:?true:false} so that at least it now parses ok andlukem
the true result works. for some reason the false result doesn't, even though make -dv shows it being set as the result. (blah!) - add braces in comments to fix vi showmatch
2001-12-23outdent description of variable expansion modifierslukem
2001-12-11Allow MAKE_MACHINE to be unset if MAKE_BOOTSTRAP.tv
2001-12-11Add __CYGWIN__ to list of exceptions from homegrown strftime().tv
(XXX - This should be an inclusive, not exclusive, list. Later, this should be autoconfiscated, but keep the internal implementation, since src/tools/compat isn't necessarily available for use at make's build time.)
2001-11-30Clean up some MAKE_BOOTSTRAP issues wrt. MACHINE/MACHINE_ARCH.thorpej
2001-11-14Fix a very old and annoying bug: Adding suffixes to sufflist wasn't settingtv
a refCount of 1 to indicate its presence on sufflist. Hence suffixes were being removed by Suff_EndTransform() and being freed before all the referential links were removed. This resulted in a malloc warning on 1.5.x: make in free(): warning: chunk is already free. This could be reproduced with the following simple Makefile passed to "make -r": ===== .SUFFIXES: .l .c .l.c: foo:
2001-11-12Redo the hashtable for "." if .OBJDIR changes.tv
2001-11-12Whitespace/punctuation nits.wiz
2001-11-12Add new make variable .ALLTARGETS, which lists all targets in the Makefile.tv
(Makes it possible to search the target list for particular things and apply attributes to all the relevant targets.)
2001-11-12Sort list of make variables.tv
2001-11-11Back out my rev. 1.75 on recommendation of christos.tv
Instead of skipping the PWD check entirely, add a skip of the PWD override if MAKEOBJDIR is set and contains a variable transform ($). This has similar problems to what happens if MAKEOBJDIRPREFIX is set.
2001-11-11Fix long-standing bug where, if an objdir exists, searching the .PATH for atv
file will strip any leading path on the filename when searching ${.CURDIR}. This bug manifested itself more prominently with xsrc/xfree/xc/lib/GL/GL, since we now always search ${.CURDIR} as an alternative to ${.OBJDIR} (PR bin/14499).
2001-11-02Apparently something was missed in the Main_SetObjdir commit. Fix a TRUEtv
value that should start out FALSE.
2001-11-02Strike getenv("PWD") entirely, based on prior discussion with sjg. Thistv
breaks too many situations, including MAKEOBJDIR with a :C,foo,bar, transform in many cases. It's ambiguous and unreliable, as the comment above that code always indicated. In order to have reliable objdirs, they need to work the same way Every Time. (Note that taking this out is not a performance hit; we were already doing the getcwd() call first. So the getenv("PWD") didn't increase performance.)
2001-10-31Overhaul the initialization and handling of .OBJDIR:tv
* Replace chdir_verify_path() with Main_SetObjdir(), which can be called externally, and can take a "const char *". (There's a lot of non-const "char *" passing around in var.c of what should be const strings....) * Rewrite the initial "find my .OBJDIR" code to make use of the new function. This still functions as it had in the past, but the comment above this block was changed to reflect reality: if MAKEOBJDIRPREFIX or MAKEOBJDIR are set in the environment, then *only that value* is tried; make does not fall back to obj.MACHINE, obj, and /usr/obj/`pwd` as it would without these env vars set. * Add a new special target, .OBJDIR:, which when parsed will cause make to change to a new object directory and reset .OBJDIR, and PWD in the environment. This will allow some makefiles (mainly, src/tools) to override the default objdir semantics in order to add custom logic.
2001-10-31Allow "-m" to be used in a .MAKEFLAGS: special target and get it to work.tv
(This splits out the "default system include paths" into its own Lst variable, and uses it only if sysIncPath is empty. This allows sysIncPath to be filled in by the Makefile itself.)
2001-10-23Fix typo in definition of PARSEFILE. It should refer to PARSEDIR (and notjmc
itself twice) when describing the variables lifetime
2001-10-16Don't ignore errors during .END processing.sjg
PR: 14267 Reviewed: christos
2001-10-16When attempting to chdir to .CURDIR because Check_Cwd_Cmd says we need tosjg
make sure that the dir actually exists. In compat mode the corresponding chdir simply fails and all is well - the issue only arises when playing tricky games with the value of .CURDIR. Reviewed: christos
2001-09-24va_{start,end} audit:wiz
Make sure that each va_start has one and only one matching va_end, especially in error cases. If the va_list is used multiple times, do multiple va_starts/va_ends. If a function gets va_list as argument, don't let it use va_end (since it's the callers responsibility). Improved by comments from enami and christos -- thanks! Heimdal/krb4/KAME changes already fed back, rest to follow. Inspired by, but not not based on, OpenBSD.
2001-09-16Spell 'occurred' with two 'r's.wiz
2001-08-20precede, not preceed.wiz
2001-08-13Nit.ad
2001-07-24Print out errno when vfork fails.matt
2001-07-03add .USEBEFORE Attributechristos
2001-06-12Add 4th arg (flags) to Var_Set so that VarLoopExpand can tell it notsjg
to export interator variables when using context VAR_CMD. Reviewed: christos
2001-06-11Revert Job_CatchOutput() change; it adds a considerable delay to make, andchristos
it is not clear what problem it is trying to fix.
2001-06-11Fix various misspellings of compatible/compatibility.wiz
2001-06-10Simplify the exporting of VAR_CMD's via MAKEFLAGS.sjg
We now just list the names of such variables in .MAKEOVERRIDES. When we come to export MAKEFLAGS we quote the value of each exported variable using :Q, using: ${.MAKEOVERRIDES:O:u:@v@$v=${$v:Q}@} The :O:u suppresses duplicate names. Also modifed Parse_DoVar to re-export MAKEFLAGS whenever .MAKEOVERRIDES is assigned to so .MAKEOVERRIDES+= PATH will export PATH=${PATH:Q} to the environment, while .MAKEOVERRIDES= will disable export of VAR_CMD's.
2001-06-09Mention .MAKEOVERRIDESsjg
2001-06-09Do a better job of duplicate suppression in .MAKEOVERRIDES.sjg
From Var_Set: We actually want the equivalent of .MAKEOVERRIDES:= ${.MAKEOVERRIDES:Nname=*} name='val' clearing the previous value for name is important, since doing simple duplicate suppression does not handle: $ make FOO=goo which then runs a sub-make with FOO=boo the commands from that sub-make should see just FOO=boo.
2001-06-09Modify handling of command line variable assignments and their exportingsjg
via MAKEFLAGS. Instead of appending them directly to .MAKEFLAGS, put them in .MAKEOVERRIDES (and ensure they are quoted). This is now done in Var_Set when it exports VAR_CMD's. Use ExportMAKEFLAGS() to export MAKEFLAGS, using the combined content of .MAKEFLAGS and .MAKEOVERRIDES (with duplicate supression). If .MAKEFLAGS is assigned to in a Makefile, ExportMAKEFLAGS is called again. This allows a line like: .MAKEOVERRIDES= to effectively stop the exporting of the command line vars in MAKEFLAGS.
2001-06-09Provide a useful? MAKE_VERSION.sjg
2001-06-05Perform variable expansion on sysv rhs patterns. That is, expand ${O} in: ↵explorer
${SRCS:.c=.${O}}
2001-06-02Avoid being overly specific since the unresolved merge conflict tagssommerfeld
we detect could have come from something other than cvs.
2001-06-02mention `cvs' in the the previous hack so that the clueless get a clue.christos
2001-06-02Gratuitous make(1) hack of the morning: if operator-less lines startsommerfeld
with merge delimeters (<<<<<<, ======, >>>>>>), report "Makefile contains unresolved merge conflict" rather than "Need an operator".
2001-06-01A number of semi-related changes.sjg
1. make -dx turns on DEBUG_SHELL which causes sh -x to be used where possible. 2. PrintOnError() is now called when make is stopping due to an error. This routine reports the curdir and the value of any variables listed in MAKE_PRINT_VAR_ON_ERROR. 3. Variables set via command line, are propagated to child-makes via MAKEFLAGS. This behaviour appears to be necessary for POSIX (according to the GNU folk anyway). 4. Do not reset MAKEFILE when reading ".depend" as this rather eliminates the usefulness of ${MAKEFILE}. 5. Added ${.newline} as a simple means of being able to include \n in the result of a :@ loop expansion. 6. Set ${MAKE_VERSION} if defined. Need to come up with a useful value. Reviewed: christos
2001-05-29better error messages on exec* failures. From Simon Burge.christos
2001-05-12Modifier :P avoid segfault if gn is found but path is NULL.sjg
2001-05-08Fix core dump triggered by a .DEFAULT target with no commands.aymeric
Bug reported privately by Nicolas Ollinger <nollinge@ens-lyon.fr>. You can trigger this bug prior to updating your sources with for example: % cat > Makefile <<EOF .DEFAULT: a EOF % make
2001-05-01bin/12734: fix SIGTSTP/SIGCONT handling.sommerfeld
- install SIGCONT handler which reestablishes SIGTSTP handler and then calls JobRestartJobs() to restart all the suspended jobs. - when SIGTSTP is handled, call JobCatchChildren() so *** Suspended messages get printed before make stops rather than after.
2001-04-06Negative exit code cleanup: Replace exit(-x) with exit(x).wiz
As seen on tech-userlevel.
2001-04-04getcwd lives in 3, not 2. Whitespace fixes.wiz
2001-03-10redo of previous: do not destroy v->val if str points to v->val.itojun
XXX GC of v->val
2001-03-09correct case with VAR_KEEP. if clause checked VAR_KEEP backwards,itojun
and made str a dangling pointer.
2001-03-05Test for non-existant LIB was incorrect (using cmtime cf. mtime).sjg
2001-02-23PR/12251: Thomas Klausner: Make core dumps on unclosed conditional.christos
Well, it should say 'make core-dumps on any error on the primary makefile'. This was a result of the new changes to print the path to the parsed Makefile... Made the code a lot more conservative, plus prepended <progname>: to each message.
2001-01-23<sys/time.h>, rather than <time.h>. The former is actually the documentedcgd
way to get gettimeofday(), etc. On some systems on which you might want to host make (e.g. solaris), <time.h> won't get you a struct timeval definition.
2001-01-18Add trace.othorpej