From e523b9b28250353280ae2aa0e4a9c6687d5b17cb Mon Sep 17 00:00:00 2001 From: Pierre Muller Date: Mon, 16 Oct 2023 21:44:17 +0200 Subject: [PATCH] Move setting of SYSTEMDIR variable to prerules to get correct source directory for system unit on BSD targets --- rtl/dragonfly/Makefile | 2 +- rtl/dragonfly/Makefile.fpc | 4 +++- rtl/freebsd/Makefile | 2 +- rtl/freebsd/Makefile.fpc | 2 +- rtl/netbsd/Makefile | 2 +- rtl/netbsd/Makefile.fpc | 2 +- rtl/openbsd/Makefile | 2 +- rtl/openbsd/Makefile.fpc | 2 +- 8 files changed, 10 insertions(+), 8 deletions(-) diff --git a/rtl/dragonfly/Makefile b/rtl/dragonfly/Makefile index 2db4b8f663..044f8e284c 100644 --- a/rtl/dragonfly/Makefile +++ b/rtl/dragonfly/Makefile @@ -900,6 +900,7 @@ DYNLIBS_DEPS_OS=$(DLUNIT)$(PPUEXT) DYNLIBSINCDIR=$(UNIXINC) SYSCALL_DEPS_OS=sysnr.inc $(BSDPROCINC)/syscallh.inc BASEUNIX_DEPS_OS=$(SYSCTLUNIT)$(PPUEXT) +SYSTEMDIR = $(BSDINC) SYSUTILSDIR=$(UNIXINC) SYSUTILS_DEPS_OS = $(UNIXUNIT)$(PPUEXT) $(ERRORSUNIT)$(PPUEXT) loaders+=gprt0 @@ -2935,7 +2936,6 @@ SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES)) include $(PROCINC)/makefile.cpu SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES)) SYSDEPS = unxconst.inc $(SYSINCDEPS) $(SYSCPUDEPS) -SYSTEMDIR = $(BSDINC) prt0$(OEXT) : $(CPU_TARGET)/prt0.as $(AS) -o $(UNITTARGETDIRPREFIX)prt0$(OEXT) $(CPU_TARGET)/prt0.as cprt0$(OEXT) : $(CPU_TARGET)/cprt0.as diff --git a/rtl/dragonfly/Makefile.fpc b/rtl/dragonfly/Makefile.fpc index 2f884ef0da..ad7c0f48b5 100644 --- a/rtl/dragonfly/Makefile.fpc +++ b/rtl/dragonfly/Makefile.fpc @@ -69,6 +69,9 @@ DYNLIBS_DEPS_OS=$(DLUNIT)$(PPUEXT) DYNLIBSINCDIR=$(UNIXINC) SYSCALL_DEPS_OS=sysnr.inc $(BSDPROCINC)/syscallh.inc BASEUNIX_DEPS_OS=$(SYSCTLUNIT)$(PPUEXT) + +SYSTEMDIR = $(BSDINC) + SYSUTILSDIR=$(UNIXINC) SYSUTILS_DEPS_OS = $(UNIXUNIT)$(PPUEXT) $(ERRORSUNIT)$(PPUEXT) @@ -97,7 +100,6 @@ SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES)) # Put system unit dependencies together. SYSDEPS = unxconst.inc $(SYSINCDEPS) $(SYSCPUDEPS) -SYSTEMDIR = $(BSDINC) # # Loaders diff --git a/rtl/freebsd/Makefile b/rtl/freebsd/Makefile index 4c98d04d1a..a3349c5c57 100644 --- a/rtl/freebsd/Makefile +++ b/rtl/freebsd/Makefile @@ -901,6 +901,7 @@ DOSDIR=$(UNIXINC) DYNLIBS_DEPS_OS=$(DLUNIT)$(PPUEXT) DYNLIBSINCDIR=$(UNIXINC) SYSCALL_DEPS_OS = sysnr.inc $(BSDPROCINC)/syscallh.inc +SYSTEMDIR = $(BSDINC) SYSUTILSDIR=$(UNIXINC) SYSUTILS_DEPS_OS = $(UNIXUNIT)$(PPUEXT) $(ERRORSUNIT)$(PPUEXT) loaders+=gprt0 @@ -2977,7 +2978,6 @@ SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES)) include $(PROCINC)/makefile.cpu SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES)) SYSDEPS = unxconst.inc $(SYSINCDEPS) $(SYSCPUDEPS) -SYSTEMDIR = $(BSDINC) prt0$(OEXT) : $(CPU_TARGET)/prt0.as $(AS) $(ASTARGET) -o $(UNITTARGETDIRPREFIX)prt0$(OEXT) $(CPU_TARGET)/prt0.as cprt0$(OEXT) : $(CPU_TARGET)/cprt0.as diff --git a/rtl/freebsd/Makefile.fpc b/rtl/freebsd/Makefile.fpc index 5b95a1af21..60a8ee8447 100644 --- a/rtl/freebsd/Makefile.fpc +++ b/rtl/freebsd/Makefile.fpc @@ -69,6 +69,7 @@ DYNLIBS_DEPS_OS=$(DLUNIT)$(PPUEXT) DYNLIBSINCDIR=$(UNIXINC) SYSCALL_DEPS_OS = sysnr.inc $(BSDPROCINC)/syscallh.inc +SYSTEMDIR = $(BSDINC) SYSUTILSDIR=$(UNIXINC) SYSUTILS_DEPS_OS = $(UNIXUNIT)$(PPUEXT) $(ERRORSUNIT)$(PPUEXT) @@ -103,7 +104,6 @@ SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES)) # Put system unit dependencies together. SYSDEPS = unxconst.inc $(SYSINCDEPS) $(SYSCPUDEPS) -SYSTEMDIR = $(BSDINC) # # Loaders diff --git a/rtl/netbsd/Makefile b/rtl/netbsd/Makefile index 5f58ec1783..6e5d6deb0f 100644 --- a/rtl/netbsd/Makefile +++ b/rtl/netbsd/Makefile @@ -900,6 +900,7 @@ DOSDIR=$(UNIXINC) DYNLIBS_DEPS_OS=$(DLUNIT)$(PPUEXT) DYNLIBSINCDIR=$(UNIXINC) SYSCALL_DEPS_OS = sysnr.inc $(BSDPROCINC)/syscallh.inc +SYSTEMDIR = $(BSDINC) SYSUTILSDIR=$(UNIXINC) SYSUTILS_DEPS_OS = $(UNIXUNIT)$(PPUEXT) $(ERRORSUNIT)$(PPUEXT) LINUXUNIT= @@ -3029,7 +3030,6 @@ SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES)) include $(PROCINC)/makefile.cpu SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES)) SYSDEPS = sysconst.inc systypes.inc syscalls.inc $(SYSINCDEPS) $(SYSCPUDEPS) -SYSTEMDIR = $(BSDINC) prt0$(OEXT) : $(CPU_TARGET)/$(PRT0).as $(AS) -o $(UNITTARGETDIRPREFIX)prt0$(OEXT) $(CPU_TARGET)/$(PRT0).as cprt0$(OEXT) : $(CPU_TARGET)/cprt0.as diff --git a/rtl/netbsd/Makefile.fpc b/rtl/netbsd/Makefile.fpc index 11e3bf9187..bf09da44a7 100644 --- a/rtl/netbsd/Makefile.fpc +++ b/rtl/netbsd/Makefile.fpc @@ -67,6 +67,7 @@ DOSDIR=$(UNIXINC) DYNLIBS_DEPS_OS=$(DLUNIT)$(PPUEXT) DYNLIBSINCDIR=$(UNIXINC) SYSCALL_DEPS_OS = sysnr.inc $(BSDPROCINC)/syscallh.inc +SYSTEMDIR = $(BSDINC) SYSUTILSDIR=$(UNIXINC) SYSUTILS_DEPS_OS = $(UNIXUNIT)$(PPUEXT) $(ERRORSUNIT)$(PPUEXT) @@ -100,7 +101,6 @@ SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES)) # Put system unit dependencies together. SYSDEPS = sysconst.inc systypes.inc syscalls.inc $(SYSINCDEPS) $(SYSCPUDEPS) -SYSTEMDIR = $(BSDINC) # # Loaders diff --git a/rtl/openbsd/Makefile b/rtl/openbsd/Makefile index c9fcc5776d..129720aaac 100644 --- a/rtl/openbsd/Makefile +++ b/rtl/openbsd/Makefile @@ -899,6 +899,7 @@ DOSDIR=$(UNIXINC) DYNLIBS_DEPS_OS=$(DLUNIT)$(PPUEXT) DYNLIBSINCDIR=$(UNIXINC) SYSCALL_DEPS_OS = sysnr.inc setsysnr.inc $(BSDPROCINC)/syscallh.inc +SYSTEMDIR = $(BSDINC) SYSUTILSDIR=$(UNIXINC) SYSUTILS_DEPS_OS = $(UNIXUNIT)$(PPUEXT) $(ERRORSUNIT)$(PPUEXT) LINUXUNIT= @@ -2962,7 +2963,6 @@ SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES)) include $(PROCINC)/makefile.cpu SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES)) SYSDEPS= sysconst.inc systypes.inc syscalls.inc $(SYSINCDEPS) $(SYSCPUDEPS) -SYSTEMDIR = $(BSDINC) prt0$(OEXT) : $(CPU_TARGET)/$(PRT0).as $(AS) -o $(UNITTARGETDIRPREFIX)prt0$(OEXT) $(CPU_TARGET)/$(PRT0).as si_prc$(PPUEXT) : si_prc.pp si_intf.inc si_impl.inc $(ARCH)/openbsd_ident.inc $(ARCH)/si_prc.inc $(SYSTEMUNIT)$(PPUEXT) diff --git a/rtl/openbsd/Makefile.fpc b/rtl/openbsd/Makefile.fpc index 2db74a06b1..3e29389e22 100644 --- a/rtl/openbsd/Makefile.fpc +++ b/rtl/openbsd/Makefile.fpc @@ -66,6 +66,7 @@ DOSDIR=$(UNIXINC) DYNLIBS_DEPS_OS=$(DLUNIT)$(PPUEXT) DYNLIBSINCDIR=$(UNIXINC) SYSCALL_DEPS_OS = sysnr.inc setsysnr.inc $(BSDPROCINC)/syscallh.inc +SYSTEMDIR = $(BSDINC) SYSUTILSDIR=$(UNIXINC) SYSUTILS_DEPS_OS = $(UNIXUNIT)$(PPUEXT) $(ERRORSUNIT)$(PPUEXT) @@ -108,7 +109,6 @@ SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES)) # Put system unit dependencies together. SYSDEPS= sysconst.inc systypes.inc syscalls.inc $(SYSINCDEPS) $(SYSCPUDEPS) -SYSTEMDIR = $(BSDINC) # # Loaders