From d993a5f1f73e4845f504d78f3ed47c5c9bc44abe Mon Sep 17 00:00:00 2001 From: Bernhard Schmalhofer Date: Sat, 21 Mar 2009 16:35:23 +0100 Subject: [PATCH] build PMCs from src/pmc/Makefile.in --- build/templates/Makefile.in | 101 ++++++++++++---------------- build/templates/src/pmc/Makefile.in | 40 ++++++----- t/pmc/boolean.t | 4 +- 3 files changed, 65 insertions(+), 80 deletions(-) diff --git a/build/templates/Makefile.in b/build/templates/Makefile.in index 70f9f35..89ae0eb 100644 --- a/build/templates/Makefile.in +++ b/build/templates/Makefile.in @@ -1,52 +1,52 @@ -# Makefile for languages/eclectus +# Makefile for eclectus # configuration settings -BUILD_DIR := @build_dir@ -LOAD_EXT := @load_ext@ -O := @o@ +VERSION_DIR := @versiondir@ +BIN_DIR := @bin_dir@ +LIB_DIR := @lib_dir@$(VERSION_DIR) +DOC_DIR := @doc_dir@$(VERSION_DIR) +MANDIR := @mandir@$(VERSION_DIR) -# Set up commands -PARROT := ../../parrot@exe@ -PERL := @perl@ -RM_F := @rm_f@ -BUILD_DYNPMC := $(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@ +# Set up extensions +LOAD_EXT := @load_ext@ +O := @o@ +EXE := @exe@ # Set up directories -PARROT_DYNEXT := @build_dir@/runtime/parrot/dynext +BUILD_DIR := @build_dir@ +LIBRARY_DIR := $(BUILD_DIR)/runtime/parrot/library PMC_DIR := src/pmc +DYNEXT_DIR := dynext + +# Set up commands +MAKE := @make_c@ +PARROT := $(BUILD_DIR)/parrot$(EXE) +PERL := @perl@ +RM_F := @rm_f@ + +PMC_GROUP := $(DYNEXT_DIR)/pipp_group$(LOAD_EXT) + +PMC_DEPS := \ + $(PMC_DIR)/eclectusboolean.pmc \ + $(PMC_DIR)/eclectuscharacter.pmc \ + $(PMC_DIR)/eclectusemptylist.pmc \ + $(PMC_DIR)/eclectusfixnum.pmc \ + $(PMC_DIR)/eclectuspair.pmc \ + $(PMC_DIR)/eclectusstring.pmc \ + $(PMC_DIR)/eclectusvector.pmc + -ECLECTUS_GROUP := $(PMC_DIR)/eclectus_group@load_ext@ -PMCS := \ - eclectusboolean \ - eclectuscharacter \ - eclectusemptylist \ - eclectusfixnum \ - eclectuspair \ - eclectusstring \ - eclectusvector -PMC_SOURCES := \ - $(PMC_DIR)/eclectusboolean.pmc \ - $(PMC_DIR)/eclectuscharacter.pmc \ - $(PMC_DIR)/eclectusemptylist.pmc \ - $(PMC_DIR)/eclectusfixnum.pmc \ - $(PMC_DIR)/eclectuspair.pmc \ - $(PMC_DIR)/eclectusstring.pmc \ - $(PMC_DIR)/eclectusvector.pmc - - -# The default target -default: build + +# default +all: build # This is a listing of all targets, that are meant to be called by users -help : +help: @echo "" @echo "Following targets are available for the user:" @echo "" @echo "Building:" - @echo " build: Builds the dynamic PMCSs needed by Eclectus." + @echo " all: Build the dynamic PMCSs needed by Eclectus." @echo " This is the default target." @echo "" @echo "Testing:" @@ -68,15 +68,12 @@ Makefile: build/templates/Makefile.in $(PERL) Configure.pl # Compilation: -build: $(ECLECTUS_GROUP) driver_nqp.pbc +build: $(PMC_GROUP) driver_nqp.pbc -export DYNPMC_INCLUDE=$(BUILD_DIR)/src/dynpmc +$(PMC_GROUP): $(PMC_DEPS) + $(MAKE) $(PMC_DIR) build -$(ECLECTUS_GROUP): $(PARROT) $(PMC_SOURCES) - cd $(PMC_DIR) && $(BUILD_DYNPMC) generate $(PMCS) - cd $(PMC_DIR) && $(BUILD_DYNPMC) compile $(PMCS) - cd $(PMC_DIR) && $(BUILD_DYNPMC) linklibs $(PMCS) - cd $(PMC_DIR) && $(BUILD_DYNPMC) copy --destination=$(PARROT_DYNEXT) $(PMCS) +export DYNPMC_INCLUDE=@build_dir@/src/dynpmc driver_nqp.pbc: src/builtins/all.pbc driver_nqp.pir $(PARROT) -o driver_nqp.pbc driver_nqp.pir @@ -89,7 +86,7 @@ test: build $(PERL) t/harness # run the test suite, create a TAP archive and send it off to smolder -smoke : build +smoke: all - $(PERL) t/harness --archive --send-to-smolder # cleaning up @@ -100,23 +97,13 @@ clean: clean-pmc clean-test driver_nqp.pbc \ src/builtins/all.pbc -# nothing to do -clean-test: clean-pmc: - $(RM_F) \ - $(PMC_DIR)/*.h \ - $(PMC_DIR)/*.c \ - $(PMC_DIR)/*.dump \ - $(PMC_DIR)/*$(O) \ - $(PMC_DIR)/*$(LOAD_EXT) \ - $(PMC_DIR)/*.exp \ - $(PMC_DIR)/*.ilk \ - $(PMC_DIR)/*.manifest \ - $(PMC_DIR)/*.pdb \ - $(PMC_DIR)/*.lib + $(MAKE) $(PMC_DIR) clean +# nothing to do +clean-test: realclean: clean $(RM_F) Makefile diff --git a/build/templates/src/pmc/Makefile.in b/build/templates/src/pmc/Makefile.in index 109fc5a..a27538e 100644 --- a/build/templates/src/pmc/Makefile.in +++ b/build/templates/src/pmc/Makefile.in @@ -1,4 +1,4 @@ -# Build the PMCs for Pipp. +# Build the PMCs for Eclectus. # Set up commands PERL := @perl@ @@ -20,31 +20,29 @@ INSTALL_DIR := $(LIB_DIR)/dynext LOAD_EXT := @load_ext@ O := @o@ -PIPP_GROUP := $(DYNEXT_DIR)/pipp_group$(LOAD_EXT) +PMC_GROUP := $(DYNEXT_DIR)/eclectus_group$(LOAD_EXT) PMCS := \ - php \ - phparray \ - phpboolean \ - phpfloat \ - phpinteger \ - phpresource \ - phpstring \ - phpnull + eclectusboolean \ + eclectuscharacter \ + eclectusemptylist \ + eclectusfixnum \ + eclectuspair \ + eclectusstring \ + eclectusvector PMC_SOURCES := \ - php.pmc \ - phparray.pmc \ - phpboolean.pmc \ - phpfloat.pmc \ - phpinteger.pmc \ - phpresource.pmc \ - phpstring.pmc \ - phpnull.pmc + eclectusboolean.pmc \ + eclectuscharacter.pmc \ + eclectusemptylist.pmc \ + eclectusfixnum.pmc \ + eclectuspair.pmc \ + eclectusstring.pmc \ + eclectusvector.pmc # default -build: $(PIPP_GROUP) +build: $(PMC_GROUP) # This is a listing of all targets, that are meant to be called by users @@ -60,7 +58,7 @@ help: @echo " clean: Clean up." @echo "" -$(PIPP_GROUP): $(PMC_SOURCES) +$(PMC_GROUP): $(PMC_SOURCES) $(PMCBUILD) generate $(PMCS) $(PMCBUILD) compile $(PMCS) $(PMCBUILD) linklibs $(PMCS) @@ -72,5 +70,5 @@ install: # cleaning up clean: - $(RM_F) "*dump" "php*.c" "pmc_*h" "pipp_group.h" "*$(O)" "*$(LOAD_EXT)" + $(RM_F) "*dump" "eclectus*.c" "pmc_*h" "eclectus_group.h" "*$(O)" "*$(LOAD_EXT)" diff --git a/t/pmc/boolean.t b/t/pmc/boolean.t index 8331257..27607fe 100644 --- a/t/pmc/boolean.t +++ b/t/pmc/boolean.t @@ -16,9 +16,9 @@ Tests C PMC. =cut -.loadlib "eclectus_group" - .sub 'main' :main + $P0 = loadlib "eclectus_group" + .include "include/test_more.pir" plan(2)