WKern
|
Functions | |
yes () | |
Prints a "YES" message in green. | |
no () | |
Prints a "NO" message in red. | |
run_check (desc, cmd, fatal=True) | |
Runs a shell command and checks its success. | |
check_tool (tool) | |
Checks if a given tool is available in PATH. | |
check_cc_flag (flag) | |
Checks if a compiler flag is accepted by i686-elf-gcc. | |
check_ld_flag (flag) | |
Checks if a linker flag is accepted by i686-elf-ld. |
Variables | |
str | BLUE = "\033[0;34m" |
str | RED = "\033[0;31m" |
str | GREEN = "\033[0;32m" |
str | YELLOW = "\033[0;33m" |
str | MAGENTA = "\033[0;35m" |
str | CYAN = "\033[0;36m" |
str | CLEAR = "\033[0m" |
list | tmp_files = ["tmp.c", "tmp.asm", "tmp.o", "disk.img"] |
start_time = time.time() | |
int | reconfigure = "--reconfigure" |
missing_ok | |
list | tools = ["make", "nasm", "i686-elf-gcc", "i686-elf-ld", "i686-elf-grub-mkrescue", "qemu-system-i386"] |
shell | |
True | |
stdout | |
DEVNULL | |
stderr | |
list | cc_flags = ["-ffreestanding", "-nostdlib", "-fno-pie", "-m32", "-O2", "-fno-omit-frame-pointer", "-std=c99", "-g"] |
list | ld_flags = ["-melf_i386", "-n", "--oformat=elf32-i386"] |
parents | |
exist_ok | |
check | |
end_time = time.time() | |
elapsed = end_time - start_time |
configure.check_cc_flag | ( | flag | ) |
Checks if a compiler flag is accepted by i686-elf-gcc.
flag | The compiler flag to test (e.g. -ffreestanding) |
Definition at line 75 of file configure.py.
configure.check_ld_flag | ( | flag | ) |
Checks if a linker flag is accepted by i686-elf-ld.
flag | The linker flag to test (e.g. --oformat=elf32-i386) |
Definition at line 89 of file configure.py.
configure.check_tool | ( | tool | ) |
Checks if a given tool is available in PATH.
tool | Name of the tool (e.g. make, nasm, etc.) |
Definition at line 63 of file configure.py.
configure.no | ( | ) |
Prints a "NO" message in red.
Definition at line 41 of file configure.py.
configure.run_check | ( | desc, | |
cmd, | |||
fatal = True ) |
Runs a shell command and checks its success.
desc | Description of the check |
cmd | Shell command to run |
fatal | If True, exit on failure |
Definition at line 49 of file configure.py.
configure.yes | ( | ) |
Prints a "YES" message in green.
Definition at line 37 of file configure.py.
str configure.BLUE = "\033[0;34m" |
Definition at line 23 of file configure.py.
list configure.cc_flags = ["-ffreestanding", "-nostdlib", "-fno-pie", "-m32", "-O2", "-fno-omit-frame-pointer", "-std=c99", "-g"] |
Definition at line 131 of file configure.py.
configure.check |
Definition at line 153 of file configure.py.
str configure.CLEAR = "\033[0m" |
Definition at line 29 of file configure.py.
str configure.CYAN = "\033[0;36m" |
Definition at line 28 of file configure.py.
configure.DEVNULL |
Definition at line 120 of file configure.py.
configure.elapsed = end_time - start_time |
Definition at line 156 of file configure.py.
configure.end_time = time.time() |
Definition at line 155 of file configure.py.
configure.exist_ok |
Definition at line 149 of file configure.py.
str configure.GREEN = "\033[0;32m" |
Definition at line 25 of file configure.py.
list configure.ld_flags = ["-melf_i386", "-n", "--oformat=elf32-i386"] |
Definition at line 137 of file configure.py.
str configure.MAGENTA = "\033[0;35m" |
Definition at line 27 of file configure.py.
configure.missing_ok |
Definition at line 110 of file configure.py.
configure.parents |
Definition at line 149 of file configure.py.
int configure.reconfigure = "--reconfigure" |
Definition at line 103 of file configure.py.
str configure.RED = "\033[0;31m" |
Definition at line 24 of file configure.py.
configure.shell |
Definition at line 120 of file configure.py.
configure.start_time = time.time() |
Definition at line 102 of file configure.py.
configure.stderr |
Definition at line 120 of file configure.py.
configure.stdout |
Definition at line 120 of file configure.py.
list configure.tmp_files = ["tmp.c", "tmp.asm", "tmp.o", "disk.img"] |
Definition at line 32 of file configure.py.
list configure.tools = ["make", "nasm", "i686-elf-gcc", "i686-elf-ld", "i686-elf-grub-mkrescue", "qemu-system-i386"] |
Definition at line 114 of file configure.py.
configure.True |
Definition at line 120 of file configure.py.
str configure.YELLOW = "\033[0;33m" |
Definition at line 26 of file configure.py.