Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > cd14cddf3b3ceaf1193157472227757a > files > 733

parrot-doc-1.6.0-1mdv2010.0.i586.rpm

# Copyright (C) 2009, Parrot Foundation.
## $Id: root.in 39165 2009-05-25 01:15:28Z jkeenan $

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

## configuration settings
VERSION       := @versiondir@
BIN_DIR       := @bindir@
LIB_DIR       := @libdir@$(VERSION)
DOC_DIR       := @docdir@$(VERSION)
MANDIR        := @mandir@$(VERSION)

# Set up extensions
LOAD_EXT      := @load_ext@
O             := @o@

## Setup some commands
MAKE          := @make_c@
PERL          := @perl@
CAT           := @cat@
CHMOD         := @chmod@
CP            := @cp@
MKPATH        := @mkpath@
RM_F          := @rm_f@
RM_RF         := @rm_rf@
POD2MAN       := pod2man
#IF(parrot_is_shared and not(cygwin or win32)):export LD_RUN_PATH := @blib_dir@:$(LD_RUN_PATH)
PARROT        := @build_dir@/parrot@exe@
PBC_TO_EXE    := @build_dir@/pbc_to_exe@exe@
#IF(darwin):
#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@

SOURCES := \
  befunge.pir \
  debug.pir \
  flow.pir \
  io.pir \
  load.pir \
  maths.pir \
  stack.pir

DOCS := README

BUILD_CLEANUPS := \
  befunge.pbc \
  "*.c" \
  "*$(O)" \
  befunge@exe@ \
#IF(win32):  parrot-befunge.exe \
#IF(win32):  parrot-befunge.iss \
#IF(win32):  "setup-parrot-*.exe" \
  installable_befunge@exe@

TEST_CLEANUPS :=

# the default target
build: befunge.pbc

all: build befunge@exe@ installable

befunge.pbc: $(SOURCES)
	$(PARROT) $(PARROT_ARGS) -o befunge.pbc befunge.pir

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

installable: installable_befunge@exe@

installable_befunge@exe@: befunge.pbc
	$(PBC_TO_EXE) befunge.pbc --install

Makefile: config/makefiles/root.in
	$(PERL) Configure.pl

# This is a listing of all targets, that are meant to be called by users
help:
	@echo ""
	@echo "Following targets are available for the user:"
	@echo ""
	@echo "  build:             befunge.pbc"
	@echo "                     This is the default."
	@echo "  befunge@exe@        Self-hosting binary not to be installed."
	@echo "  all:               befunge.pbc befunge@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 "  test-installable:  Test self-hosting targets."
	@echo "  testclean:         Clean up test results."
	@echo ""
	@echo "Cleaning:"
	@echo "  clean:             Basic cleaning up."
	@echo "  realclean:         Removes also files generated by 'Configure.pl'"
	@echo "  distclean:         Removes also anything built, in theory"
	@echo ""
	@echo "Misc:"
	@echo "  help:              Print this help message."
	@echo ""

test: build
	$(PERL) t/harness

# basic run for missing libs
test-installable: installable
	echo "1" | ./installable_befunge@exe@

install: installable
	$(CP) installable_befunge@exe@ $(BIN_DIR)/parrot-befunge@exe@
	$(CHMOD) 0755 $(BIN_DIR)/parrot-befunge@exe@
	-$(MKPATH) $(LIB_DIR)/languages/befunge
	$(CP) befunge.pbc $(LIB_DIR)/languages/befunge/befunge.pbc
#	-$(MKPATH) $(MANDIR)/man1
#	$(POD2MAN) befunge.pod > $(MANDIR)/man1/parrot-befunge.1
	-$(MKPATH) $(DOC_DIR)/languages/befunge
	$(CP) $(DOCS) $(DOC_DIR)/languages/befunge

uninstall:
	$(RM_F) $(BIN_DIR)/parrot-befunge@exe@
	$(RM_RF) $(LIB_DIR)/languages/befunge
#	$(RM_F) $(MANDIR)/man1/parrot-befunge.1
	$(RM_RF) $(DOC_DIR)/languages/befunge

win32-inno-installer: installable
#	-$(MKPATH) man/man1
#	$(POD2MAN) befunge.pod > man/man1/parrot-befunge.1
#	-$(MKPATH) man/html
#	pod2html --infile befunge.pod --outfile man/html/parrot-befunge.html
	$(CP) installable_befunge@exe@ parrot-befunge.exe
	$(PERL) -I@build_dir@/lib @build_dir@/tools/dev/mk_inno_language.pl befunge
	iscc parrot-befunge.iss

testclean:
	$(RM_F) $(TEST_CLEANUPS)

clean:
	$(RM_F) $(TEST_CLEANUPS) $(BUILD_CLEANUPS)

realclean:
	$(RM_F) $(TEST_CLEANUPS) $(BUILD_CLEANUPS) Makefile

distclean: realclean

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