ackbuilder rules files now require absolute paths in external variables
(otherwise commands which change directory don't work).
This commit is contained in:
parent
523374c36b
commit
2d2497c318
14
Makefile
14
Makefile
|
@ -39,11 +39,11 @@ CC = gcc
|
|||
# You shouldn't need to change anything below this point unless you are
|
||||
# actually developing ACK.
|
||||
|
||||
OBJDIR = $(BUILDDIR)/obj
|
||||
BINDIR = $(BUILDDIR)/bin
|
||||
LIBDIR = $(BUILDDIR)/lib
|
||||
INCDIR = $(BUILDDIR)/include
|
||||
INSDIR = $(BUILDDIR)/staging
|
||||
OBJDIR = $(abspath $(BUILDDIR)/obj)
|
||||
BINDIR = $(abspath $(BUILDDIR)/bin)
|
||||
LIBDIR = $(abspath $(BUILDDIR)/lib)
|
||||
INCDIR = $(abspath $(BUILDDIR)/include)
|
||||
INSDIR = $(abspath $(BUILDDIR)/staging)
|
||||
|
||||
PLATIND = $(INSDIR)/share/ack
|
||||
PLATDEP = $(INSDIR)/lib/ack
|
||||
|
@ -91,11 +91,11 @@ endif
|
|||
|
||||
$(BUILDDIR)/rules.ninja: first/ackbuilder.lua $(BUILD_FILES)
|
||||
@mkdir -p $(BUILDDIR)
|
||||
lua5.2 first/ackbuilder.lua first/build.lua build.lua --ninja > $(BUILDDIR)/rules.ninja
|
||||
@lua5.2 first/ackbuilder.lua first/build.lua build.lua --ninja > $(BUILDDIR)/rules.ninja
|
||||
|
||||
$(BUILDDIR)/rules.mk: first/ackbuilder.lua $(BUILD_FILES)
|
||||
@mkdir -p $(BUILDDIR)
|
||||
lua5.2 first/ackbuilder.lua first/build.lua build.lua --make > $(BUILDDIR)/rules.mk
|
||||
@lua5.2 first/ackbuilder.lua first/build.lua build.lua --make > $(BUILDDIR)/rules.mk
|
||||
|
||||
clean:
|
||||
@rm -rf $(BUILDDIR)
|
||||
|
|
|
@ -65,7 +65,7 @@ end
|
|||
|
||||
local function concatpath(...)
|
||||
local p = table.concat({...}, "/")
|
||||
return p:gsub("/+", "/"):gsub("^%./", ""):gsub("/%./", "/")
|
||||
return (p:gsub("/+", "/"):gsub("^%./", ""):gsub("/%./", "/"))
|
||||
end
|
||||
|
||||
local function filenamesof(targets, pattern)
|
||||
|
@ -648,6 +648,8 @@ local function parse_arguments(argmap, arg)
|
|||
end
|
||||
|
||||
globals = {
|
||||
posix = posix,
|
||||
|
||||
abspath = abspath,
|
||||
asstring = asstring,
|
||||
basename = basename,
|
||||
|
|
|
@ -13,7 +13,7 @@ normalrule {
|
|||
}
|
||||
}
|
||||
|
||||
local str_files = basename(posix.glob("lang/cem/cemcom.ansi/*.str"))
|
||||
local str_files = basename(posix.glob(cwd().."/*.str"))
|
||||
local str_targets = {}
|
||||
|
||||
for _, f in ipairs(str_files) do
|
||||
|
|
|
@ -6,7 +6,7 @@ cprogram {
|
|||
-- do this.
|
||||
|
||||
srcs = { "./src/*.c" },
|
||||
cflags = { "-DLIBDIR=\\\""..abspath("util/LLgen/lib").."\\\"", "-DNON_CORRECTING" },
|
||||
cflags = { "-DLIBDIR=\\\""..posix.getcwd().."/"..cwd().."/lib\\\"", "-DNON_CORRECTING" },
|
||||
}
|
||||
|
||||
definerule("llgen",
|
||||
|
|
Loading…
Reference in a new issue