# 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
$(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)
local function concatpath(...)
local p = table.concat({...}, "/")
- return p:gsub("/+", "/"):gsub("^%./", ""):gsub("/%./", "/")
+ return (p:gsub("/+", "/"):gsub("^%./", ""):gsub("/%./", "/"))
end
local function filenamesof(targets, pattern)
end
)
end
-
+
local function basename(collection)
return dotocollection(collection,
function(filename)
end
globals = {
+ posix = posix,
+
abspath = abspath,
asstring = asstring,
basename = basename,
-- do this.
srcs = { "./src/*.c" },
- cflags = { "-DLIBDIR=\\\""..abspath("util/LLgen/lib").."\\\"", "-DNON_CORRECTING" },
+ cflags = { "-DLIBDIR=\\\""..posix.getcwd().."/"..cwd().."/lib\\\"", "-DNON_CORRECTING" },
}
definerule("llgen",