diff --git a/lang/basic/lib/build.lua b/lang/basic/lib/build.lua index f0fe3724b..71710a542 100644 --- a/lang/basic/lib/build.lua +++ b/lang/basic/lib/build.lua @@ -11,7 +11,7 @@ for _, plat in ipairs(vars.plats) do deps = { "h+emheaders", "lang/cem/libcc.ansi/headers+headers", - "plat/"..plat.."+headers", + "plat/"..plat.."/include+headers", }, vars = { plat = plat } } diff --git a/lang/cem/libcc.ansi/build.lua b/lang/cem/libcc.ansi/build.lua index 60b72b0c5..ca5c9c570 100644 --- a/lang/cem/libcc.ansi/build.lua +++ b/lang/cem/libcc.ansi/build.lua @@ -52,7 +52,7 @@ for _, plat in ipairs(vars.plats) do hdrs = {}, -- must be empty deps = { "lang/cem/libcc.ansi/headers+headers", - "plat/"..plat.."+headers", + "plat/"..plat.."/include+headers", }, vars = { plat = plat } } diff --git a/lang/m2/libm2/build.lua b/lang/m2/libm2/build.lua index f49a10a4c..d0861b966 100644 --- a/lang/m2/libm2/build.lua +++ b/lang/m2/libm2/build.lua @@ -30,7 +30,7 @@ for _, plat in ipairs(vars.plats) do hdrs = {}, -- must be empty deps = { "lang/cem/libcc.ansi/headers+headers", - "plat/"..plat.."+headers", + "plat/"..plat.."/include+headers", "h+emheaders", }, vars = { plat = plat } diff --git a/lang/pc/libpc/build.lua b/lang/pc/libpc/build.lua index a86ce616e..61c4f7a3e 100644 --- a/lang/pc/libpc/build.lua +++ b/lang/pc/libpc/build.lua @@ -19,7 +19,7 @@ for _, plat in ipairs(vars.plats) do hdrs = {}, -- must be empty deps = { "lang/cem/libcc.ansi/headers+headers", - "plat/"..plat.."+headers", + "plat/"..plat.."/include+headers", "h+emheaders", }, vars = { plat = plat } diff --git a/plat/cpm/build-headers.lua b/plat/cpm/build-headers.lua deleted file mode 100644 index eb3cc8fbb..000000000 --- a/plat/cpm/build-headers.lua +++ /dev/null @@ -1,11 +0,0 @@ -include("plat/build.lua") - -acklibrary { - name = "headers", - hdrs = { - ["ack/config.h"] = "./include/ack/config.h", - ["unistd.h"] = "./include/unistd.h", - ["cpm.h"] = "./include/cpm.h", - } -} - diff --git a/plat/cpm/build-pkg.lua b/plat/cpm/build-pkg.lua index 1dace45f3..35c288791 100644 --- a/plat/cpm/build-pkg.lua +++ b/plat/cpm/build-pkg.lua @@ -18,6 +18,7 @@ installable { map = { "+tools", "+libs", + "./include+pkg", ["$(PLATIND)/cpm/boot.o"] = "+boot" } } diff --git a/plat/cpm/include/build.lua b/plat/cpm/include/build.lua new file mode 100644 index 000000000..b6f713684 --- /dev/null +++ b/plat/cpm/include/build.lua @@ -0,0 +1,25 @@ +include("plat/build.lua") + +headermap = {} +packagemap = {} + +local function addheader(h) + headermap[h] = "./"..h + packagemap["$(PLATIND)/cpm/include/"..h] = "./"..h +end + +addheader("ack/config.h") +addheader("cpm.h") +addheader("unistd.h") + +acklibrary { + name = "headers", + hdrs = headermap +} + +installable { + name = "pkg", + map = packagemap +} + + diff --git a/plat/linux386/build-headers.lua b/plat/linux386/build-headers.lua deleted file mode 100644 index 5b91bdc75..000000000 --- a/plat/linux386/build-headers.lua +++ /dev/null @@ -1,11 +0,0 @@ -include("plat/build.lua") - -acklibrary { - name = "headers", - hdrs = { - ["ack/config.h"] = "./include/ack/config.h", - ["sys/ioctl.h"] = "./include/sys/ioctl.h", - ["unistd.h"] = "./include/unistd.h", - } -} - diff --git a/plat/linux386/build-pkg.lua b/plat/linux386/build-pkg.lua index 47fb9ce43..35b096f18 100644 --- a/plat/linux386/build-pkg.lua +++ b/plat/linux386/build-pkg.lua @@ -17,6 +17,7 @@ installable { map = { "+tools", "+libs", + "./include+pkg", ["$(PLATIND)/linux386/boot.o"] = "+boot" } } diff --git a/plat/linux386/include/build.lua b/plat/linux386/include/build.lua new file mode 100644 index 000000000..ce1f2adc6 --- /dev/null +++ b/plat/linux386/include/build.lua @@ -0,0 +1,24 @@ +include("plat/build.lua") + +headermap = {} +packagemap = {} + +local function addheader(h) + headermap[h] = "./"..h + packagemap["$(PLATIND)/linux386/include/"..h] = "./"..h +end + +addheader("ack/config.h") +addheader("sys/ioctl.h") +addheader("unistd.h") + +acklibrary { + name = "headers", + hdrs = headermap +} + +installable { + name = "pkg", + map = packagemap +} + diff --git a/plat/pc86/build-headers.lua b/plat/pc86/build-headers.lua deleted file mode 100644 index 8b326df8d..000000000 --- a/plat/pc86/build-headers.lua +++ /dev/null @@ -1,10 +0,0 @@ -include("plat/build.lua") - -acklibrary { - name = "headers", - hdrs = { - ["ack/config.h"] = "./include/ack/config.h", - ["unistd.h"] = "./include/unistd.h", - } -} - diff --git a/plat/pc86/build-pkg.lua b/plat/pc86/build-pkg.lua index 667d62f23..f0f1653d5 100644 --- a/plat/pc86/build-pkg.lua +++ b/plat/pc86/build-pkg.lua @@ -17,6 +17,7 @@ installable { map = { "+tools", "+libs", + "./include+pkg", ["$(PLATIND)/pc86/boot.o"] = "+boot" } } diff --git a/plat/pc86/include/build.lua b/plat/pc86/include/build.lua new file mode 100644 index 000000000..6ae120358 --- /dev/null +++ b/plat/pc86/include/build.lua @@ -0,0 +1,24 @@ +include("plat/build.lua") + +headermap = {} +packagemap = {} + +local function addheader(h) + headermap[h] = "./"..h + packagemap["$(PLATIND)/pc86/include/"..h] = "./"..h +end + +addheader("ack/config.h") +addheader("unistd.h") + +acklibrary { + name = "headers", + hdrs = headermap +} + +installable { + name = "pkg", + map = packagemap +} + +