summaryrefslogtreecommitdiffstats
path: root/usr.sbin/config/mkmakefile.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix two memory leaks in config(8).rpaulo2015-10-131-0/+2
| | | | | PR: 202145 Submitted by: Kurt Lidl <lidl pix.net>
* Fix the negation (!) operator so that it binds only to the word thatian2014-11-231-12/+12
| | | | | immediately follows it, which means 'not' has to be reset every time an option word or device name is processed.
* Fix ! by not clearing not at the bottom of the loop.imp2014-02-051-2/+2
| | | | | | Add a blank line Submitted by: bde (blank line)
* Implement the '!' operator for files* files. It means 'include thisimp2014-02-041-4/+17
| | | | | | only if the specified option is NOT specified.' Bump version because old config won't be able to cope with files* files that have this construct in them.
* Convert the loop by gotos into a for loop to improve readability. Iimp2014-02-031-124/+122
| | | | | | did this only with the inner loop for the token parsing, and not the outer loop which was understandable enough when the extra layers of looping went away...
* Fix a bug introduced in r261437 that failed to honor "optionalimp2014-02-031-5/+6
| | | | | profiling-routine" to work, since profiling-routine is not really an option or a device, but a special case elsewhere in the code.
* Slight cleanup to the error messaging to compress code vertically...imp2014-02-031-57/+38
|
* Better error messages when EOF is hit in the middle of a phrase.imp2014-02-031-18/+6
|
* Move the check for standard keyword + optional inclusion specifier toimp2014-02-031-6/+6
| | | | | | its proper location. Otherwise you could have 'file.c standard pci' without an error. This construct isn't in our tree, and has no well defined meaning.
* Don't believe we have a requirement until after we've checked all theimp2014-02-031-1/+1
| | | | | known key words. This will make error messages slightly better in weird corner cases, but should otherwise be a nop.
* In the 17 years since r30796, the mandatory keyword has never been usedimp2014-02-031-16/+4
| | | | in any files as far as I can tell, and is currently unused. Retire it.
* Slightly deobfuscate read_file() and likely pessimize the runtimeimp2014-02-031-57/+49
| | | | | | | performance by epsilon. (Translation: elminate bogus macros that hid 'returns' making it hard to read and moved a block of code inline rather than at the end of the fuction where it was effectively a 'gosub' kind of goto).
* - Fix the error message when a dependency string is not provided tojhb2012-10-101-2/+2
| | | | | | | | | reference a missing dependency rather than a missing compile command. - Don't append a newline to the auto-generated compile command. The compile command has a newline appended when it is later output to the Makefile. MFC after: 2 weeks
* Fix copyright yearkevlo2012-01-131-1/+1
| | | | Spotted by: pluknet
* fgets(3) returns a pointer, so compare against NULL, not integer 0.kevlo2012-01-131-4/+4
|
* Replace index() and rindex() calls with strchr() and strrchr().ed2012-01-031-7/+7
| | | | | | | | | | The index() and rindex() functions were marked LEGACY in the 2001 revision of POSIX and were subsequently removed from the 2008 revision. The strchr() and strrchr() functions are part of the C standard. This makes the source code a lot more consistent, as most of these C files also call into other str*() routines. In fact, about a dozen already perform strchr() calls.
* Generate ${NORMAL_CTFCONVERT} invocation without '@' modifier:fjoe2011-11-301-1/+1
| | | | | - ${NORMAL_CC} is also invoked without '@' - Userland CTF support was changed previously to echo ctfconvert invocations too
* The generated Makefile for the kernel was not running ctfconvert onrstone2011-11-101-3/+8
| | | | | | | | | | | | | object files corresponding to source files that had the compile-with option set in conf/files. This means that any fbt probes for functions in that object file would not have correct argument types. The fix is to run ctfconvert on any target file that does not have the no-obj option set in files. PR: bin/160275 Reported by: Paul Ambrose (ambrosehua AT gmail DOT com) MFC after: 1 week
* - Merge changes to the base system to support OFED. These includejeff2011-03-211-14/+35
| | | | | a wider arg2 for sysctl, updates to vlan code, IFT_INFINIBAND, and other miscellaneous small features.
* Generate MACHINE= and MACHINE_ARCH= lines based on the machineimp2011-02-111-0/+2
| | | | | | | directive. Once this is MFC'd, we can move these out of the template files where they are (incosnsitently) defined. MFC after: 1 week
* Give the user a hint as to what config(8) is unhappy with.obrien2010-11-021-2/+2
|
* Put warnings out to stderr rather than stdout.imp2010-07-151-24/+30
| | | | MFC after: 3 days
* style(9) fixes:imp2010-06-131-5/+3
| | | | | | | | | o make cmd scoped to the whole do_rules function, since it really is scoped to the whole fucnion. Making it static was the wrong way to fix referencing it outside of the block in which it was declared (and conforms to the style of the rest of the file). o remove a couple of meaningless blank lines o properly wrap one line.
* Move checking the version up from Makefile generation to just afterimp2010-04-271-24/+21
| | | | | | | | | | | | | | | | | | | | | | | | we've parsed the config file. Makefile generation is too late if we've introduce changes to the syntax of the metafiles to warn about version skew, since we have to try to parse them and we get an parse error that's rather baffling to the user rather than a 'your config is too old, upgrade' which we should get. We have to defer doing it until after we've read the user's config file because we define machinename there. The version required to compile the kernel is encoded in Makefile.machinename. There's no real reason for this to be the case, but changing it now would introduce some logistical issues that I'd rather avoid for the moment. I intend to revisit this if we're still using config in FreeBSD 10. This also means that we cannot introduce any config metafile changes that result in a syntax error or other error for the user until 9.0 is released. Otherwise, we break the upgrade path, or at least reduce the usefulness of the error messages we generate. # This implies that the config file option mapping will need to be redone. MFC after: 3 days
* Revert r206179 (by imp) and do something similar which is more consistentnetchild2010-04-221-1/+1
| | | | | | | | | | with all other corresponding CTF places by changing the corresponding code which is generated by config(8). Or in short, move the '@' from the variable definition to the use of the variable. [1] While I'm here break up a long line. [2] Discussed with: imp [1,2], bde [2]
* - Handle calloc() allocation failures.ru2010-03-301-0/+2
| | | | | | | | | - Fixed a comment. - 2 -> EXIT_FAILURE in some places. - errx() -> err() where appropriate. PR: 144644 Submitted by: Garrett Cooper
* Allow multiple makeoption lines to be used with the += operator, this permitsthompsa2008-11-221-3/+7
| | | | | | | | | | the following syntax in the kernel config. makeoptions MODULES_OVERRIDE=foo makeoptions MODULES_OVERRIDE+=bar makeoptions MODULES_OVERRIDE+=baz Bump config minor version to 600007.
* Revice the way the CTF conversion is done per object. Avoid creating a secondjb2008-06-291-1/+1
| | | | | | shell (which was the problem with the original implementation) and avoid letting make see an empty definition (which was the problem with the current implementation).
* Change the CTF conversion makefile code to use a new line to avoidjb2008-06-091-1/+1
| | | | | | | | spawning another shell. Requested by: Ed Schouten M config/mkmakefile.c
* Add the CTF conversion to the generated makefile. In the case wherejb2008-05-231-1/+1
| | | | NO_CTF or !WITH_CTF, the macro is empty.
* Don't leak files.imp2006-10-241-3/+2
| | | | | | This also eliminates the need for ifp init. Submitted by: ru@
* End my resistance to jmg's multiple hints files and bring in supportimp2006-10-241-9/+6
| | | | | for having multiple hints files generate a correct hints.c (eg, with all the specified ones catenated together).
* Added rudimentary support for the "include" directive (inside "files").ru2006-10-011-0/+14
| | | | | This will be used to split sys/conf/files into multiple files similar to how this is done in NetBSD.
* Remove an unused variable.stefanf2006-07-191-2/+1
|
* Use calloc() instead of zeroing the memory our own.delphij2006-06-071-2/+1
|
* Allow newer config versions to config older versions with the sameimp2006-02-031-1/+2
| | | | | | | | major number. Reviewed by: ru@, jhb@, arch@ (a few months ago) # this is subject to refinement based on experience.
* - Avoid adding devices multiple times to the device list.ru2005-12-301-5/+2
| | | | | | - Avoid adding options multiple times to the option list. Based on a patch by: Matt Emmerton <matt@gsicomp.on.ca>
* Clean up most of the "XXX"-tagged items:ru2005-12-301-13/+22
| | | | | | | | | | | - The code that creates hints.c and env.c from the skeleton files moved into separate functions. - Sanity checks for missing "ident" and "cputype" directives moved into main(), alongside the existing check for "machine". PR: bin/90310 Submitted by: Matt Emmerton <matt@gsicomp.on.ca>
* Make config(8) understand ORed dependecies in "files*" andru2005-11-271-11/+21
| | | | improve tracking of known devices. Bump config(8) version.
* Clean some code that became obfuscated over the years:ru2005-11-251-43/+19
| | | | | | | | | Don't keep duplicate files in the files list just to mark the device as "known" later. XXX: Since the device list isn't unique (there can be two "device foo" directives, as this the case with LINT+DEFAULTS), we have to traverse it all to mark all copies of the same device as "used", but this is not worse than it was.
* Kill count device support from config. I've changed the last fewpeter2004-08-301-14/+4
| | | | | | | | | | | | | | | | | remaining consumers to have the count passed as an option. This is i4b, pc98/wdc, and coda. Bump configvers.h from 500013 to 600000. Remove heuristics that tried to parse "device ed5" as 5 units of the ed device. This broke things like the snd_emu10k1 device, which required quotes to make it parse right. The no-longer-needed quotes have been removed from NOTES, GENERIC etc. eg, I've removed the quotes from: device snd_maestro device "snd_maestro3" device snd_mss I believe everything will still compile and work after this.
* Per letter dated July 22, 1999, delete clause 3 from code directlyimp2004-08-071-4/+0
| | | | from Berkeley.
* Fix a few glitches in my previous commit.cognet2004-05-111-2/+1
| | | | This makes config(8) WARNS?=6 compliant.
* Add a new "files" directive, which allows to include a files.foo file directlycognet2004-05-091-27/+32
| | | | | from a kernel config file. Bump config version to reflect this change.
* Not particularly pretty hack to generate rules to make .ln filesmarkm2003-06-161-2/+10
| | | | | | | from .c files. Actually, this is overkill, as the .ln file targets are assumed from .? (any) files. This is not a problem in practice, merely a bit untidy, as the linting rules DTRT. See the sys/conf/* and sys/mk/* files for usage.
* Don't convert the kernel ident to uppercase when writing the Makefile.des2003-04-241-1/+1
|
* Avoid emitting duplicate makefile entries.phk2003-04-121-1/+4
|
* Convert to using <sys/queue.h> macros.ru2003-02-151-18/+12
|
* Moved the setting of all profiling-related variables except the key onebde2002-07-131-11/+7
| | | | | | | | (PROFLEVEL) to kern.pre.mk so that it is easier to manage. Bumped config version to match. Moved the check for cputype being configured to a less bogus place in mkmakefile.c.
* Commit some infrastructure for turning on -Werror for kernel compiles.peter2002-02-201-3/+11
| | | | | | It doesn't actually do it yet though. This adds a flag to config so that we can exclude certain vendor files from this even when the rest of the kernel has it on. make -DNO_WERROR would also bypass all of it.
OpenPOWER on IntegriCloud