summaryrefslogtreecommitdiffstats
path: root/usr.sbin/config/mkmakefile.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r274924, r274936:ian2014-12-271-12/+12
| | | | | | | | | Consider the negation operator (!) to be a word even if it is not followed by whitespace. This allows "optional !foo" which is what most programmers are naturally going to tend to do as opposed to "optional ! foo". Fix the negation (!) operator so that it binds only to the word that immediately follows it.
* MFC: Merge in the changes in -current:imp2014-08-111-192/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support ! operator in "files" files. Improve error detection and reporting Cleanup code to make it easier to maintain. Remove mandatory keyword: it has been used for 17 years. Bump version number (we should have bumped for -I too, but didn't) r261501 | imp | 2014-02-04 17:26:11 -0700 (Tue, 04 Feb 2014) | 5 lines Fix ! by not clearing not at the bottom of the loop. Add a blank line Submitted by: bde (blank line) r261493 | imp | 2014-02-04 11:28:58 -0700 (Tue, 04 Feb 2014) | 5 lines Implement the '!' operator for files* files. It means 'include this 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. r261446 | imp | 2014-02-03 12:14:36 -0700 (Mon, 03 Feb 2014) | 5 lines Convert the loop by gotos into a for loop to improve readability. I 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... r261445 | imp | 2014-02-03 12:10:33 -0700 (Mon, 03 Feb 2014) | 4 lines Fix a bug introduced in r261437 that failed to honor "optional profiling-routine" to work, since profiling-routine is not really an option or a device, but a special case elsewhere in the code. r261444 | imp | 2014-02-03 11:56:41 -0700 (Mon, 03 Feb 2014) | 2 lines Slight cleanup to the error messaging to compress code vertically... r261442 | imp | 2014-02-03 11:31:51 -0700 (Mon, 03 Feb 2014) | 2 lines Better error messages when EOF is hit in the middle of a phrase. r261438 | imp | 2014-02-03 09:54:53 -0700 (Mon, 03 Feb 2014) | 5 lines Move the check for standard keyword + optional inclusion specifier to 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. r261437 | imp | 2014-02-03 09:47:10 -0700 (Mon, 03 Feb 2014) | 4 lines Don't believe we have a requirement until after we've checked all the known key words. This will make error messages slightly better in weird corner cases, but should otherwise be a nop. r261436 | imp | 2014-02-03 09:46:01 -0700 (Mon, 03 Feb 2014) | 3 lines In the 17 years since r30796, the mandatory keyword has never been used in any files as far as I can tell, and is currently unused. Retire it. r261435 | imp | 2014-02-03 08:10:44 -0700 (Mon, 03 Feb 2014) | 6 lines Slightly deobfuscate read_file() and likely pessimize the runtime 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.
* Use includes to get prototypes for hints and env arrays.peter2001-09-171-0/+8
| | | | Submitted by: bde
* Enable hardwiring of things like tunables from embedded enironmentspeter2001-08-271-13/+49
| | | | that do not start from loader(8).
* Put on my peril-sensitive sunglasses and remove the POLA-violatingpeter2001-07-141-0/+7
| | | | | | | stealth hints loading. 'make release' has been fixed to not need this now anyway. If you want static hints, specify it explicitly. Hey! Why did it suddenly get so dark??
* Some more tidying up. we dont use config-dependent anyware. Eliminatepeter2001-02-281-15/+3
| | | | some duplicate code (cut/paste bug?). tidy up some other minor stuff.
* s/special/compilewith/ (so I stop confusing myself) and GC an unusedpeter2001-02-281-26/+11
| | | | function I missed before.
* Untangle some special magic that happened for conflicting defintions forpeter2001-02-281-17/+0
| | | | local files.* and options.* files on the third pass.
* Remove some more dead code. :-/peter2001-02-281-10/+4
|
* GC some leftover stuff (device-driver suffix)peter2001-02-281-7/+0
|
* Move the 'dont forget "make depend"' to be the last thing that people see,peter2001-02-231-2/+0
| | | | after the warnings.
* ${BDECFLAGS} work. And fix a real error in the process. A "MAXUSERS"peter2001-02-191-8/+8
| | | | | string could have been passed to free(); There are some warnings here I am not sure how to fix as they are in the lex scanner code, etc.
OpenPOWER on IntegriCloud