-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Great source tree layout reorganization
Reorganized so that running uninstalled lgi is possible without devsetup.sh hacks (which went missing). Also waf was replaces by a few simple makefiles. rockspec is generated automatically and is switched to use makefile type build.
- Loading branch information
Showing
36 changed files
with
235 additions
and
243 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,5 @@ | |
*.so | ||
*.dll | ||
*.stackdump | ||
.cproject | ||
.project | ||
.settings | ||
.waf* | ||
build | ||
.lock-wafbuild | ||
.depcheck | ||
*.rockspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# | ||
# LGI Dynamic GObject introspection binding. | ||
# | ||
# Author: Pavel Holejsovsky <[email protected]> | ||
# License: MIT | ||
# | ||
|
||
VERSION = 0.3 | ||
|
||
ROCK = lgi-$(VERSION)-1.rockspec | ||
|
||
.PHONY : rock all clean install check | ||
|
||
all : rock | ||
make -C lgi | ||
|
||
rock : $(ROCK) | ||
$(ROCK) : rockspec.in Makefile | ||
sed 's/%VERSION%/$(VERSION)/' $< >$@ | ||
|
||
clean : | ||
rm -f *.rockspec | ||
make -C lgi clean | ||
make -C tests clean | ||
|
||
install : | ||
make -C lgi install | ||
|
||
check : | ||
make -C tests check | ||
|
||
export VERSION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
------------------------------------------------------------------------------ | ||
-- | ||
-- LGI Lua-side core. | ||
-- | ||
-- Copyright (c) 2011 Pavel Holejsovsky | ||
-- Licensed under the MIT license: | ||
-- http://www.opensource.org/licenses/mit-license.php | ||
-- | ||
------------------------------------------------------------------------------ | ||
|
||
-- This is simple forwarder to real package 'lgi/init.lua'. Normally, | ||
-- lgi/init.lua could suffice, but this file is needed for two | ||
-- reasons: | ||
-- 1) Running uninstalled, because Lua unfortunately does not contain | ||
-- './?/init.lua' component in its package.path | ||
-- 2) Upgrading older installations (<0.2), where lgi.lua was the only | ||
-- installed file, it would take precedence over 'lgi/init.lua'. | ||
|
||
return require 'lgi.init' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# | ||
# Makefile for compiling lgi core module in standard-Lua variant | ||
# | ||
# Author: Pavel Holejsovsky <[email protected]> | ||
# License: MIT | ||
# | ||
|
||
PREFIX = /usr/local | ||
LUA_LIBDIR = $(PREFIX)/lib/lua/5.1 | ||
LUA_SHAREDIR = $(PREFIX)/share/lua/5.1 | ||
|
||
GINAME = gobject-introspection-1.0 | ||
VERSION_FILE = version.lua | ||
|
||
ifneq ($(filter $(shell uname -s),Cygwin MSys),) | ||
CORE = corelgilua51.dll | ||
LIBS += -llua5.1 | ||
LIBFLAG = -shared | ||
else | ||
CORE = corelgilua51.so | ||
LIBFLAG = -shared | ||
CCSHARED = -fPIC | ||
endif | ||
|
||
OBJS = buffer.o callable.o core.o gi.o marshal.o object.o record.o | ||
|
||
COPTFLAGS = -Wall -O2 -g | ||
CFLAGS = $(CCSHARED) $(COPTFLAGS) $(LUA_CFLAGS) $(shell pkg-config --cflags $(GINAME)) | ||
LIBS += $(shell pkg-config --libs $(GINAME)) | ||
LDFLAGS = $(LIBFLAG) | ||
DEPCHECK = .depcheck | ||
|
||
# Precondition check | ||
$(DEPCHECK) : Makefile | ||
pkg-config --exists '$(GINAME) >= 0.10.8' --print-errors | ||
touch $@ | ||
|
||
.PHONY : all clean install | ||
|
||
all : $(CORE) $(VERSION_FILE) | ||
clean : | ||
rm -f $(CORE) $(OBJS) | ||
|
||
$(CORE) : $(OBJS) | ||
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) | ||
|
||
$(VERSION_FILE) : Makefile ../Makefile | ||
echo "return '$(VERSION)'" > $@ | ||
|
||
buffer.o : buffer.c lgi.h $(DEPCHECK) | ||
callable.o : callable.c lgi.h $(DEPCHECK) | ||
core.o : core.c lgi.h $(DEPCHECK) | ||
gi.o : gi.c lgi.h $(DEPCHECK) | ||
marshal.o : marshal.c lgi.h $(DEPCHECK) | ||
object.o : object.c lgi.h $(DEPCHECK) | ||
record.o : record.c lgi.h $(DEPCHECK) | ||
|
||
OVERRIDES = $(wildcard override/*.lua) | ||
|
||
install : $(CORE) $(VERSION_FILE) | ||
mkdir -p $(DESTDIR)$(LUA_LIBDIR)/lgi | ||
cp $(CORE) $(DESTDIR)$(LUA_LIBDIR)/lgi | ||
mkdir -p $(DESTDIR)$(LUA_SHAREDIR) | ||
cp ../lgi.lua $(DESTDIR)$(LUA_SHAREDIR) | ||
mkdir -p $(DESTDIR)$(LUA_SHAREDIR)/lgi | ||
cp init.lua core.lua $(VERSION_FILE) $(DESTDIR)$(LUA_SHAREDIR)/lgi | ||
mkdir -p $(DESTDIR)$(LUA_SHAREDIR)/lgi/override | ||
cp $(OVERRIDES) $(DESTDIR)$(LUA_SHAREDIR)/lgi/override |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
------------------------------------------------------------------------------ | ||
-- | ||
-- LGI Lua-side core module selector | ||
-- | ||
-- Copyright (c) 2010, 2011 Pavel Holejsovsky | ||
-- Licensed under the MIT license: | ||
-- http://www.opensource.org/licenses/mit-license.php | ||
-- | ||
------------------------------------------------------------------------------ | ||
|
||
-- This module decides what kind of core routines should be loaded. | ||
-- Currently only one implementation exists, standard-Lua C-side | ||
-- implementation, LuaJIT-FFI-based one is planned. | ||
return require 'lgi.corelgistdlua' |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
return '0.3' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.gir | ||
*.typelib |
Oops, something went wrong.
d51106d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
waf is on my list of build systems to evaluate (mostly for lua bindings to C), but I won't bother if its not a good tool. Can you comment on why you found straight gnu makefiles to be better than waf?
d51106d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
waf itself is not bad at all. I only realized that simple Makefiles are better suited to the nature of the project.
IMHO waf is good when you have much bigger fish to fry than lgi. With small size of my project, simplicity and well-knowness of make fits it much better.
HTH,
Pavel
d51106d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.