Skip to content
This repository has been archived by the owner on Jun 9, 2018. It is now read-only.

Commit

Permalink
luap is an installable
Browse files Browse the repository at this point in the history
  • Loading branch information
fperrad committed Feb 21, 2009
1 parent 29dd321 commit cdc0dc3
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 24 deletions.
14 changes: 6 additions & 8 deletions .gitignore
@@ -1,14 +1,12 @@
Makefile

lua.pbc
lua.c
lua.o
lua.obj
*.pbc
*.c
*.o
*.obj
*.exe
lua
lua.exe
installable_lua
installable_lua.exe
parrot-lua.exe
luap

*.tmp
man
Expand Down
35 changes: 26 additions & 9 deletions config/makefiles/root.in
Expand Up @@ -8,10 +8,11 @@ PARROT_ARGS =
BUILD_DIR = @build_dir@
LOAD_EXT = @load_ext@
O = @o@
VERSION = @versiondir@
BIN_DIR = @bin_dir@
LIB_DIR = @lib_dir@@versiondir@
DOC_DIR = @doc_dir@@versiondir@
MANDIR = @mandir@@versiondir@
LIB_DIR = @lib_dir@$(VERSION)
DOC_DIR = @doc_dir@$(VERSION)
MANDIR = @mandir@$(VERSION)
PARROT_DYNEXT = $(BUILD_DIR)/runtime/parrot/dynext

## Setup some commands
Expand Down Expand Up @@ -102,7 +103,8 @@ GEN_PIR = \
$(LIBPATH)/sha1.pir

GEN_PBC = \
lua.pbc
lua.pbc \
luap.pbc

build: \
$(PMCDIR)/lua_group$(LOAD_EXT) \
Expand Down Expand Up @@ -131,7 +133,7 @@ build: \
$(GEN_PBC) \
src/yapp/Lua/parser.pm

all: build lua@exe@ installable
all: build lua@exe@ luap@exe installable

src/lua51_testlex_gen.pir: src/lua51_testlex.pg
$(PGE) --output=src/lua51_testlex_gen.pir src/lua51_testlex.pg
Expand All @@ -155,6 +157,12 @@ src/PASTGrammar_gen.pir src/POSTGrammar_gen.pir $(LIB_SRCS)
lua@exe@: lua.pbc
$(PBC_TO_EXE) lua.pbc

luap.pbc: luap.pir
$(PARROT) -o luap.pbc --output-pbc luap.pir

luap@exe@: luap.pbc
$(PBC_TO_EXE) luap.pbc

$(LIBPATH)/lualibs.pbc: $(LIB_PBCS)
$(PBC_MERGE) -o $(LIBPATH)/lualibs.pbc $(LIB_PBCS)

Expand Down Expand Up @@ -274,11 +282,14 @@ $(LIBPATH)/luabytecode_gen.pir: $(LIBPATH)/luabytecode.rules src/build/translato
src/yapp/Lua/parser.pm: src/yapp/Lua/lua51.yp
yapp -v -m Lua::parser -o src/yapp/Lua/parser.pm src/yapp/Lua/lua51.yp

installable: installable_lua@exe@
installable: installable_lua@exe@ installable_luap@exe@

installable_lua@exe@: lua.pbc
$(PBC_TO_EXE) lua.pbc --install

installable_luap@exe@: luap.pbc
$(PBC_TO_EXE) luap.pbc --install

# regenerate the Makefile
Makefile: config/makefiles/root.in
$(PERL) Configure.pl
Expand Down Expand Up @@ -380,20 +391,26 @@ test-installable: installable
install: installable
$(CP) installable_lua@exe@ $(BIN_DIR)/parrot-lua@exe@
$(CHMOD) 0755 $(BIN_DIR)/parrot-lua@exe@
$(CP) installable_luap@exe@ $(BIN_DIR)/parrot-luap@exe@
$(CHMOD) 0755 $(BIN_DIR)/parrot-luap@exe@
@cd $(PMCDIR) && $(PMCBUILD) copy "--destination=$(LIB_DIR)/dynext" $(PMCS)
-$(MKPATH) $(LIB_DIR)/languages/lua
$(CP) lua.pbc $(LIB_DIR)/languages/lua/lua.pbc
-$(MKPATH) $(LIB_DIR)/languages/lua/library
$(CP) library/*.pbc $(LIB_DIR)/languages/lua/library
-$(MKPATH) $(MANDIR)/man1
pod2man doc/running.pod > $(MANDIR)/man1/parrot-lua.1
pod2man lua.pir > $(MANDIR)/man1/parrot-lua.1
pod2man luap.pir > $(MANDIR)/man1/parrot-luap.1

win32-inno-installer: installable
-$(MKPATH) man/man1
pod2man doc/running.pod > man/man1/parrot-lua.1
pod2man lua.pir > man/man1/parrot-lua.1
pod2man luap.pir > man/man1/parrot-luap.1
-$(MKPATH) man/html
pod2html --infile doc/running.pod --outfile man/html/parrot-lua.html
pod2html --infile lua.pir --outfile man/html/parrot-lua.html
pod2html --infile luap.pir --outfile man/html/parrot-luap.html
$(CP) installable_lua@exe@ parrot-lua@exe@
$(CP) installable_luap@exe@ parrot-luap@exe@
cd @build_dir@ && $(PERL) tools/dev/mk_inno_language.pl lua
cd @build_dir@ && iscc parrot-lua.iss

Expand Down
2 changes: 1 addition & 1 deletion lua.pir
Expand Up @@ -5,7 +5,7 @@

=head2 Synopsis

$ parrot lua.pbc [options] [script [args]]
$ parrot-lua [options] [script [args]]

=head2 Description

Expand Down
13 changes: 7 additions & 6 deletions luap.pir
Expand Up @@ -5,15 +5,16 @@

=head2 Synopsis

$ parrot luap.pir script.lua
$ parrot luap.pir --target=parse script.lua
PAST
POST
PIR
$ parrot-luap script.lua
$ parrot-luap --target=parse script.lua
PAST
POST
PIR

=head2 Description

C<luap> is a compiler for Lua 5.1 on Parrot.
C<luap> is a compiler for Lua 5.1 on Parrot
with the standard interface of PCT::HLLCompiler.

=cut

Expand Down

0 comments on commit cdc0dc3

Please sign in to comment.