Install only 1 copy, not 2 copies, of osx headers.

Before this commit, the headers in plat/osx/include got installed
twice into PLATIND/osx386/include and PLATIND/osxppc/include.  This
commit installs them once into PLATIND/osx/include and changes both
descr files to find them.

Several rules in lang/ depend on plat/osx386/include+headers or
plat/osxppc/include+headers.  They each become a simplerule that
depends on plat/osx/include+headers.
This commit is contained in:
George Koehler 2016-11-08 17:13:51 -05:00
parent ed7fb69f79
commit 0d0495e818
7 changed files with 38 additions and 48 deletions

View file

@ -0,0 +1,24 @@
include("plat/build.lua")
headermap = {}
packagemap = {}
local function addheader(h)
headermap[h] = "plat/osx/include/"..h
packagemap["$(PLATIND)/osx/include/"..h] = "plat/osx/include/"..h
end
addheader("ack/config.h")
addheader("sys/mman.h")
addheader("sys/types.h")
addheader("unistd.h")
acklibrary {
name = "headers",
hdrs = headermap
}
installable {
name = "pkg",
map = packagemap
}

View file

@ -17,7 +17,7 @@ installable {
map = {
"+tools",
"+libs",
"./include+pkg",
"plat/osx/include+pkg",
["$(PLATIND)/osx386/boot.o"] = "+boot",
["$(PLATIND)/osx386/libsys.a"] = "./libsys+lib",
}

View file

@ -29,7 +29,7 @@ var EGO_PLAT_FLAGS=-M{EM}/share/ack/ego/{ARCH}.descr
# Override the setting in fe so that files compiled for osx386 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/osx/include -I{EM}/share/ack/include/ansi
name be
from .m.g

View file

@ -1,24 +1,7 @@
include("plat/build.lua")
headermap = {}
packagemap = {}
local function addheader(h)
headermap[h] = "plat/osx/include/"..h
packagemap["$(PLATIND)/osx386/include/"..h] = "plat/osx/include/"..h
end
addheader("ack/config.h")
addheader("sys/mman.h")
addheader("sys/types.h")
addheader("unistd.h")
acklibrary {
simplerule {
name = "headers",
hdrs = headermap
}
installable {
name = "pkg",
map = packagemap
deps = { "plat/osx/include+headers" },
ins = {},
outs = {},
commands = {},
}

View file

@ -17,7 +17,7 @@ installable {
map = {
"+tools",
"+libs",
"./include+pkg",
"plat/osx/include+pkg",
["$(PLATIND)/osxppc/boot.o"] = "+boot",
["$(PLATIND)/osxppc/libsys.a"] = "./libsys+lib",
}

View file

@ -30,7 +30,7 @@ var MACHOPT_F=-m10
# Override the setting in fe so that files compiled for osxppc 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/osx/include -I{EM}/share/ack/include/ansi
name be
from .m.g

View file

@ -1,24 +1,7 @@
include("plat/build.lua")
headermap = {}
packagemap = {}
local function addheader(h)
headermap[h] = "plat/osx/include/"..h
packagemap["$(PLATIND)/osxppc/include/"..h] = "plat/osx/include/"..h
end
addheader("ack/config.h")
addheader("sys/mman.h")
addheader("sys/types.h")
addheader("unistd.h")
acklibrary {
simplerule {
name = "headers",
hdrs = headermap
}
installable {
name = "pkg",
map = packagemap
deps = { "plat/osx/include+headers" },
ins = {},
outs = {},
commands = {},
}