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

Commit

Permalink
reorg tree (non core libraries)
Browse files Browse the repository at this point in the history
  • Loading branch information
fperrad committed Nov 7, 2009
1 parent 00bc9aa commit 171cc98
Show file tree
Hide file tree
Showing 24 changed files with 143 additions and 96 deletions.
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ installable_luap
*.sto
man

src/*_gen.pir
lua/library/gl.pir
lua/library/sha1.pir

src/lib/gl.pir
src/*_gen.pir
src/lib/luabytecode_gen.pir
src/lib/sha1.pir
src/lib/*.pbc

src/pmc/*.bundle
src/pmc/*.c
Expand Down
1 change: 1 addition & 0 deletions Configure.pir
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
push_eh _handler
genfile('Makefile.in', 'Makefile', config)
genfile('src/pmc/Makefile.in', 'src/pmc/Makefile', config)
genfile('lua/library/Makefile.in', 'lua/library/Makefile', config)
pop_eh

# Give the user a hint of next action
Expand Down
97 changes: 7 additions & 90 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ O := @o@

# Various paths
PMC_DIR := src/pmc
LUALIB_DIR := lua/library
LIBPATH := src/lib

## Setup some commands
Expand Down Expand Up @@ -114,7 +115,6 @@ BUILD_CLEANUPS := \
man \
"*.pbc" \
"lua/*.pbc" \
"lua/library/*.pbc" \
"$(LIBPATH)/*.pbc" \
$(GEN_PIR) \
gl.lua \
Expand All @@ -134,28 +134,8 @@ TEST_CLEANUPS := \
"t/*.orig_out" \
"t/*.parrot_out"

build: build_core \
Test/More.pbc \
lua/library/_helpers.pbc \
lua/library/alarm.pbc \
lua/library/base64.pbc \
lua/library/bc.pbc \
lua/library/bit.pbc \
lua/library/bitlib.pbc \
lua/library/complex.pbc \
#IF(has_opengl): lua/library/gl.pbc \
#IF(has_opengl): lua/library/gl_binding.pbc \
#IF(has_opengl): lua/library/glut.pbc \
lua/library/lfs.pbc \
lua/library/lpeg.pbc \
lua/library/markdown.pbc \
lua/library/mathx.pbc \
#IF(has_crypto): lua/library/md5.pbc \
lua/library/random.pbc \
#IF(has_crypto): lua/library/sha1.pbc \
lua/library/struct.pbc \
lua/library/uuid.pbc \
lua/library/zlib.pbc
build: build_core Test/More.pbc
$(MAKE) $(LUALIB_DIR)

build_core: \
$(LUA_GROUP) \
Expand Down Expand Up @@ -257,71 +237,6 @@ Test/More.pbc: Test/More.pir
-$(PARROT) --output=Test/More.pbc Test/More.pir
-$(CP) Test/More.pbc t/lua-TestMore/src/Test/More.pbc

lua/library/_helpers.pbc: $(LIBPATH)/_helpers.pir
$(PARROT) --output=lua/library/_helpers.pbc $(LIBPATH)/_helpers.pir

lua/library/alarm.pbc: $(LIBPATH)/alarm.pir
-$(PARROT) --output=lua/library/alarm.pbc $(LIBPATH)/alarm.pir

lua/library/base64.pbc: $(LIBPATH)/base64.pir
-$(PARROT) --output=lua/library/base64.pbc $(LIBPATH)/base64.pir

lua/library/bc.pbc: $(LIBPATH)/bc.pir
-$(PARROT) --output=lua/library/bc.pbc $(LIBPATH)/bc.pir

lua/library/bit.pbc: $(LIBPATH)/bit.pir
-$(PARROT) --output=lua/library/bit.pbc $(LIBPATH)/bit.pir

lua/library/bitlib.pbc: $(LIBPATH)/bitlib.pir
-$(PARROT) --output=lua/library/bitlib.pbc $(LIBPATH)/bitlib.pir

lua/library/complex.pbc: $(LIBPATH)/complex.pir
-$(PARROT) --output=lua/library/complex.pbc $(LIBPATH)/complex.pir

#IF(has_opengl):$(LIBPATH)/gl.pir: $(LIBPATH)/gl.lua
#IF(has_opengl): -$(CP) $(LIBPATH)/gl.lua gl.lua
#IF(has_opengl): -$(PARROT) luap.pir --target=pir gl.lua > $(LIBPATH)/gl.pir
#IF(has_opengl):
#IF(has_opengl):lua/library/gl.pbc: $(LIBPATH)/gl.pir
#IF(has_opengl): -$(PARROT) --output=lua/library/gl.pbc $(LIBPATH)/gl.pir
#IF(has_opengl):
#IF(has_opengl):lua/library/gl_binding.pbc: $(LIBPATH)/gl_binding.pir
#IF(has_opengl): -$(PARROT) --output=lua/library/gl_binding.pbc $(LIBPATH)/gl_binding.pir
#IF(has_opengl):
#IF(has_opengl):lua/library/glut.pbc: $(LIBPATH)/glut.pir
#IF(has_opengl): -$(PARROT) --output=lua/library/glut.pbc $(LIBPATH)/glut.pir

lua/library/lfs.pbc: $(LIBPATH)/lfs.pir
-$(PARROT) --output=lua/library/lfs.pbc $(LIBPATH)/lfs.pir

lua/library/lpeg.pbc: $(LIBPATH)/lpeg.pir
-$(PARROT) --output=lua/library/lpeg.pbc $(LIBPATH)/lpeg.pir

lua/library/markdown.pbc: $(LIBPATH)/markdown.pir
-$(PARROT) --output=lua/library/markdown.pbc $(LIBPATH)/markdown.pir

lua/library/mathx.pbc: $(LIBPATH)/mathx.pir
-$(PARROT) --output=lua/library/mathx.pbc $(LIBPATH)/mathx.pir

#IF(has_crypto):lua/library/md5.pbc: $(LIBPATH)/md5.pir
#IF(has_crypto): -$(PARROT) --output=lua/library/md5.pbc $(LIBPATH)/md5.pir

lua/library/random.pbc: $(LIBPATH)/random.pir
-$(PARROT) --output=lua/library/random.pbc $(LIBPATH)/random.pir

#IF(has_crypto):lua/library/sha1.pbc: $(LIBPATH)/md5.pir
#IF(has_crypto): $(PERL) -pe "s|md5|sha1|g; s|MD5|SHA1|g" $(LIBPATH)/md5.pir > $(LIBPATH)/sha1.pir
#IF(has_crypto): -$(PARROT) --output=lua/library/sha1.pbc $(LIBPATH)/sha1.pir

lua/library/struct.pbc: $(LIBPATH)/struct.pir
-$(PARROT) --output=lua/library/struct.pbc $(LIBPATH)/struct.pir

lua/library/uuid.pbc: $(LIBPATH)/uuid.pir
-$(PARROT) --output=lua/library/uuid.pbc $(LIBPATH)/uuid.pir

lua/library/zlib.pbc: $(LIBPATH)/zlib.pir
-$(PARROT) --output=lua/library/zlib.pbc $(LIBPATH)/zlib.pir

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

Expand Down Expand Up @@ -470,16 +385,16 @@ install: installable
$(CHMOD) 0755 $(BIN_DIR)/parrot-luap@exe@
-$(MKPATH) $(LIB_DIR)/languages/lua
$(CP) lua/*.pbc $(LIB_DIR)/languages/lua
-$(MKPATH) $(LIB_DIR)/languages/lua/library
$(CP) lua/library/*.pbc $(LIB_DIR)/languages/lua/library
-$(MKPATH) $(MANDIR)/man1
pod2man lua.pir > $(MANDIR)/man1/parrot-lua.1
pod2man luap.pir > $(MANDIR)/man1/parrot-luap.1
-$(MKPATH) $(DOC_DIR)/languages/lua
$(CP) $(DOCS) $(DOC_DIR)/languages/lua
$(CP) doc/*.pod $(DOC_DIR)/languages/lua
$(MAKE) $(LUALIB_DIR) install

uninstall:
$(MAKE) $(LUALIB_DIR) uninstall
$(MAKE) $(PMC_DIR) uninstall
$(RM_F) $(BIN_DIR)/parrot-lua@exe@
$(RM_F) $(BIN_DIR)/parrot-luap@exe@
Expand All @@ -504,10 +419,12 @@ oldtestclean:

clean:
$(MAKE) $(PMC_DIR) clean
$(MAKE) $(LUALIB_DIR) clean
$(RM_RF) $(TEST_CLEANUPS) $(BUILD_CLEANUPS)

realclean:
$(MAKE) $(PMC_DIR) realclean
$(MAKE) $(LUALIB_DIR) realclean
$(RM_RF) $(TEST_CLEANUPS) $(BUILD_CLEANUPS) Makefile

distclean: realclean
Expand Down
2 changes: 0 additions & 2 deletions lua/library/.gitignore

This file was deleted.

132 changes: 132 additions & 0 deletions lua/library/Makefile.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# Copyright (C) 2005-2009, Parrot Foundation.
# $Id$

## arguments we want to run parrot with
PARROT_ARGS :=

## configuration settings
VERSION := @versiondir@
BIN_DIR := @bindir@
LIB_DIR := @libdir@$(VERSION)

## Setup some commands
PERL := @perl@
RM_F := @rm_f@
RM_RF := @rm_rf@
PARROT := $(BIN_DIR)/parrot@exe@

GEN_PIR := \
#IF(has_opengl): gl.pir \
#IF(has_crypto): sha1.pir \
all: build

build: \
_helpers.pbc \
alarm.pbc \
base64.pbc \
bc.pbc \
bit.pbc \
bitlib.pbc \
complex.pbc \
#IF(has_opengl): gl.pbc \
#IF(has_opengl): gl_binding.pbc \
#IF(has_opengl): glut.pbc \
lfs.pbc \
lpeg.pbc \
markdown.pbc \
mathx.pbc \
#IF(has_crypto): md5.pbc \
random.pbc \
#IF(has_crypto): sha1.pbc \
struct.pbc \
uuid.pbc \
zlib.pbc

_helpers.pbc: _helpers.pir
$(PARROT) --output=_helpers.pbc _helpers.pir

alarm.pbc: alarm.pir
-$(PARROT) --output=alarm.pbc alarm.pir

base64.pbc: base64.pir
-$(PARROT) --output=base64.pbc base64.pir

bc.pbc: bc.pir
-$(PARROT) --output=bc.pbc bc.pir

bit.pbc: bit.pir
-$(PARROT) --output=bit.pbc bit.pir

bitlib.pbc: bitlib.pir
-$(PARROT) --output=bitlib.pbc bitlib.pir

complex.pbc: complex.pir
-$(PARROT) --output=complex.pbc complex.pir

#IF(has_opengl):gl.pir: gl.lua
#IF(has_opengl): -$(PARROT) luap.pir --target=pir gl.lua > gl.pir
#IF(has_opengl):
#IF(has_opengl):gl.pbc: gl.pir
#IF(has_opengl): -$(PARROT) --output=gl.pbc gl.pir
#IF(has_opengl):
#IF(has_opengl):gl_binding.pbc: gl_binding.pir
#IF(has_opengl): -$(PARROT) --output=gl_binding.pbc gl_binding.pir
#IF(has_opengl):
#IF(has_opengl):glut.pbc: glut.pir
#IF(has_opengl): -$(PARROT) --output=glut.pbc glut.pir

lfs.pbc: lfs.pir
-$(PARROT) --output=lfs.pbc lfs.pir

lpeg.pbc: lpeg.pir
-$(PARROT) --output=lpeg.pbc lpeg.pir

markdown.pbc: markdown.pir
-$(PARROT) --output=markdown.pbc markdown.pir

mathx.pbc: mathx.pir
-$(PARROT) --output=mathx.pbc mathx.pir

#IF(has_crypto):md5.pbc: md5.pir
#IF(has_crypto): -$(PARROT) --output=md5.pbc md5.pir

random.pbc: random.pir
-$(PARROT) --output=random.pbc random.pir

#IF(has_crypto):sha1.pbc: md5.pir
#IF(has_crypto): $(PERL) -pe "s|md5|sha1|g; s|MD5|SHA1|g" md5.pir > sha1.pir
#IF(has_crypto): -$(PARROT) --output=sha1.pbc sha1.pir

struct.pbc: struct.pir
-$(PARROT) --output=struct.pbc struct.pir

uuid.pbc: uuid.pir
-$(PARROT) --output=uuid.pbc uuid.pir

zlib.pbc: zlib.pir
-$(PARROT) --output=zlib.pbc zlib.pir

install: installable
-$(MKPATH) $(LIB_DIR)/languages/lua/library
$(CP) lua/library/*.pbc $(LIB_DIR)/languages/lua/library

uninstall:
$(RM_RF) $(LIB_DIR)/languages/lua/library

Makefile: Makefile.in
cd ../.. && $(PARROT) Configure.pir

clean:
$(RM_F) *.pbc $(GEN_PIR)

realclean:
$(RM_F) *.pbc $(GEN_PIR) Makefile

distclean: realclean

# Local variables:
# mode: makefile
# End:
# vim: ft=make:

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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 171cc98

Please sign in to comment.