Commit Graph

282432 Commits

Author SHA1 Message Date
rillig 818c0eaf62 make(1): rewrite VarIsDynamic to VarnameIsDynamic
The condition for the context is the same for both short and long names,
therefore move that condition to the only caller.

Clean up the comment and move its parts to the appropriate places.  The
"with the dollar sign escaped" part had been wrong already in 1993, and
it didn't get better over time.
2020-10-31 15:23:52 +00:00
skrll f7bc763dd3 Use the 'mv' pseudo-instruction instead of the 'move' equivalent as 'mv'
is mentioned in the ISA documentation and it's used elsewhere.  That is,
let's use 'mv' everywhere for consistency.
2020-10-31 15:18:09 +00:00
christos ffcac9dc43 Avoid hard-coding names and limits so this will not break again. 2020-10-31 14:57:02 +00:00
christos 1868909715 Add an array of filter names. 2020-10-31 14:55:52 +00:00
rillig 16db8f2ffd make(1): rename local variable freePtr in Var_Parse 2020-10-31 14:55:33 +00:00
rillig 564c7162e3 make(1): use consistent parameter order in varname parsing functions 2020-10-31 14:47:32 +00:00
rillig d43fb1d27c make(1): extract ParseVarnameLong from Var_Parse 2020-10-31 14:40:34 +00:00
jdc 5f47dddb1a Detach led's and sysmon in our detach routine. 2020-10-31 14:39:31 +00:00
jdc 7140a529be Detach led's in our detach routine. 2020-10-31 14:38:54 +00:00
christos 2987e709e6 add missing sentence. 2020-10-31 14:35:28 +00:00
rillig 5d25954065 make(1): extract ParseVarnameShort from Var_Parse
With its more than 200 lines, the latter has too much code to be read
easily.
2020-10-31 14:12:01 +00:00
skrll 428cf2f3aa Fix armv6 builds by providing an armv6 is macro 2020-10-31 13:58:22 +00:00
rillig 030fdca903 make(1): add test for recursion detection with short variable names 2020-10-31 13:45:00 +00:00
nia 87a23a2dff mesa: re-enable GLX TLS to help i386
mesa's assembly code for i386 only seems to be position independent
when compiled with ELF TLS, so having it disabled causes worse problems
than the edge cases ELF TLS causes.

potentially the assembly code could be fixed (it looks like it not
being safe is a bug), it could also be disabled, but i don't currently
have the means to measure the impact of that.
2020-10-31 13:28:22 +00:00
jdc f74360b941 Call sysmon_envsys_unregister() not sysmon_envsys_destroy() when
detaching.  Pointed out by Michael van Elst.
2020-10-31 13:17:34 +00:00
rillig 48e5e1cf2f make(1): fix function names in test for variable debugging 2020-10-31 13:15:10 +00:00
rillig 7f78983052 make(1): fix type of ParseModifierPart parameter delim 2020-10-31 12:59:28 +00:00
rillig 8a82b186a7 make(1): extract IsEscapedModifierPart from ParseModifierPart 2020-10-31 12:57:39 +00:00
rillig d581710cf9 make(1): clean up ModifyWords
Reorder the parameters to match the documentation comment, and the
remaining parameters in chronological order.  Remove the unused
parameter ctxt.  The callbacks that need it pass it in their
modifyWordArgs instead.
2020-10-31 12:45:42 +00:00
rillig 08137c1148 make(1): add test for combining the :@ and :? variable modifiers 2020-10-31 12:34:03 +00:00
rillig 6c314bb2d6 make(1): remove redundant condition for regmatch_t.rm_eo being -1
If rm_so is -1, rm_eo is guaranteed to be -1 as well.
2020-10-31 12:22:43 +00:00
rillig 0de1ffc13b make(1): add tests for edge cases in the :C variable modifier 2020-10-31 12:20:36 +00:00
rillig ff78291f2d make(1): make memory allocation simpler in meta_create and meta_oodate
Since there is only a single variable left that needs to be freed at the
end (and probably never actually needs to be freed since nobody defines
an environment variable named .OBJDIR), there is no need to loop over
these variables.
2020-10-31 12:04:24 +00:00
rillig f015e31c48 make(1): do not look up local variables like .TARGET anywhere else
Nobody defines a global variable named .TARGET since that would have
many unpredictable effects, applying to all targets at once.

Nobody defines an environment variable named .TARGET since that's
against the naming conventions for environment variables and would have
the same effect.

Because of this, there is no point looking up the variables that are
local to a GNode anywhere else.  This means they cannot come from the
environment and thus their value doesn't need to be freed after use,
which makes the code simpler.

The newly added accessor functions in make.h refer to external
functions, but since that header is not used anywhere outside of
usr.bin/make, it doesn't matter.  Between 2020-08-25 and 2020-10-30,
that header had been referenced by usr.bin/xinstall.
2020-10-31 11:54:33 +00:00
rillig 33f5cc827c make(1): reduce the scope where recursive expressions are detected
Only the call to Var_Subst needs to be protected since the other
functions have nothing to do with expanding variables.
2020-10-31 11:34:30 +00:00
rillig a29ccc8f84 make(1): add test for recursive variable expressions 2020-10-31 11:30:56 +00:00
rillig c85f19149b make(1): merge the SysV modifier tests into varmod-sysv 2020-10-31 11:06:24 +00:00
rillig fbea726624 use the same indentation for all libcurses test files 2020-10-31 11:03:18 +00:00
wiz 1848228ba3 Remove trailing whitespace. 2020-10-31 10:51:59 +00:00
wiz 7c80034b55 Improve wording. 2020-10-31 10:48:17 +00:00
rillig 078aea88e1 make(1): add tutorial for the :from=to variable modifier 2020-10-31 10:18:32 +00:00
rillig 59a15951ab make(1): fix indentation in source code 2020-10-31 09:57:47 +00:00
rillig eacf697d8a make(1): extract loadedfile_mmap from loadfile 2020-10-31 09:47:27 +00:00
rillig 6d46532e31 make(1): remove redundant :tl from getBoolean
Uppercase and lowercase letters are already handled the same by
s2Boolean, which makes the :tl modifier redundant.
2020-10-31 09:35:58 +00:00
rillig 1260fc7594 make(1): remove redundant null check from s2Boolean 2020-10-31 09:27:19 +00:00
rillig 269a504494 make(1): write s2Boolean in a more compact form 2020-10-31 09:23:38 +00:00
rillig c6477600da make(1): clean up mkTempFile 2020-10-31 09:20:07 +00:00
rillig a8a30cc353 make(1): remove redundant code branch in SysVMatch
The general code path of parsing :from=to achieves the same effect.
2020-10-31 09:03:36 +00:00
rillig ae7e762a77 make(1): merge duplicate code in ModifyWord_Subst 2020-10-31 08:40:54 +00:00
rillig 54008b567f make(1): explain tests for the SysV variable modifier 2020-10-31 08:31:37 +00:00
sjg 815b3f2b09 Do not use an objdir that is not writable. 2020-10-31 06:18:21 +00:00
maya bbb8187c33 Match linux here and wait without interrupts.
From David H. Gutteridge in PR port-amd64/55555
There's a second part to the patch, but "make our code behave the way
the upstream code does" is very welcome.
Also PR kern/54515 and possibly others.
2020-10-31 04:05:42 +00:00
christos ed75ee8266 PR/55663: Ruslan Nikolaev: Add support for EVFILT_USER in kqueue(2) 2020-10-31 01:08:31 +00:00
sjg 6f0c36ba80 Fix directive-unexport to focus only on the variables we care about 2020-10-30 23:54:42 +00:00
rillig 2c5bf41671 make(1): rename Str_SYSVMatch and its parameters 2020-10-30 22:55:34 +00:00
christos 8047934f22 use c99 initializers 2020-10-30 22:51:08 +00:00
rillig fe43fa6966 make(1): improve variable name in Var_Value, document callback 2020-10-30 22:49:07 +00:00
rillig 210a250ca4 make(1): remove unsatisfiable conditions in Var_Set_with_flags 2020-10-30 22:43:39 +00:00
rillig 859792c8ea make(1): document where the variable name is expanded 2020-10-30 22:30:42 +00:00
uwe 18275b593a Add a few missing articles. 2020-10-30 22:29:30 +00:00