Ticket #30: 39742-installed-conflict.patch

File 39742-installed-conflict.patch, 28.0 KB (added by rurban, 6 years ago)
  • config/gen/makefiles/dynpmc_pl.in

    				-*- diff -*-
    The reason for the problem to make shared libparrot with an already installed 
    shared libparrot is simple and has several reasons:
    
    1. libs belongs to the end. 
    
    first LDFLAGS, then LD_LOAD_FLAGS, then libparrot, 
    then LIBS + EXTRALIBS.
    
    dynpmc got this wrong. 
    It had LIBS at the front. 
      a. One should not put libs before the LDFLAGS.
      b. One should reverse the LIBS line in order of dependencies.
         We have the problem that the libs line is generated automatically 
         and may contain -L/usr/lib (pulled in from libicu) and -L/usr/local/lib, 
         so the already installed -lparrot will be found. 
    
    So our -Lblib/lib should be at the front, best in LDFLAGS.
    Note that parrot.pc got that right:
      Libs: -L${libdir} -lparrot @icu_shared@ @libs@
    
    2. remove the perl5 -L/usr/local/lib LDFLAGS which would pull in 
       a shared /usr/local/lib/libparrot.so before checking -Lblib/lib
      -lparrot.
    
    One fix could be to check this in Configure and move all -L from LDFLAGS
    to the LIBS flag at the front. I went this way.
    
    The other fix would be to explicitly link to blib/lib/libparrot.so,
    without -L path hacks.
    
    3. Now an already installed libparrot.dll/.so does not conflict with make anymore.
       The remaining problem is at make installable esp. for the languages 
       and already installed /usr/lib/parrot, /usr/include/parrot and
       /usr/lib/libparrot.dll.a
    
    This patch adds PATH resp. LD_RUN_PATH to the parrot invocations, similar as in perl5.
    It moves a -L<path> from @ldflags@ to @libs@ in config.
    It also adds emacs/vim modes to the Makefiles.
    It also adds Makefile targets to regenerate the Makefiles automatically.
    
    old new  
    8181 
    8282    my $liblist; 
    8383    if ($^O =~ /mswin32/i) { 
    84         # Need to put various libraries in the link line. 
    85         $liblist = join( ' ', map { "$_.lib" } keys %$libs ); 
     84        # Note that we may need to look in the Parrot blib directory first. 
     85        if ($CC =~ /gcc/i) { 
     86            $liblist = qq{ -Wl,-L "@build_dir@/blib/lib"}; 
     87        } 
     88        else { 
     89            $liblist = qq{ /LIBPATH:"@build_dir@/blib/lib"}; 
     90        } 
     91        # Need to add various libraries in the link line. 
     92        $liblist .= join( ' ', map { "$_.lib" } keys %$libs ); 
    8693        if ($CC =~ /gcc/i) { 
    8794            $liblist =~ s/libgdbm\.lib/-llibgdbm/i; 
    8895        } 
     
    9097        $extraLibs =~ s/blib/..\\blib/g; 
    9198        $extraLibs =~ s/\Q$(A)\E/.lib/g; 
    9299        $liblist .= ' ' . $extraLibs; 
    93  
    94         # Also note that we may need to look in the Parrot blib directory. 
    95         if ($CC =~ /gcc/i) { 
    96             $liblist .= qq{ -Wl,-L "@build_dir@/blib/lib"}; 
    97         } 
    98         else { 
    99             $liblist .= qq{ /LIBPATH:"@build_dir@/blib/lib"}; 
    100         } 
    101100    } 
    102101    else { 
    103102        $liblist = join( ' ', map { "-l$_" } keys %$libs ); 
     
    109108        push @$sources, split ",", $ENV{DYNPMC_LINK}; 
    110109    } 
    111110 
     111    # LDFLAGS, LIBS or ICU_SHARED may contain -L/usr/lib or -L/usr/local/lib 
     112    # falsely favoring an already installed libparrot.{so,dll}. So put liblist 
     113    # to the end. 
    112114    return 
    113115        "$LD ". 
    114116        '@ld_out@' . $target . " " . 
    115117        join(" ", map {"$PATHQUOTE$_$PATHQUOTE"} @$sources) . 
    116         " $liblist $LDFLAGS $LD_LOAD_FLAGS $PATHQUOTE$LIBPARROT$PATHQUOTE"; 
     118        " $LDFLAGS $LD_LOAD_FLAGS $PATHQUOTE$LIBPARROT$PATHQUOTE $liblist"; 
    117119} 
    118120 
    119121our $NOW = time(); 
  • config/gen/makefiles/dynpmc.in

    old new  
    7272distclean: realclean 
    7373 
    7474svnclean: realclean 
     75 
     76# 
     77# Local variables: 
     78# mode: makefile 
     79# ex: ft=make 
     80# End: 
  • config/gen/makefiles/nqp.in

    old new  
    44PERL     = @perl@ 
    55RM_F     = @rm_f@ 
    66PARROT   = ../../parrot@exe@ 
     7RECONFIGURE   = $(PERL) @build_dir@/tools/dev/reconfigure.pl 
     8 
     9 
    710 
    811PARROT_LIBRARY = @build_dir@/runtime/parrot/library 
    912PGE_LIBRARY  = @build_dir@/runtime/parrot/library/PGE 
     
    2629 
    2730boot: $(BOOTSRC) 
    2831        $(PARROT) nqp.pbc \ 
    29         --output=bootstrap/gen_actions.pir \ 
    30         --target=pir \ 
    31         bootstrap/actions.pm 
     32          --output=bootstrap/gen_actions.pir \ 
     33          --target=pir \ 
     34          bootstrap/actions.pm 
    3235        $(PARROT) --output-pbc -o bootstrap/nqp.pbc bootstrap/nqp.pir 
    3336 
     37# regenerate the Makefile 
     38Makefile: @build_dir@/config/gen/makefiles/nqp.in 
     39        cd @build_dir@ && $(RECONFIGURE) --step=gen::makefiles --target=compilers/nqp/Makefile 
     40 
    3441# This is a listing of all targets, that are meant to be called by users 
    3542help: 
    3643        @echo "" 
     
    7178        $(RM_F) Makefile 
    7279 
    7380distclean: realclean 
     81 
     82# 
     83# Local variables: 
     84# mode: makefile 
     85# ex: ft=make 
     86# End: 
  • config/gen/makefiles/parrot_embed.in

    old new  
    1 # Copyright (C) 2007, The Perl Foundation. 
     1# Copyright (C) 2007, The Perl Foundation. -*- cperl -*- 
    22# $Id: parrot_embed.in 17688 2007-03-22 08:48:04Z fperrad $ 
    33# 
    44use Cwd; 
     
    4343 
    4444sub postamble 
    4545{ 
    46     "t/greet.pbc:\n\t$config{PARROT} -o t/greet.pbc t/greet.pir\n"; 
     46    "t/greet.pbc:\n\t$config{PARROT} -o t/greet.pbc t/greet.pir\n" 
     47    ."#\n# Local variables:\n# mode: makefile\n" 
     48    ."# ex: ft=make\n# End:\n"; 
    4749} 
    4850 
    4951sub test 
     
    6466    $inherited     =~ s{($sub_target)}{$1 t/greet.pbc}; 
    6567    $inherited; 
    6668} 
     69 
     70# Local Variables: 
     71#   mode: cperl 
     72#   cperl-indent-level: 4 
     73#   fill-column: 100 
     74# End: 
     75# vim: expandtab shiftwidth=4: 
  • config/gen/makefiles/pct.in

    old new  
    99PGE_DIR  = ../../compilers/pge 
    1010TEST_DIR = ../../t/compilers/pct 
    1111CP       = @cp@ 
     12RECONFIGURE   = $(PERL) @build_dir@/tools/dev/reconfigure.pl 
     13 
     14 
    1215 
    1316# Where to put things 
    1417PARROT_LIBRARY    = ../../runtime/parrot/library 
     
    3033  src/POST/Node.pir 
    3134 
    3235# the default target 
    33 all: $(PARROT_LIBRARY)/PCT.pbc 
     36all: $(PARROT_LIBRARY)/PCT.pbc Makefile 
    3437 
    3538$(PARROT_LIBRARY)/PCT.pbc: $(PARROT) $(PCT_SOURCES) 
    3639        $(PARROT) -o $(PARROT_LIBRARY)/PCT.pbc --output-pbc PCT.pir 
     
    3841        $(PARROT) -o $(PARROT_LIBRARY)/PCT/Grammar.pbc --output-pbc src/PCT/Grammar.pir 
    3942        $(PARROT) -o $(PARROT_LIBRARY)/PCT/HLLCompiler.pbc --output-pbc src/PCT/HLLCompiler.pir 
    4043 
     44# regenerate the Makefile 
     45Makefile: @build_dir@/config/gen/makefiles/pct.in 
     46        cd @build_dir@ && $(RECONFIGURE) --step=gen::makefiles --target=compilers/pct/Makefile 
     47 
    4148# This is a listing of all targets, that are meant to be called by users 
    4249help: 
    4350        @echo "" 
     
    7279        $(RM_F) Makefile 
    7380 
    7481distclean: realclean 
     82 
     83# 
     84# Local variables: 
     85# mode: makefile 
     86# ex: ft=make 
     87# End: 
  • config/gen/makefiles/pge.in

    old new  
    77PARROT   = ../../parrot@exe@ 
    88TOOL_DIR = ../.. 
    99CP       = @cp@ 
     10RECONFIGURE   = $(PERL) @build_dir@/tools/dev/reconfigure.pl 
     11 
     12 
    1013 
    1114# Where to put things 
    1215PARROT_LIBRARY    = ../../runtime/parrot/library 
    1316 
    1417# the default target 
    15 all: $(PARROT_LIBRARY)/PGE.pbc 
     18all: $(PARROT_LIBRARY)/PGE.pbc Makefile 
    1619 
    1720SOURCES = PGE.pir \ 
    1821  PGE/Exp.pir \ 
     
    3033        $(RM_F) PGE.pbc $(PARROT_LIBRARY)/PGE.pbc 
    3134        $(PERL) -e "" >PGE/builtins_gen.pir 
    3235        $(PARROT) -o PGE.pbc --output-pbc PGE.pir 
    33         $(PARROT) $(PARROT_LIBRARY)/PGE/Perl6Grammar.pir  --output=PGE/builtins_gen.pir PGE/builtins.pg 
     36        $(PARROT) $(PARROT_LIBRARY)/PGE/Perl6Grammar.pir --output=PGE/builtins_gen.pir PGE/builtins.pg 
    3437        $(RM_F) PGE.pbc 
    3538        $(PARROT) -o PGE.pbc --output-pbc PGE.pir 
    3639 
     40# regenerate the Makefile 
     41Makefile: @build_dir@/config/gen/makefiles/pge.in 
     42        cd @build_dir@ && $(RECONFIGURE) --step=gen::makefiles --target=compilers/pge/Makefile 
     43 
    3744# This is a listing of all targets, that are meant to be called by users 
    3845help: 
    3946        @echo "" 
     
    7582        $(RM_F) Makefile 
    7683 
    7784distclean: realclean 
     85 
     86# 
     87# Local variables: 
     88# mode: makefile 
     89# ex: ft=make 
     90# End: 
  • config/gen/makefiles/pirc.in

    old new  
    88TOOL_DIR      = ../.. 
    99CC            = @cc@ 
    1010CP            = @cp@ 
     11POD2HTML      = pod2html 
     12PODCHECKER    = podchecker 
    1113BUILD         = $(PERL) @build_dir@/tools/build/dynpmc.pl 
    1214O             = @o@ 
    1315EXE           = @exe@ 
     
    5456 
    5557 
    5658# the default target 
    57 all: pirc$(EXE) 
     59all: pirc$(EXE) heredoc macro Makefile 
    5860 
    5961 
    6062pirc$(EXE): $(OBJS) 
     
    9597doc/*.html 
    9698 
    9799distclean: realclean 
     100 
     101# 
     102# Local variables: 
     103# mode: makefile 
     104# ex: ft=make 
     105# End: 
  • config/gen/makefiles/tge.in

    old new  
    66PERL     = @perl@ 
    77RM_F     = @rm_f@ 
    88PARROT   = ../../parrot@exe@ 
     9RECONFIGURE   = $(PERL) @build_dir@/tools/dev/reconfigure.pl 
     10 
     11 
    912 
    1013# Where to put things 
    1114PARROT_LIBRARY    = ../../runtime/parrot/library 
    1215PERL6GRAMMAR      = $(PARROT_LIBRARY)/PGE/Perl6Grammar.pbc 
    1316 
    1417# the default target 
    15 all: $(PARROT_LIBRARY)/TGE.pbc 
     18all: $(PARROT_LIBRARY)/TGE.pbc Makefile 
    1619 
    1720$(PARROT_LIBRARY)/TGE.pbc: TGE.pir TGE/Rule.pbc TGE/Parser.pbc TGE/Grammar.pbc TGE/Compiler.pbc TGE/Tree.pbc 
    1821        $(PARROT) -o $(PARROT_LIBRARY)/TGE.pbc --output-pbc TGE.pir 
     
    2124        $(PARROT) -o $@ --output-pbc $< 
    2225 
    2326TGE/Parser.pir: TGE/Parser.pg 
    24         $(PARROT) $(PERL6GRAMMAR) --output=TGE//Parser.pir TGE//Parser.pg 
     27        $(PARROT) $(PERL6GRAMMAR) --output=TGE/Parser.pir TGE/Parser.pg 
     28 
     29# regenerate the Makefile 
     30Makefile: @build_dir@/config/gen/makefiles/tge.in 
     31        cd @build_dir@ && $(RECONFIGURE) --step=gen::makefiles --target=compilers/tge/Makefile 
    2532 
    2633# This is a listing of all targets, that are meant to be called by users 
    2734help: 
     
    6269        $(RM_F) Makefile 
    6370 
    6471distclean: realclean 
     72 
     73# 
     74# Local variables: 
     75# mode: makefile 
     76# ex: ft=make 
     77# End: 
  • config/gen/makefiles/editor.in

    old new  
    1111CP     = @cp@ 
    1212MKPATH = @mkpath@ 
    1313RM_F   = @rm_f@ 
     14RECONFIGURE   = $(PERL) @build_dir@/tools/dev/reconfigure.pl 
    1415 
    1516default: all 
    1617 
    17 all: pir.vim imc.kate 
     18all: pir.vim imc.kate Makefile 
     19 
     20# regenerate the Makefile 
     21Makefile: @build_dir@/config/gen/makefiles/editor.in 
     22        cd @build_dir@ && $(RECONFIGURE) --step=gen::makefiles --target=editor/Makefile 
    1823 
    1924# This is a listing of all targets, that are meant to be called by users 
    2025help : 
     
    6671 
    6772realclean: clean 
    6873        $(RM_F) Makefile 
     74 
     75# 
     76# Local variables: 
     77# mode: makefile 
     78# ex: ft=make 
     79# End: 
  • config/gen/makefiles/ext.in

    old new  
    2828        @echo "                This is the default." 
    2929        @echo "  test:         Unified test suite for a lot of languages." 
    3030        @echo "" 
     31        @echo "  installable:  Create self-hosting bins and libs." 
     32        @echo "" 
     33        @echo "  test-installable: Test self-hosting bins and libs." 
     34        @echo "" 
     35        @echo "  install:      Make install for a lot of languages." 
     36        @echo "" 
    3137        @echo "  clean:        Clean up a lot of languages." 
     38        @echo "  realclean:    Clean up and remove Makefiles." 
    3239        @echo "" 
    3340        @echo "  help:         Print this help message." 
    3441        @echo "" 
     
    4047        @echo "" 
    4148        @echo "Following languages are available:" 
    4249        @echo "  $(LANGUAGES)" 
    43         @echo "A particular language <lang> can be built, tested and cleand up" 
    4450        @echo "  make <lang>" 
    4551        @echo "  make <lang>.test" 
     52        @echo "  make <lang>.installable" 
     53        @echo "  make <lang>.test-installable" 
     54        @echo "  make <lang>.install" 
    4655        @echo "  make <lang>.clean" 
    47         @echo "For the status of individual languages see LANGUAGES.STATUS.pod" 
     56        @echo "  make <lang>.realclean" 
     57        @echo "For the status of individual languages see LANGUAGES_STATUS.pod" 
    4858        @echo "" 
    4959 
    5060clean: \ 
     
    6676#CONDITIONED_LINE(win32):       - cd Parrot-Embed && nmake clean 
    6777#INVERSE_CONDITIONED_LINE(win32):       - cd Parrot-Embed && $(MAKE) clean 
    6878 
     79# 
     80# Local variables: 
     81# mode: makefile 
     82# ex: ft=make 
     83# End: 
  • config/gen/makefiles/json.in

    old new  
    33PERL     = @perl@ 
    44RM_F     = @rm_f@ 
    55PARROT   = ../../parrot@exe@ 
     6RECONFIGURE   = $(PERL) @build_dir@/tools/dev/reconfigure.pl 
     7 
     8 
    69 
    710TOOL_DIR = ../.. 
    811PGE_DIR  = ../../compilers/pge 
    912TGE_DIR  = ../../compilers/tge 
    1013 
    1114# the default target 
    12 all: JSON.pbc 
     15all: JSON.pbc Makefile 
     16 
     17# regenerate the Makefile 
     18Makefile: @build_dir@/config/gen/makefiles/json.in 
     19        cd @build_dir@ && $(RECONFIGURE) --step=gen::makefiles --target=compilers/json/Makefile 
    1320 
    1421# This is a listing of all targets, that are meant to be called by users 
    1522help: 
     
    5259 
    5360clean : testclean 
    5461        @rm_f@ "JSON/*.pbc" "JSON/*.pir" JSON.pbc 
     62 
     63# 
     64# Local variables: 
     65# mode: makefile 
     66# ex: ft=make 
     67# End: 
  • config/gen/makefiles/root.in

    old new  
    106106INNO_SETUP       = iscc 
    107107JIT_BUILD_TOOL   = $(BUILD_TOOLS_DIR)/jit2c.pl 
    108108#CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@ 
     109#CONDITIONED_LINE(cygchkdll):SHRPENV  = env PATH="@build_dir@/blib/lib:$(PATH)" 
     110#INVERSE_CONDITIONED_LINE(cygchkdll):SHRPENV  = env LD_RUN_PATH="@build_dir@/blib/lib" 
    109111 
    110112############################################################################### 
    111113# 
     
    534536# here, though. Ignored on Mac OS X, at least. 
    535537 
    536538.pir.pbc : 
    537         $(PARROT) -o $@ $< 
     539        $(SHRPENV) $(PARROT) -o $@ $< 
    538540 
    539541.pbc$(O) : 
    540         $(PARROT) -o $@ $< 
     542        $(SHRPENV) $(PARROT) -o $@ $< 
    541543 
    542544 
    543545############################################################################### 
     
    768770        @$(PERL) tools/dev/cc_flags.pl $(CUR_DIR)/CFLAGS echo $(CC) $(CFLAGS) -I$(@D) @cc_o_out@ xx$(O) -c xx.c 
    769771 
    770772runtime/parrot/include/parrotlib.pbc: runtime/parrot/library/parrotlib.pir $(PARROT) 
    771         $(PARROT) -o $@ runtime/parrot/library/parrotlib.pir 
     773        $(SHRPENV) $(PARROT) -o $@ runtime/parrot/library/parrotlib.pir 
    772774 
    773775runtime/parrot/include/config.fpmc : myconfig config_lib.pasm $(MINIPARROT) 
    774         @cygchkdll@ 
     776#CONDITIONED_LINE(cygchkdll):   $(SHRPENV) @cygchkdll@ 
    775777        @echo Invoking Parrot to generate runtime/parrot/include/config.fpmc --cross your fingers 
    776         $(MINIPARROT) config_lib.pasm > $@ 
     778        $(SHRPENV) $(MINIPARROT) config_lib.pasm > $@ 
    777779 
    778780$(PARROT) : $(SRC_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) CFLAGS \ 
    779781    lib/Parrot/OpLib/core.pm $(SRC_DIR)/parrot_config$(O) \ 
     
    788790    > pbc_to_exe.pir 
    789791 
    790792$(PBC_TO_EXE) : pbc_to_exe.pir $(PARROT) 
    791         $(PARROT) -o pbc_to_exe.pbc pbc_to_exe.pir 
    792         $(PARROT) pbc_to_exe.pir pbc_to_exe.pbc 
     793        $(SHRPENV) $(PARROT) -o pbc_to_exe.pbc pbc_to_exe.pir 
     794        $(SHRPENV) $(PARROT) pbc_to_exe.pir pbc_to_exe.pbc 
    793795 
    794796$(PARROT_CONFIG) : tools/util/parrot-config.pir $(PARROT) $(PBC_TO_EXE) 
    795         $(PARROT) -o parrot_config.pbc tools/util/parrot-config.pir 
    796         $(PARROT) pbc_to_exe.pbc parrot_config.pbc 
     797        $(SHRPENV) $(PARROT) -o parrot_config.pbc tools/util/parrot-config.pir 
     798        $(SHRPENV) $(PARROT) pbc_to_exe.pbc parrot_config.pbc 
    797799 
    798800# HLL Executable targets 
    799801#CONDITIONED_LINE(win32):perl6 : $(PERL6) 
     
    802804        $(MAKE) languages/perl6 perl6$(EXE) 
    803805        $(CP) languages/perl6/perl6$(EXE) $(PERL6) 
    804806        $(CHMOD) 0755 $(PERL6) 
    805         $(PERL6) -e"say 'Hello, world.'" 
     807        $(SHRPENV) $(PERL6) -e"say 'Hello, world.'" 
    806808 
    807809 
    808810# TODO build the real miniparrot 
     
    814816 
    815817$(INSTALLABLEPARROT) : $(SRC_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \ 
    816818    lib/Parrot/OpLib/core.pm $(SRC_DIR)/install_config$(O) \ 
    817     $(PARROT) 
     819    $(SHRPENV) $(PARROT) 
    818820        $(LINK) @ld_out@$@ \ 
    819     $(SRC_DIR)/main$(O) \ 
    820     $(ALL_PARROT_LIBS) $(LINKFLAGS) $(SRC_DIR)/install_config$(O) 
     821    $(SRC_DIR)/main$(O) $(SRC_DIR)/install_config$(O) \ 
     822    $(ALL_PARROT_LIBS) $(LINKFLAGS) 
    821823#CONDITIONED_LINE(win32):       if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1 
    822824 
    823825$(INC_DIR)/parrot.h : $(INC_DIR)/pbcversion.h $(INC_DIR)/vtable.h 
     
    843845 
    844846install_config.fpmc : myconfig config_lib.pasm $(PARROT) 
    845847        @echo "Invoking Parrot to generate install_config.fpmc" 
    846         $(PARROT) config_lib.pasm --install > $@ 
     848        $(SHRPENV) $(PARROT) config_lib.pasm --install > $@ 
    847849 
    848850$(SRC_DIR)/parrot_config$(O) : $(SRC_DIR)/parrot_config.c 
    849851 
     
    888890$(LIBPARROT_SHARED) : $(O_FILES) 
    889891        $(MKPATH) @blib_dir@ 
    890892        $(LD) $(LD_SHARE_FLAGS) $(LDFLAGS) @ld_out@$@ @libparrot_soname@ \ 
    891 #CONDITIONED_LINE(cygchkdll):           -Wl,--out-implib=blib/lib/libparrot.dll.a \ 
     893#CONDITIONED_LINE(cygchkdll):           -Wl,--out-implib=libparrot.dll.a \ 
    892894                $(O_FILES) $(C_LIBS) $(ICU_SHARED) 
    893895#CONDITIONED_LINE(win32):       if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2 
    894896#CONDITIONED_LINE(libparrot_shared_alias):      ( cd @blib_dir@ ; ln -sf @libparrot_shared@ @libparrot_shared_alias@ ) 
     
    10201022        $(CUR_DIR)/examples/pasm/hello$(EXE) "from your friendly makefile" 
    10211023 
    10221024examples/pasm/hello.pbc: examples/pasm/hello.pasm 
    1023         $(PARROT) -o examples/pasm/hello.pbc examples/pasm/hello.pasm 
     1025        $(SHRPENV) $(PARROT) -o examples/pasm/hello.pbc examples/pasm/hello.pasm 
    10241026 
    10251027examples/pasm/hello$(O): examples/pasm/hello.pbc 
    1026         $(PARROT) -o examples/pasm/hello$(O) examples/pasm/hello.pbc 
     1028        $(SHRPENV) $(PARROT) -o examples/pasm/hello$(O) examples/pasm/hello.pbc 
    10271029 
    10281030examples/pasm/hello$(EXE): examples/pasm/hello$(O) 
    10291031        $(MAKE) . EXEC=examples/pasm/hello exec 
     
    15771579 
    15781580# Running a benchmark 
    15791581mopsbench : test_prep 
    1580         $(PARROT) examples/benchmarks/mops_intval.pasm 
     1582        $(SHRPENV) $(PARROT) examples/benchmarks/mops_intval.pasm 
    15811583 
    15821584# distro tests 
    15831585distro_tests : test_prep 
  • config/gen/makefiles/docs.in

    old new  
    77MKPATH = @mkpath@ 
    88CHMOD  = @chmod@ 
    99PERLDOC = @perldoc@ 
     10BUILD_DIR = @build_dir@ 
    1011 
    1112# long list of .pod files 
    1213POD = @pod@ 
     
    1617# 
    1718 
    1819# The default target 
    19 all: doc-prep packfile-c.pod $(POD) 
     20all: doc-prep packfile-c.pod $(POD) Makefile 
     21 
     22# regenerate the Makefile 
     23Makefile: $(BUILD_DIR)/config/gen/makefiles/docs.in 
     24        cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::makefiles --target=docs/Makefile 
    2025 
    2126# This is a listing of all targets, that are meant to be called by users 
    2227# Most of them are proxied in the root makefile parrot/Makefile 
  • config/gen/makefiles/bcg.in

    old new  
    1 RM_F                = @rm_f@ 
    2 PERL                = @perl@ 
     1RM_F            = @rm_f@ 
     2PERL            = @perl@ 
    33PARROT          = @build_dir@/parrot@exe@ 
    44#CONDITIONED_LINE(win32):LIBPARROT = @build_dir@/libparrot@a@ 
    55#INVERSE_CONDITIONED_LINE(win32):LIBPARROT = @build_dir@/@blib_dir@/libparrot@a@ 
    6 O                       = @o@ 
    7 LOAD_EXT            = @load_ext@ 
    8 CC                  = @cc@ 
    9 CC_INC              = @cc_inc@ -I@build_dir@/include 
    10 C_LIBS              = @libs@ 
    11 CC_SHARED           = @cc_shared@ 
    12 CFLAGS              = $(CC_INC) @ccflags@ @cc_debug@ @ccwarn@ @cc_hasjit@ @cg_flag@ @gc_flag@ $(CC_SHARED) 
     6O               = @o@ 
     7LOAD_EXT        = @load_ext@ 
     8CC              = @cc@ 
     9CC_INC          = @cc_inc@ -I@build_dir@/include 
     10C_LIBS          = @libs@ 
     11CC_SHARED       = @cc_shared@ 
     12CFLAGS          = $(CC_INC) @ccflags@ @cc_debug@ @ccwarn@ @cc_hasjit@ @cg_flag@ @gc_flag@ $(CC_SHARED) 
    1313LINK_DYNAMIC    = @link_dynamic@ 
    14 LINK                = @link@ 
    15 LINKFLAGS           = @linkflags@ @link_debug@ @ld_debug@ 
    16 LD                  = @ld@ 
    17 #CONDITIONED_LINE(win32):LDFLAGS = @ldflags@ @ld_debug@ $(LIBPARROT) 
    18 #INVERSE_CONDITIONED_LINE(win32):LDFLAGS = @ldflags@ @ld_debug@ -L@build_dir@/blib/lib/ -lparrot 
     14LINK            = @link@ 
     15LINKFLAGS       = @linkflags@ @link_debug@ @ld_debug@ 
     16LD              = @ld@ 
     17#CONDITIONED_LINE(win32):LDFLAGS         = @ldflags@ @ld_debug@ $(LIBPARROT) 
     18#INVERSE_CONDITIONED_LINE(win32):LDFLAGS         = @ldflags@ @ld_debug@ -L@build_dir@/blib/lib/ -lparrot 
    1919SHARE_EXT       = @share_ext@ 
    2020LD_SHARE_FLAGS  = @ld_share_flags@ 
    2121BUILD_PMC       = $(PERL) @build_dir@/tools/build/dynpmc.pl 
    22 SRC_PMC_DIR         = src/pmc 
     22SRC_PMC_DIR     = src/pmc 
    2323DEST_PMC_DIR    = @build_dir@/runtime/parrot/dynext 
    2424PMC_GROUP       = $(DEST_PMC_DIR)/bcg_group$(LOAD_EXT) 
    2525DYNPMC_INCLUDE  = @build_dir@/compilers/bcg/include,@build_dir@/compilers/bcg/include,@build_dir@/compilers/bcg/include 
     
    6161 $(SRC_PMC_DIR)/*$(LOAD_EXT) \ 
    6262 $(PMC_GROUP) 
    6363 
    64 all: pmcs 
    65  
     64all: pmcs Makefile 
    6665 
    6766# 
    6867# Build Targets 
     
    7372        $(LD) $(LD_SHARE_FLAGS) $(LDFLAGS) @ld_out@$@ $(BCG_O_FILES) @libs@ 
    7473    $(CP) @build_dir@/blib/lib/libbcg$(SHARE_EXT) @build_dir@ 
    7574 
    76          
    7775pmcs: $(LIB_BCG) 
    7876        @cd $(SRC_PMC_DIR) && $(BUILD_PMC) generate $(PMCS) 
    7977        @cd $(SRC_PMC_DIR) && DYNPMC_INCLUDE=$(DYNPMC_INCLUDE) $(BUILD_PMC) compile $(PMCS) 
     
    8179        @cd $(SRC_PMC_DIR) && $(BUILD_PMC) copy "--destination=$(DEST_PMC_DIR)" \ 
    8280                 $(PMCS) 
    8381 
     82# regenerate the Makefile 
     83Makefile: @build_dir@/config/gen/makefiles/docs.in 
     84        cd @build_dir@ && $(RECONFIGURE) --step=gen::makefiles --target=docs/Makefile 
    8485 
    8586# 
    8687# Test Targets 
     
    103104realclean: clean 
    104105 
    105106distclean: realclean 
     107 
     108# 
     109# Local variables: 
     110# mode: makefile 
     111# ex: ft=make 
     112# End: 
  • config/inter/libparrot.pm

    old new  
    9393        ); 
    9494    } 
    9595 
     96    # RT#39742 installed parrot conflicts with dev parrot: 
     97    # move -L/usr/lib in ldflags to the back after -lparrot 
     98    # but better link directly to the file. 
     99    if ($parrot_is_shared and $conf->data->get('ldflags') =~ /(-L\S+)/) { 
     100       my $ldflags = $conf->data->get('ldflags'); 
     101       my $lpath = $1; 
     102       $ldflags =~ s|$1||; 
     103       $conf->data->set('libs' => $lpath . " " . $conf->data->get('libs')); 
     104       $conf->data->set('ldflags' => $ldflags); 
     105    } 
     106 
    96107    $self->set_result( $parrot_is_shared ? 'yes' : 'no' ); 
    97108 
    98109    return 1; 
  • config/gen/makefiles/dynoplibs.in

    old new  
    1 # $Id: dynoplibs.in 19913 2007-07-16 20:30:04Z particle $ 
     1# $Id: dynoplibs.in 31315 2008-09-21 14:25:18Z rurban $ 
    22 
    3 PERL = @perl@ 
    4 RM_F = @rm_f@ 
    5 LOAD_EXT = @load_ext@ 
     3PERL        = @perl@ 
     4RM_F        = @rm_f@ 
     5LOAD_EXT    = @load_ext@ 
    66RUNTIME_DIR = @build_dir@/runtime/parrot/dynext 
    7 O = @o@ 
     7O           = @o@ 
    88 
    99# add your dynamic op libraries here 
    1010# 
     
    3232# win32 exported functions and data items 
    3333# win32 export definition files 
    3434dynext-clean : 
    35         $(RM_F) "*.lib" "*.pdb" "*.ilk" "*.exp" "*.def" "*.manifest" 
     35#IF(win32):     $(RM_F) "*.lib" "*.pdb" "*.ilk" "*.exp" "*.def" "*.manifest" 
    3636 
    3737clean : testclean dynext-clean 
    3838        $(RM_F) "*.h" "*.c" "*$(LOAD_EXT)" "*$(O)" 
     
    4646distclean: realclean 
    4747 
    4848svnclean: realclean 
     49 
     50# 
     51# Local variables: 
     52# mode: makefile 
     53# ex: ft=make 
     54# End: 
  • config/gen/makefiles/dynoplibs_pl.in

    old new  
    4646} 
    4747 
    4848# OPS2C Config 
    49 our $OPS2C = "$PERL -I $PATHQUOTE" .  
     49our $OPS2C = "$PERL -I $PATHQUOTE" . 
    5050             q[@build_dir@@slash@lib] . 
    5151             "$PATHQUOTE $PATHQUOTE" . 
    5252             q[@build_dir@@slash@tools@slash@build@slash@ops2c.pl] . 
     
    7373 
    7474sub partial_link_cmd { 
    7575    my ($target, $libs, $sources) = @_; 
    76      
     76 
    7777    my $liblist; 
    7878    if ($^O =~ /mswin32/i) { 
    7979        # Need to put various libraries in the link line. 
     
    9393        "$LD ". 
    9494        "@ld_out@" . $target . " " . 
    9595        join(" ", map {"$PATHQUOTE$_$PATHQUOTE"} @$sources) . 
    96         " $liblist $LDFLAGS $LD_LOAD_FLAGS $PATHQUOTE$LIBPARROT$PATHQUOTE"; 
     96        " $LDFLAGS $LD_LOAD_FLAGS $PATHQUOTE$LIBPARROT$PATHQUOTE $liblist"; 
    9797} 
    9898 
    9999our $NOW = time(); 
  • config/init/hints/cygwin.pm

    old new  
    1717    my $build_dir = $conf->data->get('build_dir'); 
    1818    $build_dir =~ s/ /\\ /g; 
    1919 
    20     # A note about building shared libraries:  Perl5 uses the 'ld2' tool, which 
    21     # is installed as part of the perl5 installation.  So far, it appears 
    22     # parrot can get by with simply using gcc -shared, so we override the 
    23     # perl5 Configure defaults and use 'gcc -shared' instead of 'ld2'. 
    24     # If this later causes problems, it might be worth revisiting. 
    25     # A. Dougherty 9/9/2002 
     20    # A note about building shared libraries: Perl5 used the 'ld2' tool until 
     21    # 5.8.8-4, which is installed as part of the perl5 installation. So far, it 
     22    # appears parrot can get by with simply using gcc -shared, so we override 
     23    # the perl5 Configure defaults and use 'gcc -shared' instead of 'ld2'.  If 
     24    # this later causes problems, it might be worth revisiting.  A. Dougherty 
     25    # 9/9/2002 
     26    # This can be checked with Config{ld} containing ld2 or g++|gcc 
    2627    $conf->data->set( 
    2728        build_dir           => $build_dir, 
    28         ld                  => 'gcc', 
     29        ld                  => $conf->data->get('ld') eq 'ld2' 
     30                               ? 'gcc' 
     31                               : $conf->data->get('ld'), 
    2932        ld_share_flags      => '-shared', 
    3033        ld_load_flags       => '-shared', 
    3134        libs                => $libs, 
     
    3538        sym_export          => '__declspec(dllexport)', 
    3639        sym_import          => '__declspec(dllimport)', 
    3740        cygchkdll           => 'tools/build/cygchkdll.sh $(MINIPARROT) $(LIBPARROT)', 
     41        libparrot_ldflags   => $conf->data->get('build_dir') . '/libparrot.dll.a', 
    3842    ); 
    3943 
    4044    # inet_aton needs to be defined on Cygwin. 
  • config/init/hints/msys.pm

    old new  
    11# Copyright (C) 2005-2007, The Perl Foundation. 
    2 # $Id: msys.pm 18563 2007-05-16 00:53:55Z chromatic $ 
     2# $Id$ 
    33 
    44package init::hints::msys; 
    55