From ab7002c0ee93b195ef3753cebc6c2a760994d6e9 Mon Sep 17 00:00:00 2001 From: David Given Date: Sun, 24 Jun 2018 19:57:43 +0200 Subject: [PATCH] All the Linux include directories are the same, so common them all out into a single one, like OSX. --- plat/linux/include/build.lua | 26 ++++++++++++++++++++++++++ plat/linux386/descr | 2 +- plat/linux386/include/build.lua | 24 +----------------------- plat/linux386/libsys/build.lua | 2 +- plat/linux68k/descr | 2 +- plat/linux68k/include/build.lua | 25 +------------------------ plat/linux68k/libsys/build.lua | 2 +- plat/linuxppc/descr | 2 +- plat/linuxppc/include/build.lua | 26 +------------------------- plat/linuxppc/libsys/build.lua | 2 +- 10 files changed, 35 insertions(+), 78 deletions(-) create mode 100644 plat/linux/include/build.lua diff --git a/plat/linux/include/build.lua b/plat/linux/include/build.lua new file mode 100644 index 000000000..bcc2911ae --- /dev/null +++ b/plat/linux/include/build.lua @@ -0,0 +1,26 @@ +include("plat/build.lua") + +headermap = {} +packagemap = {} + +local function addheader(h) + headermap[h] = "plat/linux/include/"..h + packagemap["$(PLATIND)/linux/include/"..h] = "plat/linux/include/"..h +end + +addheader("ack/plat.h") +addheader("ack/fcntl.h") +addheader("ack/signal.h") +addheader("sys/ioctl.h") +addheader("sys/types.h") + + +acklibrary { + name = "headers", + hdrs = headermap +} + +installable { + name = "pkg", + map = packagemap +} diff --git a/plat/linux386/descr b/plat/linux386/descr index 1888e4182..fd033f423 100644 --- a/plat/linux386/descr +++ b/plat/linux386/descr @@ -31,7 +31,7 @@ var EGO_PLAT_FLAGS=-M{EM}/share/ack/ego/{ARCH}.descr # Override the setting in fe so that files compiled for linux386 can see # the platform-specific headers. -var C_INCLUDES=-I{PLATFORMDIR}/include -I{EM}/share/ack/include/ansi +var C_INCLUDES=-I{EM}/share/ack/linux/include -I{EM}/share/ack/include/ansi name be from .m.g diff --git a/plat/linux386/include/build.lua b/plat/linux386/include/build.lua index c26cdf067..747e52089 100644 --- a/plat/linux386/include/build.lua +++ b/plat/linux386/include/build.lua @@ -1,26 +1,4 @@ -include("plat/build.lua") - -headermap = {} -packagemap = {} - -local function addheader(h) - headermap[h] = "plat/linux/include/"..h - packagemap["$(PLATIND)/linux386/include/"..h] = "plat/linux/include/"..h -end - -addheader("ack/plat.h") -addheader("ack/fcntl.h") -addheader("ack/signal.h") -addheader("sys/ioctl.h") -addheader("sys/types.h") - -acklibrary { - name = "headers", - hdrs = headermap -} - installable { name = "pkg", - map = packagemap + map = { "plat/linux/include+pkg" } } - diff --git a/plat/linux386/libsys/build.lua b/plat/linux386/libsys/build.lua index 7de7b4061..908682d47 100644 --- a/plat/linux386/libsys/build.lua +++ b/plat/linux386/libsys/build.lua @@ -8,7 +8,7 @@ acklibrary { deps = { "plat/linux/libsys/*.h", "lang/cem/libcc.ansi/headers+headers", - "plat/linux386/include+headers", + "plat/linux386/include+pkg", }, vars = { plat = "linux386" diff --git a/plat/linux68k/descr b/plat/linux68k/descr index 1e3b6a5bd..a530fffdb 100644 --- a/plat/linux68k/descr +++ b/plat/linux68k/descr @@ -31,7 +31,7 @@ var EGO_PLAT_FLAGS=-M{EM}/share/ack/ego/{ARCH}.descr # Override the setting in fe so that files compiled for linux68k can see # the platform-specific headers. -var C_INCLUDES=-I{PLATFORMDIR}/include -I{EM}/share/ack/include/ansi +var C_INCLUDES=-I{EM}/share/ack/linux/include -I{EM}/share/ack/include/ansi name be from .m.g diff --git a/plat/linux68k/include/build.lua b/plat/linux68k/include/build.lua index dc5333430..747e52089 100644 --- a/plat/linux68k/include/build.lua +++ b/plat/linux68k/include/build.lua @@ -1,27 +1,4 @@ -include("plat/build.lua") - -headermap = {} -packagemap = {} - -local function addheader(h) - headermap[h] = "plat/linux/include/"..h - packagemap["$(PLATIND)/linux68k/include/"..h] = "plat/linux/include/"..h -end - -addheader("ack/plat.h") -addheader("ack/fcntl.h") -addheader("ack/signal.h") -addheader("sys/ioctl.h") -addheader("sys/types.h") - -acklibrary { - name = "headers", - hdrs = headermap -} - installable { name = "pkg", - map = packagemap + map = { "plat/linux/include+pkg" } } - - diff --git a/plat/linux68k/libsys/build.lua b/plat/linux68k/libsys/build.lua index c17436517..e0d5b610b 100644 --- a/plat/linux68k/libsys/build.lua +++ b/plat/linux68k/libsys/build.lua @@ -8,7 +8,7 @@ acklibrary { deps = { "plat/linux/libsys/*.h", "lang/cem/libcc.ansi/headers+headers", - "plat/linux68k/include+headers", + "plat/linux68k/include+pkg", }, vars = { plat = "linux68k" diff --git a/plat/linuxppc/descr b/plat/linuxppc/descr index 7f6f8fc02..9e43fabb7 100644 --- a/plat/linuxppc/descr +++ b/plat/linuxppc/descr @@ -25,7 +25,7 @@ var EGO_PLAT_FLAGS=-M{EM}/share/ack/ego/{ARCH}.descr # Override the setting in fe so that files compiled for linuxppc can see # the platform-specific headers. -var C_INCLUDES=-I{PLATFORMDIR}/include -I{EM}/share/ack/include/ansi +var C_INCLUDES=-I{EM}/share/ack/linux/include -I{EM}/share/ack/include/ansi name be from .m.g diff --git a/plat/linuxppc/include/build.lua b/plat/linuxppc/include/build.lua index 8adc0c7d1..747e52089 100644 --- a/plat/linuxppc/include/build.lua +++ b/plat/linuxppc/include/build.lua @@ -1,28 +1,4 @@ -include("plat/build.lua") - -headermap = {} -packagemap = {} - -local function addheader(h) - headermap[h] = "plat/linux/include/"..h - packagemap["$(PLATIND)/linuxppc/include/"..h] = "plat/linux/include/"..h -end - -addheader("ack/plat.h") -addheader("ack/fcntl.h") -addheader("ack/signal.h") -addheader("sys/ioctl.h") -addheader("sys/types.h") - -acklibrary { - name = "headers", - hdrs = headermap -} - installable { name = "pkg", - map = packagemap + map = { "plat/linux/include+pkg" } } - - - diff --git a/plat/linuxppc/libsys/build.lua b/plat/linuxppc/libsys/build.lua index f58df16ea..f12837e6c 100644 --- a/plat/linuxppc/libsys/build.lua +++ b/plat/linuxppc/libsys/build.lua @@ -26,7 +26,7 @@ acklibrary { deps = { "plat/linux/libsys/*.h", "lang/cem/libcc.ansi/headers+headers", - "plat/linuxppc/include+headers", + "plat/linuxppc/include+pkg", }, vars = { plat = "linuxppc"