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

Commit

Permalink
add targets : build, installable, install win32-inno-installer
Browse files Browse the repository at this point in the history
  • Loading branch information
fperrad committed Feb 20, 2009
1 parent adf829f commit 3188461
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 14 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Expand Up @@ -6,6 +6,12 @@ lua.o
lua.obj
lua
lua.exe
installable_lua
installable_lua.exe
parrot-lua.exe

*.tmp
man

src/*_gen.pir

Expand Down
68 changes: 54 additions & 14 deletions config/makefiles/root.in
@@ -1,28 +1,36 @@
# Copyright (C) 2005-2009, Parrot Foundation.
# $Id$

## arguments we want to run parrot with
PARROT_ARGS =

## configuration settings
O = @o@
LOAD_EXT = @load_ext@
BUILD_DIR = @build_dir@
LOAD_EXT = @load_ext@
O = @o@
BIN_DIR = @bin_dir@
LIB_DIR = @lib_dir@@versiondir@
DOC_DIR = @doc_dir@@versiondir@
MANDIR = @mandir@@versiondir@
PARROT_DYNEXT = $(BUILD_DIR)/runtime/parrot/dynext

## Setup some commands
MAKE = @make_c@
RM_F = @rm_f@
PERL = @perl@
PARROT = ../../parrot@exe@
PBC_MERGE = ../../pbc_merge@exe@
PGE = $(PARROT) ../../runtime/parrot/library/PGE/Perl6Grammar.pir
TGE = $(PARROT) ../../compilers/tge/tgc.pir
PBC_TO_EXE = ../../pbc_to_exe@exe@
PMCBUILD = $(PERL) @build_dir@/tools/build/dynpmc.pl
PERL = @perl@
RM_F = @rm_f@
CP = @cp@
CAT = @cat@
MKPATH = @mkpath@
#IF(parrot_is_shared and not(cygwin or win32)):export LD_RUN_PATH := @blib_dir@:$(LD_RUN_PATH)
PARROT = ../../parrot@exe@
PBC_TO_EXE = ../../pbc_to_exe@exe@
PMCBUILD = $(PERL) $(BUILD_DIR)/tools/build/dynpmc.pl
#IF(darwin):
#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@

## places to look for things
LIBPATH = src/lib
PMCDIR = src/pmc
PARROT_DYNEXT = @build_dir@/runtime/parrot/dynext

PMCS = \
lua \
Expand Down Expand Up @@ -93,7 +101,7 @@ GEN_PIR = \
GEN_PBC = \
lua.pbc

all: \
build: \
$(PMCDIR)/lua_group$(LOAD_EXT) \
$(LIB_PBCS) \
$(LIBPATH)/luaperl.pbc \
Expand All @@ -120,6 +128,7 @@ all: \
$(GEN_PBC) \
src/yapp/Lua/parser.pm

all: build lua@exe@ installable

src/lua51_testlex_gen.pir: src/lua51_testlex.pg
$(PGE) --output=src/lua51_testlex_gen.pir src/lua51_testlex.pg
Expand Down Expand Up @@ -262,6 +271,11 @@ $(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_lua@exe@: lua.pbc
$(PBC_TO_EXE) lua.pbc --install

# regenerate the Makefile
Makefile: config/makefiles/root.in
$(PERL) Configure.pl
Expand All @@ -270,8 +284,12 @@ help:
@echo ""
@echo "Following targets are available for the user:"
@echo ""
@echo " all:"
@echo " build: lua.pbc"
@echo " This is the default."
@echo " all: lua.pbc lua@exe@ installable"
@echo " installable: Create libs and self-hosting binaries to be installed."
@echo " install: Install the installable targets and docs."
@echo ""
@echo "Testing:"
@echo " test: Run the test suite."
@echo " codetest: Run file metadata and coding standards tests."
Expand Down Expand Up @@ -353,6 +371,28 @@ codetest-pod:
smoke : all
-$(PERL) t/harness --archive --send-to-smolder

test-installable: installable
./installable_lua@exe@ -e "print 'ok'"

install: installable
$(CP) installable_lua@exe@ $(BIN_DIR)/parrot-lua@exe@
@cd $(PMC_DIR) && $(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

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

TEST_CLEANERS = \
"t/pmc/*.pir" \
"t/*.pir" \
Expand Down

0 comments on commit 3188461

Please sign in to comment.