WKern
Loading...
Searching...
No Matches
configure Namespace Reference

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

Function Documentation

◆ check_cc_flag()

configure.check_cc_flag ( flag)

Checks if a compiler flag is accepted by i686-elf-gcc.

Parameters
flagThe compiler flag to test (e.g. -ffreestanding)

Definition at line 75 of file configure.py.

◆ check_ld_flag()

configure.check_ld_flag ( flag)

Checks if a linker flag is accepted by i686-elf-ld.

Parameters
flagThe linker flag to test (e.g. --oformat=elf32-i386)

Definition at line 89 of file configure.py.

◆ check_tool()

configure.check_tool ( tool)

Checks if a given tool is available in PATH.

Parameters
toolName of the tool (e.g. make, nasm, etc.)

Definition at line 63 of file configure.py.

◆ no()

configure.no ( )

Prints a "NO" message in red.

Definition at line 41 of file configure.py.

◆ run_check()

configure.run_check ( desc,
cmd,
fatal = True )

Runs a shell command and checks its success.

Parameters
descDescription of the check
cmdShell command to run
fatalIf True, exit on failure

Definition at line 49 of file configure.py.

◆ yes()

configure.yes ( )

Prints a "YES" message in green.

Definition at line 37 of file configure.py.

Variable Documentation

◆ BLUE

str configure.BLUE = "\033[0;34m"

Definition at line 23 of file configure.py.

◆ cc_flags

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.

◆ check

configure.check

Definition at line 153 of file configure.py.

◆ CLEAR

str configure.CLEAR = "\033[0m"

Definition at line 29 of file configure.py.

◆ CYAN

str configure.CYAN = "\033[0;36m"

Definition at line 28 of file configure.py.

◆ DEVNULL

configure.DEVNULL

Definition at line 120 of file configure.py.

◆ elapsed

configure.elapsed = end_time - start_time

Definition at line 156 of file configure.py.

◆ end_time

configure.end_time = time.time()

Definition at line 155 of file configure.py.

◆ exist_ok

configure.exist_ok

Definition at line 149 of file configure.py.

◆ GREEN

str configure.GREEN = "\033[0;32m"

Definition at line 25 of file configure.py.

◆ ld_flags

list configure.ld_flags = ["-melf_i386", "-n", "--oformat=elf32-i386"]

Definition at line 137 of file configure.py.

◆ MAGENTA

str configure.MAGENTA = "\033[0;35m"

Definition at line 27 of file configure.py.

◆ missing_ok

configure.missing_ok

Definition at line 110 of file configure.py.

◆ parents

configure.parents

Definition at line 149 of file configure.py.

◆ reconfigure

int configure.reconfigure = "--reconfigure"

Definition at line 103 of file configure.py.

◆ RED

str configure.RED = "\033[0;31m"

Definition at line 24 of file configure.py.

◆ shell

configure.shell

Definition at line 120 of file configure.py.

◆ start_time

configure.start_time = time.time()

Definition at line 102 of file configure.py.

◆ stderr

configure.stderr

Definition at line 120 of file configure.py.

◆ stdout

configure.stdout

Definition at line 120 of file configure.py.

◆ tmp_files

list configure.tmp_files = ["tmp.c", "tmp.asm", "tmp.o", "disk.img"]

Definition at line 32 of file configure.py.

◆ tools

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.

◆ True

configure.True

Definition at line 120 of file configure.py.

◆ YELLOW

str configure.YELLOW = "\033[0;33m"

Definition at line 26 of file configure.py.