Skip to content

Commit

Permalink
clean up Makefile
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Weeks <tene@allalone.org>
  • Loading branch information
fperrad authored and tene committed Mar 16, 2009
1 parent 1868f51 commit d05fa26
Showing 1 changed file with 11 additions and 43 deletions.
54 changes: 11 additions & 43 deletions config/makefiles/root.in
@@ -1,48 +1,35 @@
## $Id$

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

## configuration settings
BUILD_DIR = @build_dir@
LOAD_EXT = @load_ext@
O = @o@

## Setup some commands
LN_S = @lns@
PERL = @perl@
RM_RF = @rm_rf@
RM_F = @rm_f@
CP = @cp@
PARROT = ../../parrot@exe@
CAT = $(PERL) -MExtUtils::Command -e cat
BUILD_DYNPMC = $(PERL) $(BUILD_DIR)/tools/build/dynpmc.pl
RECONFIGURE = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl

## places to look for things
PARROT_DYNEXT = $(BUILD_DIR)/runtime/parrot/dynext
PGE_LIBRARY = $(BUILD_DIR)/runtime/parrot/library/PGE
PERL6GRAMMAR = $(PGE_LIBRARY)/Perl6Grammar.pbc
NQP = $(BUILD_DIR)/compilers/nqp/nqp.pbc
PCT = $(BUILD_DIR)/runtime/parrot/library/PCT.pbc

PMC_DIR = src/pmc

all: gil.pbc

GIL_GROUP = $(PMC_DIR)/gil_group$(LOAD_EXT)

SOURCES = gil.pir \
SOURCES = \
src/gen_grammar.pir \
src/gen_actions.pir \
src/gen_builtins.pir \
# $(GIL_GROUP)
gil.pir

BUILTINS_PIR = \
src/builtins/say.pir \
src/builtins/math.pir \

# PMCS = gil
# PMC_SOURCES = $(PMC_DIR)/gil.pmc
src/builtins/math.pir

# the default target
gil.pbc: $(PARROT) $(SOURCES)
Expand All @@ -58,17 +45,11 @@ src/gen_actions.pir: $(NQP) $(PCT) src/parser/actions.pm
--target=pir src/parser/actions.pm

src/gen_builtins.pir: $(BUILTINS_PIR)
$(CAT) $(BUILTINS_PIR) >src/gen_builtins.pir

$(GIL_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)
$(CAT) $(BUILTINS_PIR) > src/gen_builtins.pir

# regenerate the Makefile
Makefile: config/makefiles/root.in
cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=gil
$(PERL) Configure.pl

# This is a listing of all targets, that are meant to be called by users
help:
Expand Down Expand Up @@ -97,27 +78,14 @@ test: all
testclean:

CLEANUPS = \
gil.pbc \
src/gen_grammar.pir \
src/gen_actions.pir \
src/gen_builtins.pir \
$(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 \

"src/gen_*.pir" \
gil.pbc

clean:
$(RM_RF) $(CLEANUPS)
$(RM_F) $(CLEANUPS)

realclean: clean
$(RM_RF) Makefile
$(RM_F) Makefile

distclean: realclean

Expand Down

0 comments on commit d05fa26

Please sign in to comment.