aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/config/mkmakefile.c
Commit message (Collapse)AuthorAgeFilesLines
* Don't leak files.Warner Losh2006-10-241-3/+2
| | | | | | | | | This also eliminates the need for ifp init. Submitted by: ru@ Notes: svn path=/head/; revision=163640
* End my resistance to jmg's multiple hints files and bring in supportWarner Losh2006-10-241-9/+6
| | | | | | | | for having multiple hints files generate a correct hints.c (eg, with all the specified ones catenated together). Notes: svn path=/head/; revision=163638
* Added rudimentary support for the "include" directive (inside "files").Ruslan Ermilov2006-10-011-0/+14
| | | | | | | | This will be used to split sys/conf/files into multiple files similar to how this is done in NetBSD. Notes: svn path=/head/; revision=162936
* Remove an unused variable.Stefan Farfeleder2006-07-191-2/+1
| | | | Notes: svn path=/head/; revision=160495
* Use calloc() instead of zeroing the memory our own.Xin LI2006-06-071-2/+1
| | | | Notes: svn path=/head/; revision=159362
* Allow newer config versions to config older versions with the sameWarner Losh2006-02-031-1/+2
| | | | | | | | | | | major number. Reviewed by: ru@, jhb@, arch@ (a few months ago) # this is subject to refinement based on experience. Notes: svn path=/head/; revision=155240
* - Avoid adding devices multiple times to the device list.Ruslan Ermilov2005-12-301-5/+2
| | | | | | | | | - Avoid adding options multiple times to the option list. Based on a patch by: Matt Emmerton <matt@gsicomp.on.ca> Notes: svn path=/head/; revision=153889
* Clean up most of the "XXX"-tagged items:Ruslan Ermilov2005-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> Notes: svn path=/head/; revision=153888
* Make config(8) understand ORed dependecies in "files*" andRuslan Ermilov2005-11-271-11/+21
| | | | | | | improve tracking of known devices. Bump config(8) version. Notes: svn path=/head/; revision=152862
* Clean some code that became obfuscated over the years:Ruslan Ermilov2005-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. Notes: svn path=/head/; revision=152811
* Kill count device support from config. I've changed the last fewPeter Wemm2004-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. Notes: svn path=/head/; revision=134542
* Per letter dated July 22, 1999, delete clause 3 from code directlyWarner Losh2004-08-071-4/+0
| | | | | | | from Berkeley. Notes: svn path=/head/; revision=133248
* Fix a few glitches in my previous commit.Olivier Houchard2004-05-111-2/+1
| | | | | | | This makes config(8) WARNS?=6 compliant. Notes: svn path=/head/; revision=129119
* Add a new "files" directive, which allows to include a files.foo file directlyOlivier Houchard2004-05-091-27/+32
| | | | | | | | from a kernel config file. Bump config version to reflect this change. Notes: svn path=/head/; revision=129073
* Not particularly pretty hack to generate rules to make .ln filesMark Murray2003-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. Notes: svn path=/head/; revision=116450
* Don't convert the kernel ident to uppercase when writing the Makefile.Dag-Erling Smørgrav2003-04-241-1/+1
| | | | Notes: svn path=/head/; revision=113951
* Avoid emitting duplicate makefile entries.Poul-Henning Kamp2003-04-121-1/+4
| | | | Notes: svn path=/head/; revision=113397
* Convert to using <sys/queue.h> macros.Ruslan Ermilov2003-02-151-18/+12
| | | | Notes: svn path=/head/; revision=110895
* Moved the setting of all profiling-related variables except the key oneBruce Evans2002-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. Notes: svn path=/head/; revision=99923
* Commit some infrastructure for turning on -Werror for kernel compiles.Peter Wemm2002-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. Notes: svn path=/head/; revision=91002
* Use includes to get prototypes for hints and env arrays.Peter Wemm2001-09-171-0/+8
| | | | | | | Submitted by: bde Notes: svn path=/head/; revision=83594
* Enable hardwiring of things like tunables from embedded enironmentsPeter Wemm2001-08-271-13/+49
| | | | | | | that do not start from loader(8). Notes: svn path=/head/; revision=82393
* Put on my peril-sensitive sunglasses and remove the POLA-violatingPeter Wemm2001-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?? Notes: svn path=/head/; revision=79705
* Some more tidying up. we dont use config-dependent anyware. EliminatePeter Wemm2001-02-281-15/+3
| | | | | | | some duplicate code (cut/paste bug?). tidy up some other minor stuff. Notes: svn path=/head/; revision=73204
* s/special/compilewith/ (so I stop confusing myself) and GC an unusedPeter Wemm2001-02-281-26/+11
| | | | | | | function I missed before. Notes: svn path=/head/; revision=73199
* Untangle some special magic that happened for conflicting defintions forPeter Wemm2001-02-281-17/+0
| | | | | | | local files.* and options.* files on the third pass. Notes: svn path=/head/; revision=73198
* Remove some more dead code. :-/Peter Wemm2001-02-281-10/+4
| | | | Notes: svn path=/head/; revision=73193
* GC some leftover stuff (device-driver suffix)Peter Wemm2001-02-281-7/+0
| | | | Notes: svn path=/head/; revision=73192
* Move the 'dont forget "make depend"' to be the last thing that people see,Peter Wemm2001-02-231-2/+0
| | | | | | | after the warnings. Notes: svn path=/head/; revision=72927
* ${BDECFLAGS} work. And fix a real error in the process. A "MAXUSERS"Peter Wemm2001-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. Notes: svn path=/head/; revision=72684
* Devices are NOT compiled with the "special c2 option -i"..Peter Wemm2001-02-181-3/+0
| | | | Notes: svn path=/head/; revision=72674
* Unwind a bit more cruft - we only have one type of device now.Peter Wemm2001-01-311-3/+1
| | | | Notes: svn path=/head/; revision=71879
* Clean up some obsolete stuff. config -r has not been needed since aroundPeter Wemm2001-01-221-1/+2
| | | | | | | | | FreeBSD 3.x or so when the 'make depend' picked up the opt_foo.h files. Convert warnings into actual errors in the hope that buildkernel users will pay more attention. :-( Notes: svn path=/head/; revision=71363
* Stop turning 'mandatory' into an implicit 'count' line. i386/npx was thePeter Wemm2001-01-191-1/+0
| | | | | | | only consumer of this and it is no longer needed. Notes: svn path=/head/; revision=71258
* Make the xxxFILES= list generation generic. This makes it easier to addPeter Wemm2000-11-251-62/+18
| | | | | | | things like MFILES= or CONFFILES= without having to modify config code. Notes: svn path=/head/; revision=69135
* Fix buffer overflows in filenames. If you had a path > 80 charactersWarner Losh2000-11-211-5/+9
| | | | | | | | | | | | | for your /usr/obj/path/to/my/files path to the kernel, then weird things happened. make buildkernel would fail because config was dumping core or generating bad file names (depending on the lenght of the path). While I was here, also use strlcpy, strlcat and snprintf (or asprintf) as necessary. Minor format policing for the snprintf calls as well. Notes: svn path=/head/; revision=69004
* If a ${KERNEL}.hints file exists, and no hints are specified explicitly,Peter Wemm2000-08-251-0/+7
| | | | | | | | then include the hints with a marker indicating that it is a fallback. The kernel side of this is to come shortly. Notes: svn path=/head/; revision=65091
* Argh! I broke the static hints parser at the last minute on freefall whenPeter Wemm2000-06-141-1/+1
| | | | | | | | | | I added the $FreeBSD$ (commented) line. Fix: 1: s/break/continue/ 2: will somebody please shoot me! :-] Notes: svn path=/head/; revision=61652
* Borrow phk's axe and apply the next stage of config(8)'s evolution.Peter Wemm2000-06-131-67/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use Warner Losh's "hint" driver to decode ascii strings to fill the resource table at boot time. config(8) no longer generates an ioconf.c table - ie: the configuration no longer has to be compiled into the kernel. You can reconfigure your isa devices with the likes of this at loader(8) time: set hint.ed.0.port=0x320 userconfig will be rewritten to use this style interface one day and will move to /boot/userconfig.4th or something like that. It is still possible to statically compile in a set of hints into a kernel if you do not wish to use loader(8). See the "hints" directive in GENERIC as an example. All device wiring has been moved out of config(8). There is a set of helper scripts (see i386/conf/gethints.pl, and the same for alpha and pc98) that extract the 'at isa? port foo irq bar' from the old files and produces a hints file. If you install this file as /boot/device.hints (and update /boot/defaults/loader.conf - You can do a build/install in sys/boot) then loader will load it automatically for you. You can also compile in the hints directly with: hints "device.hints" as well. There are a few things that I'm not too happy with yet. Under this scheme, things like LINT would no longer be useful as "documentation" of settings. I have renamed this file to 'NOTES' and stored the example hints strings in it. However... this is not something that config(8) understands, so there is a script that extracts the build-specific data from the documentation file (NOTES) to produce a LINT that can be config'ed and built. A stack of man4 pages will need updating. :-/ Also, since there is no longer a difference between 'device' and 'pseudo-device' I collapsed the two together, and the resulting 'device' takes a 'number of units' for devices that still have it statically allocated. eg: 'device fe 4' will compile the fe driver with NFE set to 4. You can then set hints for 4 units (0 - 3). Also note that 'device fe0' will be interpreted as "zero units of 'fe'" which would be bad, so there is a config warning for this. This is only needed for old drivers that still have static limits on numbers of units. All the statically limited drivers that I could find were marked. Please exercise EXTREME CAUTION when transitioning! Moral support by: phk, msmith, dfr, asmodai, imp, and others Notes: svn path=/head/; revision=61640
* A checkpoint of a part of a work-in-progress. Some more cleanups forPeter Wemm2000-06-101-30/+20
| | | | | | | | | | | config(8). This commit allows control of the creation of the #include "foo.h" files. We now only create them explicitly when needed. BTW; these are mostly bad because they usually imply static limits on numbers of units for devices. eg: struct mysoftc sc[NFOO]; These static limits have Got To Go. Notes: svn path=/head/; revision=61523
* Support getting *.$MACHINE from sys/conf as well as sys/$MACHINE/conf.Peter Wemm2000-01-081-8/+15
| | | | | | | | | | | | | | | This would mean that we could move files.alpha, files.i386, files.pc98 etc all next to conf/files, and the various Makefiles next to each other. This should go a long way towards committers "seeing" the Alpha etc stuff and remembering to update that too as it would be right next to the i386 config files. Note this does not include the GENERIC etc files as they can't be shared. I haven't actually moved the files, but the support is here for it. It still supports the per-machine conf directories so that folks working on a new arch can just distribute a subdir of files. Notes: svn path=/head/; revision=55614
* Add a 'warning' option for the files* files. This is intended to enablePeter Wemm1999-12-121-2/+17
| | | | | | | giving a dire warning about certain drivers going away in the future. Notes: svn path=/head/; revision=54490
* A better version of the previous checkin. If the user specifiesArchie Cobbs1999-12-031-3/+9
| | | | | | | | a custom file that could override a FreeBSD file under a different configuration, but doesn't under this one, give a different warning. Notes: svn path=/head/; revision=54047
* When specifying additiona user-specified kernel compilation sourceArchie Cobbs1999-12-021-1/+1
| | | | | | | | | | | | | | | | | | | files in a 'files.XXX' file, config allows non-FreeBSD source files with the same name as a FreeBSD source file to override the latter, and in this situation it issues a warning. However, if one of the user-specified files is actually a FreeBSD source file (perhaps your kernel has some custom option that requires that file), config mistakenly thinks it's a completely new file and goes ahead and overrides all previous information for that file (and issues the warning). Fix this. With help from: julian Notes: svn path=/head/; revision=54044
* Add option "-d destdir" which instructs config to use another outputMarcel Moolenaar1999-10-301-0/+2
| | | | | | | | | | | | | | | | | | | directory than the default one. If the option is not given, then the output of config is exactly as before. Only when an alternate output directory has been specified will config modify its behavior. Additional changed: o Remove the now conflicting and unused NODEV define. It conflicts with NODEV in sys/param.h. o Rename the now conflicting MACHINE token to ARCH. It conflicts with MACHINE in sys/param.h. o Fix some easy style bugs. o Fix some easy grammar bugs in the manpage. Approved by: peter, archie Notes: svn path=/head/; revision=52653
* Further cleanup. Also remove the following unused or defunct tokens:Peter Wemm1999-10-101-15/+9
| | | | | | | and, bio, cam, master, minor, net, priority, sequential, size, slave, trace Notes: svn path=/head/; revision=52098
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50479
* Delete special handling for 'device-driver' suffix, it's not used inPeter Wemm1999-07-031-7/+7
| | | | | | | the kernel source now. Notes: svn path=/head/; revision=48525
* Put on my viking helmet from the closet, and get out the war axe andPeter Wemm1999-05-091-68/+3
| | | | | | | "retire" some more stuff. Notes: svn path=/head/; revision=46821
* config(8) lobotomy, please see commit msg in sys.Poul-Henning Kamp1999-05-091-29/+6
| | | | | | | (I have no idea why cvs didn't take these changes before.) Notes: svn path=/head/; revision=46815