Skip to content

Commit

Permalink
c
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander.nutz committed Oct 9, 2024
1 parent 4f9cb76 commit 7b737cb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 20 deletions.
7 changes: 6 additions & 1 deletion build.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ struct CompileData target_gen_files[] = {
};

enum CompileResult target_gen() {
if (!withPipPackage("generic-lexer")) {
error("pip package generic-lexer required and could not be installted!");
return CR_FAIL;
}

START;
DO(compile(LI(target_gen_files)));
END;
Expand Down Expand Up @@ -123,7 +128,7 @@ enum CompileResult target_lib() {
START;

bool all = !exists("build/lib.a") ||
source_changed(LI(always_files));
file_changed("ir/ir.h");

VaList comp = ASVAR(always_files);

Expand Down
18 changes: 0 additions & 18 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,6 @@ FILES="ir/*.c common/*.c ir/opt/*.c ir/transform/*.c cg/x86_stupid/*.c irparser/
# shellcheck disable=SC2086

function prepare() {
if [ -z $python ]; then
echo \# detecting python...
if venv/bin/python3 --help &>/dev/null; then
python=venv/bin/python3
elif venv/Scripts/python --help &>/dev/null; then
python=venv/Scripts/python
elif python --help &>/dev/null; then
python=python
elif python3 --help &>/dev/null; then
python=python3
else
echo "python not found! tried \"python\" and \"python3\"! Set \"python\" variable or install python!"
exit 1
fi
fi
echo "# found python at: $python"
$python -m pip install generic-lexer &>/dev/null
echo "# pip generic-lexer installed"
$BUILD_CC build.c -lpthread -DVERBOSE=1 -DPYTHON="\"$python\"" -DCC="\"$CC\"" -DCC_ARGS="\"$CFLAGS\"" -DLD_ARGS="\"$EX_LDFLAGS\"" -DAR="\"$AR\"" -o build.exe
echo "# build.exe compiled"
echo "# gen cdef files"
Expand Down
2 changes: 1 addition & 1 deletion build_c
Submodule build_c updated 1 files
+124 −6 build.h

0 comments on commit 7b737cb

Please sign in to comment.