summaryrefslogtreecommitdiff
path: root/scripts/mkcompile_h
AgeCommit message (Collapse)Author
2009-12-12kbuild: move autoconf.h to include/generatedSam Ravnborg
Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
2009-10-11kbuild: mkcompile_h: trivial cleanupsFelipe Contreras
UTS_TRUNCATTE is simpler this way, and now editors idetify this as a shell script. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-10-11kbuild: fix warning when domainname is not availableFelipe Contreras
Otherwise we get: "dnsdomainname: Unknown host" Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-12-03kbuild: kill output in silent mode of mkcompile_hMike Frysinger
The mkcompile_h script does `echo` regardless of silent mode the make is running at, so have it respect $quiet from kbuild and only echo when not in silent mode. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-05-02kbuild: override build timestamp & versionSam Ravnborg
Introduce KBUILD_BUILD_VERSION to make it possible to override kernel build version during build time. Introduce KBUILD_BUILD_TIMESTAMP to make it possible to override kernel build timestamp during build time. But variables are useful mainly by distros that want to pass info from an SCM when building the kernel. Timestamp could be last checkin date for a file etc. The idea came from Olaf Hering <olaf@aepfle.de> Cc: Olaf Hering <olaf@aepfle.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-02-14[PATCH] Make mkcompile_h use LANG=C and LC_ALL=C for $CC -vs situert
Fix a minor bug in mkcompile_h. As one can see, the current locale is used while getting the version of gcc. This produces problems when a locale other than C or en_US is used. As an example, my /proc/version contains Turkish characters in iso-8859-9 encoding. This patch fixes this issue by making sure that the C locale is used to get gcc's version. Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2005-07-14kbuild: "PREEMPT" in UTS_VERSIONSam Ravnborg
From: Matt Mackall <mpm@selenic.com> Add PREEMPT to UTS_VERSION where enabled as is done for SMP to make preempt kernels easily identifiable. Added SMP PREEMPT as comment in compile.h to force it to be updated when they change (sam). Signed-off-by: Matt Mackall <mpm@selenic.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2003-09-09[PATCH] really use english date in version stringAndrew Morton
From: Andrey Borzenkov <arvidjaar@mail.ru> LANG is not always enough to force date to english.
2003-07-31[PATCH] fix posix compliance for mkcompile_h scriptAlan Cox
2003-03-07kbuild: Do not clutter output with make -jNSam Ravnborg
Added a new rule filechk used to check when a generated file actually is changed. If there is no actual changes the file is left without updating the timestamp. When building a kernel from scratch two printouts occurs: CHK file-to-generate UPD file-to-generate The first line tell that kbuild checks the file, second line tell that the file is being updated (or created). On successive runs only the first line is printed. Output is the same in verbose and non-verbose mode. This replaces the former update-if-changed which has been deleted. generate-asm-offsets.h has been renamed as well. All users are updated in next patch. Output when generating compile.h follow above style
2002-10-06kbuild: Fix kallsyms buildKai Germaschewski
After reverting my nice but totally broken idea about accelerating the linking steps, make the three-stage .tmp_kallsyms.o generation / addition work again. Yeah, that means that we now link vmlinux three times when CONFIG_KALLSYMS is set, and that's annoying.
2002-09-18kbuild: Fix build number generationKai Germaschewski
For some inexplicable reason, I broke the dependency on a new build number some time ago - it worked fine before, and now it does again. (Whenever vmlinux is relinked, the build number is incremented, and now it ends in the version string again, as it should) Noted by Anton Blanchard.
2002-09-12kbuild: Use normal rule for preprocessing vmlinux.lds.SKai Germaschewski
Use the same rule as in Rules.make for preprocessing vmlinux.lds.S, that also gives automatic dependency tracking. This means we should also use the standard AFLAGS_... instead of CPPFLAGS_... to provide specific additional flags.
2002-07-27kbuild: Make scripts/compile.h when sh != bashKai Germaschewski
Contributed by Arkadiusz Miskiewicz
2002-07-27kbuild: Fix compiling/installing as different usersKai Germaschewski
"make bzImage && sudo make install" had the problem that during the "sudo make install" the build system would notice that the information in include/linux/compile.h is not accurate (it says "compiled by <user>", but we are root), thus causing compile.h to be updated and leading to some recompiles. We now only update "compile.h" if the current user is the owner of include/linux/autoconf.h, i.e. the user who did the "make *config". So the above sequence will correctly state "compiled by <user>".
2002-06-06kbuild: Enforce UTS limit, use LANG=C for date/timeKai Germaschewski
Patch by Keith Owens, ported to 2.5. If the length of $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) exceeds 64 characters it silently corrupts the utsname data, resulting in garbage for uname -r and problems running the kernel and modules. Abort if KERNELRELEASE is too long. Truncation is not good enough, it results in ambiguous /lib/modules/`uname -r` contents. Ensure that the date/time in uname are always in LANG=C. Users with other languages report that 8 bit values cause the boot messages to go haywire.
2002-06-05kbuild: Fix calling of scriptsKai Germaschewski
We source some scripts, but still pass parameters to them, e.g. . mk_version_h $@ $(KERNELRELEASE) $(VERSION) ... This does not work for all kinds of /bin/sh (it does for bash, that's why I did not notice). The fix is easy: Just mark the scripts executable and call instead of source them. Unfortunately, patch(1) doesn't understand about propagating chmod. bk does, so changing the tree isn't hard, and we introduce an explicit chmod a+x executed during the build for propagating this change into those trees which get "traditionally" patched up.
2002-06-05kbuild: Fix make -s (silent) and add a quiet modeKai Germaschewski
Suppress echoing of commands when using "make -s", so that make -s does indeed have the effect one would expect. Add a quiet mode, which will print not the entire command but only one line per rule. To turn it on, use make KBUILD_VERBOSE=0 vmlinux/whatever or set KBUILD_VERBOSE=0 in your environment. For now, the verbose mode is default, which gives you the old behavior of printing all commands. The output in quiet mode is based on what Keith Owens' kbuild-2.5 does, I like, I did not want to invent yet another output format.
2002-05-22kbuild: Fix warning when .version doesn't exist yetKai Germaschewski
2002-05-20kbuild: Standardize building of init/*Kai Germaschewski
There's no good reason to build the objects in init/ explicitly from the top-level Makefile. Instead, handle init/ like every other subdir, which also provides the automatic checks for a changed command line etc.
2002-05-11Makefile cleanup: Don't rebuild init/version.o on each buildKai Germaschewski
init/version.o includes include/linux/compile.h. As compile.h was regenerated each time make was run, init/version.o was recompiled each time. To avoid this, use the following solution: Generate a temporary new compile.h, and only replace the old one if the new one is different. We consider the files different if more than just date/time changed, since otherwise we would have to rebuild every time anyway. Still, the two files turned out to be different all the time, as we put a generation number into them which is incremented at each invocation of "make". The generation number update is now only done when the kernel config changes, which makes more sense, anyway. So, the UTS_VERSION and generation number now relate to the time the kernel was configured, not the time the actual "make vmlinux" was run, which should be fine.
2002-05-11Add scripts to generate include/linux/{version,compile}.hKai Germaschewski
Also, put the #define UTS_MACHINE ... from the command line into the header as well.