From 8b019b61c2ba3e005d27725ac621ceb2811eaa4b Mon Sep 17 00:00:00 2001 From: Pierre Muller Date: Wed, 13 Sep 2023 21:50:32 +0000 Subject: [PATCH] Remove OS ports unit rules, set PORTSDIR variable and use PORTSUNIT variable --- rtl/dragonfly/Makefile.fpc | 2 +- rtl/freebsd/Makefile.fpc | 8 +++----- rtl/go32v2/Makefile.fpc | 6 +----- rtl/msxdos/Makefile.fpc | 5 +---- rtl/netbsd/Makefile.fpc | 8 +++----- rtl/openbsd/Makefile.fpc | 8 +++----- rtl/watcom/Makefile.fpc | 2 +- rtl/win16/Makefile.fpc | 6 +----- 8 files changed, 14 insertions(+), 31 deletions(-) diff --git a/rtl/dragonfly/Makefile.fpc b/rtl/dragonfly/Makefile.fpc index 01478fc855..d4fc9eee6a 100644 --- a/rtl/dragonfly/Makefile.fpc +++ b/rtl/dragonfly/Makefile.fpc @@ -65,7 +65,7 @@ SYSTEMUNIT=system loaders+=gprt0 ifeq ($(ARCH),x86_64) -CPU_UNITS=x86 ports cpu +CPU_UNITS=x86 $(PORTSUNIT) cpu endif diff --git a/rtl/freebsd/Makefile.fpc b/rtl/freebsd/Makefile.fpc index 63f231bcfd..4ae8171a85 100644 --- a/rtl/freebsd/Makefile.fpc +++ b/rtl/freebsd/Makefile.fpc @@ -52,6 +52,7 @@ libunits=$(SYSTEMUNIT) $(OBJPASUNIT) $(STRINGSUNIT) \ [prerules] RTL=.. INC=$(RTL)/inc +PORTSDIR=$(RTL)/unix COMMON=$(RTL)/common PROCINC=$(RTL)/$(CPU_TARGET) OSPROCINC=$(RTL)/freebsd/$(CPU_TARGET) @@ -65,12 +66,12 @@ SYSTEMUNIT=system loaders+=gprt0 ifeq ($(ARCH),i386) -CPU_UNITS=x86 ports cpu mmx +CPU_UNITS=x86 $(PORTSUNIT) cpu mmx ASTARGET=--32 endif ifeq ($(ARCH),x86_64) -CPU_UNITS=x86 ports cpu +CPU_UNITS=x86 $(PORTSUNIT) cpu ASTARGET=--64 endif @@ -194,9 +195,6 @@ sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp $(OBJPASUNIT)$(PPUEXT) $(SYSTEMUNIT x86$(PPUEXT) : $(UNIXINC)/x86.pp $(SYSTEMUNIT)$(PPUEXT) $(COMPILER) $< -ports$(PPUEXT) : $(UNIXINC)/ports.pp $(SYSTEMUNIT)$(PPUEXT) - $(COMPILER) $< - ifneq ($(findstring $(ARCH),x86_64 i386),) cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMUNIT)$(PPUEXT) sysutils$(PPUEXT) $(COMPILER) $< diff --git a/rtl/go32v2/Makefile.fpc b/rtl/go32v2/Makefile.fpc index 10c598aeab..7d6c8f8903 100644 --- a/rtl/go32v2/Makefile.fpc +++ b/rtl/go32v2/Makefile.fpc @@ -6,7 +6,7 @@ main=rtl [target] loaders=prt0 exceptn fpu units=system $(UUCHARUNIT) $(OBJPASUNIT) $(MACPASUNIT) $(ISO7185UNIT) $(EXTPASUNIT) $(STRINGSUNIT) \ - go32 dpmiexcp initc ports profile dxetype dxeload emu387 \ + go32 dpmiexcp initc $(PORTSUNIT) profile dxetype dxeload emu387 \ dos $(CMEMUNIT) $(SORTBASEUNIT) \ sysutils classes math typinfo \ cpu mmx $(GETOPTSUNIT) $(HEAPTRCUNIT) $(LINEINFOUNIT) $(LNFODWRFUNIT) ctypes $(FGLUNIT) \ @@ -107,10 +107,6 @@ emu387$(PPUEXT) : emu387.pp fpu$(OEXT) strings$(PPUEXT) dxeload$(PPUEXT) \ $(COMPILER) emu387.pp $(EXECPPAS) -ports$(PPUEXT) : ports.pp system$(PPUEXT) - $(COMPILER) ports.pp - $(EXECPPAS) - # # TP7 Compatible RTL Units # diff --git a/rtl/msxdos/Makefile.fpc b/rtl/msxdos/Makefile.fpc index 7f7df0bc99..1d089a0dce 100644 --- a/rtl/msxdos/Makefile.fpc +++ b/rtl/msxdos/Makefile.fpc @@ -10,7 +10,7 @@ units=system si_prc $(UUCHARUNIT) $(OBJPASUNIT) $(ISO7185UNIT) $(STRINGSUNIT) $( #$(UUCHARUNIT) $(OBJPASUNIT) $(STRINGSUNIT) dos $(HEAPTRCUNIT) $(LNFODWRFUNIT) sysconst sysutils \ # math $(MACPASUNIT) $(ISO7185UNIT) $(EXTPASUNIT) rtlconsts typinfo cpu types \ # $(GETOPTSUNIT) $(SORTBASEUNIT) $(FGLUNIT) classes \ -# msmouse ports \ +# msmouse $(PORTSUNIT) \ # $(CHARSETUNIT) $(CPALLUNIT) ctypes \ # $(FPWIDESTRINGUNIT) $(CHARACTERUNIT) $(UNICODEDATAUNIT) # $(CMEMUNIT) @@ -79,9 +79,6 @@ system$(PPUEXT) : system.pp $(SYSDEPS) $(INC)/tnyheaph.inc $(INC)/tinyheap.inc r # System Dependent Units # -ports$(PPUEXT) : ports.pp system$(PPUEXT) - $(COMPILER) ports.pp - $(EXECPPAS) # # TP7 Compatible RTL Units # diff --git a/rtl/netbsd/Makefile.fpc b/rtl/netbsd/Makefile.fpc index 05f82bbe80..9e7ebfa364 100644 --- a/rtl/netbsd/Makefile.fpc +++ b/rtl/netbsd/Makefile.fpc @@ -51,6 +51,7 @@ libunits=$(SYSTEMUNIT) $(OBJPASUNIT) $(STRINGSUNIT) \ [prerules] RTL=.. INC=$(RTL)/inc +PORTSDIR=$(RTL)/unix COMMON=$(RTL)/common PROCINC=$(RTL)/$(CPU_TARGET) BSDINC=$(RTL)/bsd @@ -74,10 +75,10 @@ endif OBJPASDIR=$(RTL)/objpas ifeq ($(ARCH),x86_64) -CPU_UNITS=x86 ports cpu +CPU_UNITS=x86 $(PORTSUNIT) cpu endif ifeq ($(ARCH),i386) -CPU_UNITS=x86 ports cpu mmx +CPU_UNITS=x86 $(PORTSUNIT) cpu mmx endif @@ -148,9 +149,6 @@ dynlibs$(PPUEXT) : $(INC)/dynlibs.pas $(UNIXINC)/dynlibs.inc dl$(PPUEXT) $(OBJPA x86$(PPUEXT) : $(UNIXINC)/x86.pp $(SYSTEMUNIT)$(PPUEXT) $(COMPILER) $< -ports$(PPUEXT) : $(UNIXINC)/ports.pp $(SYSTEMUNIT)$(PPUEXT) - $(COMPILER) $< - # # TP7 Compatible RTL Units # diff --git a/rtl/openbsd/Makefile.fpc b/rtl/openbsd/Makefile.fpc index af90ede475..7611714071 100644 --- a/rtl/openbsd/Makefile.fpc +++ b/rtl/openbsd/Makefile.fpc @@ -51,6 +51,7 @@ libunits=$(SYSTEMUNIT) $(OBJPASUNIT) $(STRINGSUNIT) \ [prerules] RTL=.. INC=$(RTL)/inc +PORTSDIR=$(RTL)/unix PROCINC=$(RTL)/$(CPU_TARGET) BSDINC=$(RTL)/bsd BSDPROCINC=$(BSDINC)/$(CPU_TARGET) @@ -80,10 +81,10 @@ SYSINIT_UNITS=si_prc si_c si_dll si_g LOADERS=prt0 ifeq ($(ARCH),x86_64) -CPU_UNITS=x86 ports cpu +CPU_UNITS=x86 $(PORTSUNIT) cpu endif ifeq ($(ARCH),i386) -CPU_UNITS=x86 ports cpu mmx +CPU_UNITS=x86 $(PORTSUNIT) cpu mmx endif # Paths @@ -219,9 +220,6 @@ cwstring$(PPUEXT) : $(UNIXINC)/cwstring.pp $(SYSTEMUNIT)$(PPUEXT) sysutils$(PPUE x86$(PPUEXT) : $(UNIXINC)/x86.pp $(SYSTEMUNIT)$(PPUEXT) $(COMPILER) $< -ports$(PPUEXT) : $(UNIXINC)/ports.pp $(SYSTEMUNIT)$(PPUEXT) - $(COMPILER) $< - ifneq ($(findstring $(ARCH),x86_64 i386),) cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMUNIT)$(PPUEXT) sysutils$(PPUEXT) $(COMPILER) $< diff --git a/rtl/watcom/Makefile.fpc b/rtl/watcom/Makefile.fpc index 0ad207da64..3db95a336d 100644 --- a/rtl/watcom/Makefile.fpc +++ b/rtl/watcom/Makefile.fpc @@ -20,7 +20,7 @@ units=$(SYSTEMUNIT) $(UUCHARUNIT) $(CTYPESUNIT) $(OBJPASUNIT) $(MACPASUNIT) $(IS rsts=$(MATHUNIT) $(TYPINFOUNIT) pmhelp $(CLASSESUNIT) $(SYSCONSTUNIT) implicitunits=$(EXEINFOUNIT) $(CP_UNITS) $(UNICODEDATAUNIT) -# dpmiexcp initc ports profile dxeload emu387 \ +# dpmiexcp initc $(PORTSUNIT) profile dxeload emu387 \ # printer graph classes \ # msmouse video mouse keyboard vesamode diff --git a/rtl/win16/Makefile.fpc b/rtl/win16/Makefile.fpc index 7210b33b0e..0d115edbb2 100644 --- a/rtl/win16/Makefile.fpc +++ b/rtl/win16/Makefile.fpc @@ -6,7 +6,7 @@ main=rtl [target] loaders=prt0s prt0m prt0c prt0l prt0h units=system $(UUCHARUNIT) $(OBJPASUNIT) $(STRINGSUNIT) $(ISO7185UNIT) $(EXTPASUNIT) dos \ - wintypes winprocs win31 ports dynlibs $(SORTBASEUNIT) \ + wintypes winprocs win31 $(PORTSUNIT) dynlibs $(SORTBASEUNIT) \ sysconst rtlconsts sysutils math types typinfo $(FGLUNIT) \ classes $(CHARSETUNIT) cpu $(GETOPTSUNIT) $(CPALLUNIT) \ $(UNICODEDATAUNIT) $(CHARACTERUNIT) ctypes @@ -102,10 +102,6 @@ win31$(PPUEXT) : win31.pp system$(PPUEXT) $(OBJPASUNIT)$(PPUEXT) wintypes$(PPUEX # system Dependent Units # -ports$(PPUEXT) : ports.pp system$(PPUEXT) - $(COMPILER) ports.pp - $(EXECPPAS) - dynlibs$(PPUEXT) : $(INC)/dynlibs.pas dynlibs.inc $(OBJPASUNIT)$(PPUEXT) system$(PPUEXT) $(COMPILER) $(INC)/dynlibs.pas