Skip to content

Take advantage of lua's module system for package dependencies #167

Description

@michaelforney

The current lua build system is not very smart and most functions correspond exactly with writing parts of a ninja manifest. It'd be nice not to have to keep various strings in sync and leverage the lua module system a bit more.

I'm thinking something like this to start:

pkg/zlib/gen.lua:

local libz = lib('libz.a', {...})
return {
	libz=libz,
}

pkg/pigz/gen.lua:

local zlib = require 'pkg/zlib'

exe('pigz', {'pigz.c', 'yarn.c', 'try.c', zlib.libz})

I'm not sure exactly how cflags for headers should be plumbed through. Needs some more thought.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions