[RFC] build system replacement
Denys Vlasenko
vda.linux at googlemail.com
Wed May 7 15:29:28 UTC 2008
Hi.
I noticed that uclibc build system is broken.
After I touch a file, running make won't rebuild it.
I love hacking on makefiles as much as anyone else,
but this was simply way below acceptable.
So I decided to replace build system, using my
experience in replacing build system for busybox.
For busybox, I simply adapted Linux kernel build system.
It is much bigger than needed for busybox and I ended up
having unused features, but in the end of a day, it worked
wonderfully ever since.
This time, I decided "to make it right" and not carry
kernel's build system idiosyncrasies.
It took me nearly a week but now the first cut is ready.
It does not modify any existing files, and adds these
new ones:
.:
-rw-r--r-- 1 root root 1574 May 7 17:15 Kbuild
-rw-r--r-- 1 root root 4618 May 7 17:18 Makefile.new
./libc:
-rw-r--r-- 1 root root 503 May 6 12:56 Kbuild
./libc/inet:
-rw-r--r-- 1 root root 1262 May 6 12:56 Kbuild
./libc/inet/rpc:
-rw-r--r-- 1 root root 1065 May 6 12:56 Kbuild
./libc/misc:
-rw-r--r-- 1 root root 529 May 6 12:58 Kbuild
./libc/misc/assert:
-rw-r--r-- 1 root root 208 May 6 12:59 Kbuild
./libc/misc/ctype:
-rw-r--r-- 1 root root 631 May 6 12:58 Kbuild
./libc/misc/dirent:
-rw-r--r-- 1 root root 368 May 6 12:59 Kbuild
./libc/misc/error:
-rw-r--r-- 1 root root 208 May 6 12:59 Kbuild
./libc/misc/file:
-rw-r--r-- 1 root root 237 May 6 12:56 Kbuild
./libc/misc/fnmatch:
-rw-r--r-- 1 root root 266 May 6 12:59 Kbuild
./libc/misc/ftw:
-rw-r--r-- 1 root root 233 May 6 12:56 Kbuild
./libc/misc/glob:
-rw-r--r-- 1 root root 335 May 6 12:57 Kbuild
./libc/misc/gnu:
-rw-r--r-- 1 root root 208 May 6 12:56 Kbuild
./libc/misc/internals:
-rw-r--r-- 1 root root 894 May 5 04:13 Kbuild
./libc/misc/locale:
-rw-r--r-- 1 root root 424 May 6 12:59 Kbuild
./libc/misc/mntent:
-rw-r--r-- 1 root root 208 May 6 12:58 Kbuild
./libc/misc/pthread:
-rw-r--r-- 1 root root 228 May 6 12:56 Kbuild
./libc/misc/regex:
-rw-r--r-- 1 root root 260 May 6 12:59 Kbuild
./libc/misc/search:
-rw-r--r-- 1 root root 467 May 6 12:58 Kbuild
./libc/misc/statfs:
-rw-r--r-- 1 root root 270 May 6 12:58 Kbuild
./libc/misc/syslog:
-rw-r--r-- 1 root root 208 May 6 12:58 Kbuild
./libc/misc/sysvipc:
-rw-r--r-- 1 root root 415 May 2 12:55 Kbuild
./libc/misc/time:
-rw-r--r-- 1 root root 696 May 6 12:57 Kbuild
./libc/misc/ttyent:
-rw-r--r-- 1 root root 208 May 6 12:58 Kbuild
./libc/misc/utmp:
-rw-r--r-- 1 root root 208 May 6 12:57 Kbuild
./libc/misc/wchar:
-rw-r--r-- 1 root root 767 May 6 12:59 Kbuild
./libc/misc/wctype:
-rw-r--r-- 1 root root 554 May 2 12:55 Kbuild
./libc/misc/wordexp:
-rw-r--r-- 1 root root 228 May 6 12:58 Kbuild
./libc/pwd_grp:
-rw-r--r-- 1 root root 271 May 6 12:58 Kbuild
./libc/signal:
-rw-r--r-- 1 root root 841 May 6 12:57 Kbuild
./libc/stdio:
-rw-r--r-- 1 root root 2917 May 6 12:58 Kbuild
./libc/stdlib:
-rw-r--r-- 1 root root 2623 May 5 04:13 Kbuild
./libc/stdlib/malloc:
-rw-r--r-- 1 root root 656 May 3 10:57 Kbuild
./libc/stdlib/malloc-simple:
-rw-r--r-- 1 root root 306 May 3 10:57 Kbuild
./libc/stdlib/malloc-standard:
-rw-r--r-- 1 root root 380 May 3 10:57 Kbuild
./libc/string:
-rw-r--r-- 1 root root 1681 May 6 12:57 Kbuild
./libc/string/generic:
./libc/string/i386:
./libc/string/x86_64:
./libc/sysdeps:
-rw-r--r-- 1 root root 182 May 3 10:57 Kbuild
./libc/sysdeps/linux:
-rw-r--r-- 1 root root 287 May 3 15:37 Kbuild
./libc/sysdeps/linux/common:
-rw-r--r-- 1 root root 1333 May 3 11:09 Kbuild
./libc/sysdeps/linux/i386:
-rw-r--r-- 1 root root 366 May 3 15:37 Kbuild
./libc/termios:
-rw-r--r-- 1 root root 208 May 6 12:57 Kbuild
./libc/unistd:
-rw-r--r-- 1 root root 883 May 6 12:57 Kbuild
./libcrypt:
-rw-r--r-- 1 root root 335 May 6 01:52 Kbuild
./libintl:
-rw-r--r-- 1 root root 563 May 6 13:52 Kbuild
./libm:
-rw-r--r-- 1 root root 3961 May 6 01:52 Kbuild
./libm/i386:
-rw-r--r-- 1 root root 371 May 6 01:52 Kbuild
./libm/powerpc:
./libm/powerpc/classic:
-rw-r--r-- 1 root root 291 May 6 01:52 Kbuild
./libm/powerpc/e500:
-rw-r--r-- 1 root root 263 May 6 01:52 Kbuild
./libm/powerpc/e500/fpu:
-rw-r--r-- 1 root root 291 May 6 01:52 Kbuild
./libnsl:
-rw-r--r-- 1 root root 333 May 6 01:52 Kbuild
./libresolv:
-rw-r--r-- 1 root root 338 May 6 01:52 Kbuild
./librt:
-rw-r--r-- 1 root root 334 May 6 01:52 Kbuild
./libutil:
-rw-r--r-- 1 root root 334 May 6 01:52 Kbuild
./scripts:
-rw-r--r-- 1 root root 4516 May 6 01:52 Kbuild.include
-rw-r--r-- 1 root root 3971 May 3 16:49 Kbuild.install
-rw-r--r-- 1 root root 15843 May 6 13:52 Kbuild.klibc
-rw-r--r-- 1 root root 3043 May 3 16:51 Makefile.clean
-rw-r--r-- 1 root root 14108 May 6 01:52 Makefile.flags
-rw-r--r-- 1 root root 6179 May 3 17:33 Makefile.host
-rwxr-xr-x 1 root root 425 May 6 13:56 debug_compare_libs
-rwxr-xr-x 1 root root 1613 May 4 08:57 generate_h.sh
./scripts/basic:
-rw-r--r-- 1 root root 102 May 2 12:55 Kbuild
-rw-r--r-- 1 root root 9482 May 2 12:55 fixdep.c
-rwxr-xr-x 1 root root 500 May 6 12:27 strip.sh
Makefile.new carries the following explanation:
# This file is a part of an experimental new build system.
#
# New build system is ortogonal to existing one.
# They will co-exist for some time.
# New system consists of Makefile.new (this file),
# scripts/* directory, and Kbuild files scattrered in source directories.
# It does not use Makefile[.in] files, those are from pre-existing system.
#
# "Old" build system is still fully functional and is recommended
# for general use. No usage changes for it.
#
# In order to build uclibc with new system, use
# make [ARCH=xxx V=1 etc] -f Makefile.new ...
#
# Currently, it was tested to produce byte-identical object files
# in i386 static build. More testing is underway (2008-05).
#
# See scripts/Kbuild.klibc for the information how to write Kbuild files.
I would like to commit it to svn, allowing any volunteers to
try it.
I will continue working on it with the goal of making it generally
usable over few next weeks.
Any objections for this commit?
--
vda
More information about the uClibc
mailing list