From 32b9a6d76790c73d3d2d36d9081a2581cc65d184 Mon Sep 17 00:00:00 2001 From: Minep Date: Wed, 10 Jul 2024 19:08:56 +0100 Subject: [PATCH 1/1] ld-tool portability fix: MacOS build experience * fix: makefile fail to build due to line feed character not being recognise as valid separator * change shebang to more portable of /usr/bin/env --- lunaix-os/kernel.mk | 4 ++-- lunaix-os/scripts/build-tools/integration/build_gen.py | 7 +++---- lunaix-os/scripts/gen_ksymtable.sh | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lunaix-os/kernel.mk b/lunaix-os/kernel.mk index dff0de2..86f4668 100644 --- a/lunaix-os/kernel.mk +++ b/lunaix-os/kernel.mk @@ -19,11 +19,11 @@ CFLAGS += $(khdr_opts) $(kinc_opts) $(config_h) -MMD -MP -include $(ksrc_deps) -%.S.o: %.S $(khdr_files) kernel.mk +%.S.o: %.S kernel.mk $(call status_,AS,$<) @$(CC) $(CFLAGS) -c $< -o $@ -%.c.o: %.c $(khdr_files) kernel.mk +%.c.o: %.c kernel.mk $(call status_,CC,$<) @$(CC) $(CFLAGS) -c $< -o $@ diff --git a/lunaix-os/scripts/build-tools/integration/build_gen.py b/lunaix-os/scripts/build-tools/integration/build_gen.py index 83c9904..6b1cde7 100644 --- a/lunaix-os/scripts/build-tools/integration/build_gen.py +++ b/lunaix-os/scripts/build-tools/integration/build_gen.py @@ -9,11 +9,10 @@ class MakefileBuildGen(BuildGenerator): def emit_makearray(self, name, values): r = [] - r.append(f"define {name}") + r.append(f"{name} :=") for v in values: - r.append(v) - r.append("endef") - return r + r.append(f"{v}") + return [" ".join(r)] def generate(self, env: BuildEnvironment): path = env.to_wspath(self.__path) diff --git a/lunaix-os/scripts/gen_ksymtable.sh b/lunaix-os/scripts/gen_ksymtable.sh index 6b59e4d..720dc55 100755 --- a/lunaix-os/scripts/gen_ksymtable.sh +++ b/lunaix-os/scripts/gen_ksymtable.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash sym_types=$1 bin=$2 -- 2.27.0