diff options
author | Nathan Angelacos <nangel@alpinelinux.org> | 2011-03-06 05:14:25 +0000 |
---|---|---|
committer | Nathan Angelacos <nangel@alpinelinux.org> | 2011-03-06 05:14:25 +0000 |
commit | b329f365e86e1b35b5e0dfc9abdf9133d4dc8181 (patch) | |
tree | e6bbb411679f224c47c5cd09046daa12f594afe6 /src/Makefile.am | |
parent | 2051d1173da76d6470663c9ab715638d1c7844e2 (diff) | |
download | haserl-b329f365e86e1b35b5e0dfc9abdf9133d4dc8181.tar.bz2 haserl-b329f365e86e1b35b5e0dfc9abdf9133d4dc8181.tar.xz |
0.9.28 pre-release commit
Diffstat (limited to 'src/Makefile.am')
-rw-r--r-- | src/Makefile.am | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index cf11ae7..96c1f22 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -19,24 +19,17 @@ BASHSOURCE = h_bash.c h_bash.h endif if USE_LUA - -haserl_lualib.inc : haserl_lualib.lua - @echo '-----------------------------------------------------' - @echo 'Whoops. haserl_lualib.inc is old. You will need' - @echo 'to compile lua2c by hand, or help the maintainer' - @echo 'get automake to do it for you.' - @echo '' - @echo 'For now, to compile lua2c:' - @echo '' - @echo 'gcc -I<luaheaderdir> -Wl,-E -L<lualibdir> -o lua2c lua2c.c -llua -ldl -lm' - @echo '' - @echo '' - @echo 'Then follow the instructions in lua2c.c to create a' - @echo 'new haserl_lualib.inc' - @echo '' - @echo 'Sorry.' - @echo '-----------------------------------------------------' - @exit 1 +# lua2c_LIBS ?= -llua -ldl -lm +lua2c_LDFLAGS ?= -Wl,-E +lua2c: lua2c.c + $(CC_FOR_BUILD) $(CFLAGS) $(LDFLAGS) $(lua2c_LDFLAGS) \ + -o $@ $^ $(LIBS) + +haserl_lualib.inc : haserl_lualib.lua lua2c + if ! ./lua2c haserl_lualib haserl_lualib.lua >$@; then \ + rm $@; \ + exit 1 ;\ + fi h_lua_common.c : haserl_lualib.inc |