Ticket #30: 39742-installed-conflict.patch
File 39742-installed-conflict.patch, 28.0 KB (added by rurban, 13 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 81 81 82 82 my $liblist; 83 83 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 ); 86 93 if ($CC =~ /gcc/i) { 87 94 $liblist =~ s/libgdbm\.lib/-llibgdbm/i; 88 95 } … … 90 97 $extraLibs =~ s/blib/..\\blib/g; 91 98 $extraLibs =~ s/\Q$(A)\E/.lib/g; 92 99 $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 }101 100 } 102 101 else { 103 102 $liblist = join( ' ', map { "-l$_" } keys %$libs ); … … 109 108 push @$sources, split ",", $ENV{DYNPMC_LINK}; 110 109 } 111 110 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. 112 114 return 113 115 "$LD ". 114 116 '@ld_out@' . $target . " " . 115 117 join(" ", map {"$PATHQUOTE$_$PATHQUOTE"} @$sources) . 116 " $ liblist $LDFLAGS $LD_LOAD_FLAGS $PATHQUOTE$LIBPARROT$PATHQUOTE";118 " $LDFLAGS $LD_LOAD_FLAGS $PATHQUOTE$LIBPARROT$PATHQUOTE $liblist"; 117 119 } 118 120 119 121 our $NOW = time(); -
config/gen/makefiles/dynpmc.in
old new 72 72 distclean: realclean 73 73 74 74 svnclean: realclean 75 76 # 77 # Local variables: 78 # mode: makefile 79 # ex: ft=make 80 # End: -
config/gen/makefiles/nqp.in
old new 4 4 PERL = @perl@ 5 5 RM_F = @rm_f@ 6 6 PARROT = ../../parrot@exe@ 7 RECONFIGURE = $(PERL) @build_dir@/tools/dev/reconfigure.pl 8 9 7 10 8 11 PARROT_LIBRARY = @build_dir@/runtime/parrot/library 9 12 PGE_LIBRARY = @build_dir@/runtime/parrot/library/PGE … … 26 29 27 30 boot: $(BOOTSRC) 28 31 $(PARROT) nqp.pbc \ 29 --output=bootstrap/gen_actions.pir \30 --target=pir \31 bootstrap/actions.pm32 --output=bootstrap/gen_actions.pir \ 33 --target=pir \ 34 bootstrap/actions.pm 32 35 $(PARROT) --output-pbc -o bootstrap/nqp.pbc bootstrap/nqp.pir 33 36 37 # regenerate the Makefile 38 Makefile: @build_dir@/config/gen/makefiles/nqp.in 39 cd @build_dir@ && $(RECONFIGURE) --step=gen::makefiles --target=compilers/nqp/Makefile 40 34 41 # This is a listing of all targets, that are meant to be called by users 35 42 help: 36 43 @echo "" … … 71 78 $(RM_F) Makefile 72 79 73 80 distclean: 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 -*- 2 2 # $Id: parrot_embed.in 17688 2007-03-22 08:48:04Z fperrad $ 3 3 # 4 4 use Cwd; … … 43 43 44 44 sub postamble 45 45 { 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"; 47 49 } 48 50 49 51 sub test … … 64 66 $inherited =~ s{($sub_target)}{$1 t/greet.pbc}; 65 67 $inherited; 66 68 } 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 9 9 PGE_DIR = ../../compilers/pge 10 10 TEST_DIR = ../../t/compilers/pct 11 11 CP = @cp@ 12 RECONFIGURE = $(PERL) @build_dir@/tools/dev/reconfigure.pl 13 14 12 15 13 16 # Where to put things 14 17 PARROT_LIBRARY = ../../runtime/parrot/library … … 30 33 src/POST/Node.pir 31 34 32 35 # the default target 33 all: $(PARROT_LIBRARY)/PCT.pbc 36 all: $(PARROT_LIBRARY)/PCT.pbc Makefile 34 37 35 38 $(PARROT_LIBRARY)/PCT.pbc: $(PARROT) $(PCT_SOURCES) 36 39 $(PARROT) -o $(PARROT_LIBRARY)/PCT.pbc --output-pbc PCT.pir … … 38 41 $(PARROT) -o $(PARROT_LIBRARY)/PCT/Grammar.pbc --output-pbc src/PCT/Grammar.pir 39 42 $(PARROT) -o $(PARROT_LIBRARY)/PCT/HLLCompiler.pbc --output-pbc src/PCT/HLLCompiler.pir 40 43 44 # regenerate the Makefile 45 Makefile: @build_dir@/config/gen/makefiles/pct.in 46 cd @build_dir@ && $(RECONFIGURE) --step=gen::makefiles --target=compilers/pct/Makefile 47 41 48 # This is a listing of all targets, that are meant to be called by users 42 49 help: 43 50 @echo "" … … 72 79 $(RM_F) Makefile 73 80 74 81 distclean: realclean 82 83 # 84 # Local variables: 85 # mode: makefile 86 # ex: ft=make 87 # End: -
config/gen/makefiles/pge.in
old new 7 7 PARROT = ../../parrot@exe@ 8 8 TOOL_DIR = ../.. 9 9 CP = @cp@ 10 RECONFIGURE = $(PERL) @build_dir@/tools/dev/reconfigure.pl 11 12 10 13 11 14 # Where to put things 12 15 PARROT_LIBRARY = ../../runtime/parrot/library 13 16 14 17 # the default target 15 all: $(PARROT_LIBRARY)/PGE.pbc 18 all: $(PARROT_LIBRARY)/PGE.pbc Makefile 16 19 17 20 SOURCES = PGE.pir \ 18 21 PGE/Exp.pir \ … … 30 33 $(RM_F) PGE.pbc $(PARROT_LIBRARY)/PGE.pbc 31 34 $(PERL) -e "" >PGE/builtins_gen.pir 32 35 $(PARROT) -o PGE.pbc --output-pbc PGE.pir 33 $(PARROT) $(PARROT_LIBRARY)/PGE/Perl6Grammar.pir 36 $(PARROT) $(PARROT_LIBRARY)/PGE/Perl6Grammar.pir --output=PGE/builtins_gen.pir PGE/builtins.pg 34 37 $(RM_F) PGE.pbc 35 38 $(PARROT) -o PGE.pbc --output-pbc PGE.pir 36 39 40 # regenerate the Makefile 41 Makefile: @build_dir@/config/gen/makefiles/pge.in 42 cd @build_dir@ && $(RECONFIGURE) --step=gen::makefiles --target=compilers/pge/Makefile 43 37 44 # This is a listing of all targets, that are meant to be called by users 38 45 help: 39 46 @echo "" … … 75 82 $(RM_F) Makefile 76 83 77 84 distclean: realclean 85 86 # 87 # Local variables: 88 # mode: makefile 89 # ex: ft=make 90 # End: -
config/gen/makefiles/pirc.in
old new 8 8 TOOL_DIR = ../.. 9 9 CC = @cc@ 10 10 CP = @cp@ 11 POD2HTML = pod2html 12 PODCHECKER = podchecker 11 13 BUILD = $(PERL) @build_dir@/tools/build/dynpmc.pl 12 14 O = @o@ 13 15 EXE = @exe@ … … 54 56 55 57 56 58 # the default target 57 all: pirc$(EXE) 59 all: pirc$(EXE) heredoc macro Makefile 58 60 59 61 60 62 pirc$(EXE): $(OBJS) … … 95 97 doc/*.html 96 98 97 99 distclean: realclean 100 101 # 102 # Local variables: 103 # mode: makefile 104 # ex: ft=make 105 # End: -
config/gen/makefiles/tge.in
old new 6 6 PERL = @perl@ 7 7 RM_F = @rm_f@ 8 8 PARROT = ../../parrot@exe@ 9 RECONFIGURE = $(PERL) @build_dir@/tools/dev/reconfigure.pl 10 11 9 12 10 13 # Where to put things 11 14 PARROT_LIBRARY = ../../runtime/parrot/library 12 15 PERL6GRAMMAR = $(PARROT_LIBRARY)/PGE/Perl6Grammar.pbc 13 16 14 17 # the default target 15 all: $(PARROT_LIBRARY)/TGE.pbc 18 all: $(PARROT_LIBRARY)/TGE.pbc Makefile 16 19 17 20 $(PARROT_LIBRARY)/TGE.pbc: TGE.pir TGE/Rule.pbc TGE/Parser.pbc TGE/Grammar.pbc TGE/Compiler.pbc TGE/Tree.pbc 18 21 $(PARROT) -o $(PARROT_LIBRARY)/TGE.pbc --output-pbc TGE.pir … … 21 24 $(PARROT) -o $@ --output-pbc $< 22 25 23 26 TGE/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 30 Makefile: @build_dir@/config/gen/makefiles/tge.in 31 cd @build_dir@ && $(RECONFIGURE) --step=gen::makefiles --target=compilers/tge/Makefile 25 32 26 33 # This is a listing of all targets, that are meant to be called by users 27 34 help: … … 62 69 $(RM_F) Makefile 63 70 64 71 distclean: realclean 72 73 # 74 # Local variables: 75 # mode: makefile 76 # ex: ft=make 77 # End: -
config/gen/makefiles/editor.in
old new 11 11 CP = @cp@ 12 12 MKPATH = @mkpath@ 13 13 RM_F = @rm_f@ 14 RECONFIGURE = $(PERL) @build_dir@/tools/dev/reconfigure.pl 14 15 15 16 default: all 16 17 17 all: pir.vim imc.kate 18 all: pir.vim imc.kate Makefile 19 20 # regenerate the Makefile 21 Makefile: @build_dir@/config/gen/makefiles/editor.in 22 cd @build_dir@ && $(RECONFIGURE) --step=gen::makefiles --target=editor/Makefile 18 23 19 24 # This is a listing of all targets, that are meant to be called by users 20 25 help : … … 66 71 67 72 realclean: clean 68 73 $(RM_F) Makefile 74 75 # 76 # Local variables: 77 # mode: makefile 78 # ex: ft=make 79 # End: -
config/gen/makefiles/ext.in
old new 28 28 @echo " This is the default." 29 29 @echo " test: Unified test suite for a lot of languages." 30 30 @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 "" 31 37 @echo " clean: Clean up a lot of languages." 38 @echo " realclean: Clean up and remove Makefiles." 32 39 @echo "" 33 40 @echo " help: Print this help message." 34 41 @echo "" … … 40 47 @echo "" 41 48 @echo "Following languages are available:" 42 49 @echo " $(LANGUAGES)" 43 @echo "A particular language <lang> can be built, tested and cleand up"44 50 @echo " make <lang>" 45 51 @echo " make <lang>.test" 52 @echo " make <lang>.installable" 53 @echo " make <lang>.test-installable" 54 @echo " make <lang>.install" 46 55 @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" 48 58 @echo "" 49 59 50 60 clean: \ … … 66 76 #CONDITIONED_LINE(win32): - cd Parrot-Embed && nmake clean 67 77 #INVERSE_CONDITIONED_LINE(win32): - cd Parrot-Embed && $(MAKE) clean 68 78 79 # 80 # Local variables: 81 # mode: makefile 82 # ex: ft=make 83 # End: -
config/gen/makefiles/json.in
old new 3 3 PERL = @perl@ 4 4 RM_F = @rm_f@ 5 5 PARROT = ../../parrot@exe@ 6 RECONFIGURE = $(PERL) @build_dir@/tools/dev/reconfigure.pl 7 8 6 9 7 10 TOOL_DIR = ../.. 8 11 PGE_DIR = ../../compilers/pge 9 12 TGE_DIR = ../../compilers/tge 10 13 11 14 # the default target 12 all: JSON.pbc 15 all: JSON.pbc Makefile 16 17 # regenerate the Makefile 18 Makefile: @build_dir@/config/gen/makefiles/json.in 19 cd @build_dir@ && $(RECONFIGURE) --step=gen::makefiles --target=compilers/json/Makefile 13 20 14 21 # This is a listing of all targets, that are meant to be called by users 15 22 help: … … 52 59 53 60 clean : testclean 54 61 @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 106 106 INNO_SETUP = iscc 107 107 JIT_BUILD_TOOL = $(BUILD_TOOLS_DIR)/jit2c.pl 108 108 #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" 109 111 110 112 ############################################################################### 111 113 # … … 534 536 # here, though. Ignored on Mac OS X, at least. 535 537 536 538 .pir.pbc : 537 $( PARROT) -o $@ $<539 $(SHRPENV) $(PARROT) -o $@ $< 538 540 539 541 .pbc$(O) : 540 $( PARROT) -o $@ $<542 $(SHRPENV) $(PARROT) -o $@ $< 541 543 542 544 543 545 ############################################################################### … … 768 770 @$(PERL) tools/dev/cc_flags.pl $(CUR_DIR)/CFLAGS echo $(CC) $(CFLAGS) -I$(@D) @cc_o_out@ xx$(O) -c xx.c 769 771 770 772 runtime/parrot/include/parrotlib.pbc: runtime/parrot/library/parrotlib.pir $(PARROT) 771 $( PARROT) -o $@ runtime/parrot/library/parrotlib.pir773 $(SHRPENV) $(PARROT) -o $@ runtime/parrot/library/parrotlib.pir 772 774 773 775 runtime/parrot/include/config.fpmc : myconfig config_lib.pasm $(MINIPARROT) 774 776 #CONDITIONED_LINE(cygchkdll): $(SHRPENV) @cygchkdll@ 775 777 @echo Invoking Parrot to generate runtime/parrot/include/config.fpmc --cross your fingers 776 $( MINIPARROT) config_lib.pasm > $@778 $(SHRPENV) $(MINIPARROT) config_lib.pasm > $@ 777 779 778 780 $(PARROT) : $(SRC_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) CFLAGS \ 779 781 lib/Parrot/OpLib/core.pm $(SRC_DIR)/parrot_config$(O) \ … … 788 790 > pbc_to_exe.pir 789 791 790 792 $(PBC_TO_EXE) : pbc_to_exe.pir $(PARROT) 791 $( PARROT) -o pbc_to_exe.pbc pbc_to_exe.pir792 $( PARROT) pbc_to_exe.pir pbc_to_exe.pbc793 $(SHRPENV) $(PARROT) -o pbc_to_exe.pbc pbc_to_exe.pir 794 $(SHRPENV) $(PARROT) pbc_to_exe.pir pbc_to_exe.pbc 793 795 794 796 $(PARROT_CONFIG) : tools/util/parrot-config.pir $(PARROT) $(PBC_TO_EXE) 795 $( PARROT) -o parrot_config.pbc tools/util/parrot-config.pir796 $( PARROT) pbc_to_exe.pbc parrot_config.pbc797 $(SHRPENV) $(PARROT) -o parrot_config.pbc tools/util/parrot-config.pir 798 $(SHRPENV) $(PARROT) pbc_to_exe.pbc parrot_config.pbc 797 799 798 800 # HLL Executable targets 799 801 #CONDITIONED_LINE(win32):perl6 : $(PERL6) … … 802 804 $(MAKE) languages/perl6 perl6$(EXE) 803 805 $(CP) languages/perl6/perl6$(EXE) $(PERL6) 804 806 $(CHMOD) 0755 $(PERL6) 805 $( PERL6) -e"say 'Hello, world.'"807 $(SHRPENV) $(PERL6) -e"say 'Hello, world.'" 806 808 807 809 808 810 # TODO build the real miniparrot … … 814 816 815 817 $(INSTALLABLEPARROT) : $(SRC_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \ 816 818 lib/Parrot/OpLib/core.pm $(SRC_DIR)/install_config$(O) \ 817 $( PARROT)819 $(SHRPENV) $(PARROT) 818 820 $(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) 821 823 #CONDITIONED_LINE(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1 822 824 823 825 $(INC_DIR)/parrot.h : $(INC_DIR)/pbcversion.h $(INC_DIR)/vtable.h … … 843 845 844 846 install_config.fpmc : myconfig config_lib.pasm $(PARROT) 845 847 @echo "Invoking Parrot to generate install_config.fpmc" 846 $( PARROT) config_lib.pasm --install > $@848 $(SHRPENV) $(PARROT) config_lib.pasm --install > $@ 847 849 848 850 $(SRC_DIR)/parrot_config$(O) : $(SRC_DIR)/parrot_config.c 849 851 … … 888 890 $(LIBPARROT_SHARED) : $(O_FILES) 889 891 $(MKPATH) @blib_dir@ 890 892 $(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 \ 892 894 $(O_FILES) $(C_LIBS) $(ICU_SHARED) 893 895 #CONDITIONED_LINE(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2 894 896 #CONDITIONED_LINE(libparrot_shared_alias): ( cd @blib_dir@ ; ln -sf @libparrot_shared@ @libparrot_shared_alias@ ) … … 1020 1022 $(CUR_DIR)/examples/pasm/hello$(EXE) "from your friendly makefile" 1021 1023 1022 1024 examples/pasm/hello.pbc: examples/pasm/hello.pasm 1023 $( PARROT) -o examples/pasm/hello.pbc examples/pasm/hello.pasm1025 $(SHRPENV) $(PARROT) -o examples/pasm/hello.pbc examples/pasm/hello.pasm 1024 1026 1025 1027 examples/pasm/hello$(O): examples/pasm/hello.pbc 1026 $( PARROT) -o examples/pasm/hello$(O) examples/pasm/hello.pbc1028 $(SHRPENV) $(PARROT) -o examples/pasm/hello$(O) examples/pasm/hello.pbc 1027 1029 1028 1030 examples/pasm/hello$(EXE): examples/pasm/hello$(O) 1029 1031 $(MAKE) . EXEC=examples/pasm/hello exec … … 1577 1579 1578 1580 # Running a benchmark 1579 1581 mopsbench : test_prep 1580 $( PARROT) examples/benchmarks/mops_intval.pasm1582 $(SHRPENV) $(PARROT) examples/benchmarks/mops_intval.pasm 1581 1583 1582 1584 # distro tests 1583 1585 distro_tests : test_prep -
config/gen/makefiles/docs.in
old new 7 7 MKPATH = @mkpath@ 8 8 CHMOD = @chmod@ 9 9 PERLDOC = @perldoc@ 10 BUILD_DIR = @build_dir@ 10 11 11 12 # long list of .pod files 12 13 POD = @pod@ … … 16 17 # 17 18 18 19 # The default target 19 all: doc-prep packfile-c.pod $(POD) 20 all: doc-prep packfile-c.pod $(POD) Makefile 21 22 # regenerate the Makefile 23 Makefile: $(BUILD_DIR)/config/gen/makefiles/docs.in 24 cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::makefiles --target=docs/Makefile 20 25 21 26 # This is a listing of all targets, that are meant to be called by users 22 27 # Most of them are proxied in the root makefile parrot/Makefile -
config/gen/makefiles/bcg.in
old new 1 RM_F 2 PERL 1 RM_F = @rm_f@ 2 PERL = @perl@ 3 3 PARROT = @build_dir@/parrot@exe@ 4 4 #CONDITIONED_LINE(win32):LIBPARROT = @build_dir@/libparrot@a@ 5 5 #INVERSE_CONDITIONED_LINE(win32):LIBPARROT = @build_dir@/@blib_dir@/libparrot@a@ 6 O 7 LOAD_EXT 8 CC 9 CC_INC 10 C_LIBS 11 CC_SHARED 12 CFLAGS 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) 13 13 LINK_DYNAMIC = @link_dynamic@ 14 LINK 15 LINKFLAGS 16 LD 17 #CONDITIONED_LINE(win32):LDFLAGS = @ldflags@ @ld_debug@ $(LIBPARROT)18 #INVERSE_CONDITIONED_LINE(win32):LDFLAGS = @ldflags@ @ld_debug@ -L@build_dir@/blib/lib/ -lparrot14 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 19 19 SHARE_EXT = @share_ext@ 20 20 LD_SHARE_FLAGS = @ld_share_flags@ 21 21 BUILD_PMC = $(PERL) @build_dir@/tools/build/dynpmc.pl 22 SRC_PMC_DIR 22 SRC_PMC_DIR = src/pmc 23 23 DEST_PMC_DIR = @build_dir@/runtime/parrot/dynext 24 24 PMC_GROUP = $(DEST_PMC_DIR)/bcg_group$(LOAD_EXT) 25 25 DYNPMC_INCLUDE = @build_dir@/compilers/bcg/include,@build_dir@/compilers/bcg/include,@build_dir@/compilers/bcg/include … … 61 61 $(SRC_PMC_DIR)/*$(LOAD_EXT) \ 62 62 $(PMC_GROUP) 63 63 64 all: pmcs 65 64 all: pmcs Makefile 66 65 67 66 # 68 67 # Build Targets … … 73 72 $(LD) $(LD_SHARE_FLAGS) $(LDFLAGS) @ld_out@$@ $(BCG_O_FILES) @libs@ 74 73 $(CP) @build_dir@/blib/lib/libbcg$(SHARE_EXT) @build_dir@ 75 74 76 77 75 pmcs: $(LIB_BCG) 78 76 @cd $(SRC_PMC_DIR) && $(BUILD_PMC) generate $(PMCS) 79 77 @cd $(SRC_PMC_DIR) && DYNPMC_INCLUDE=$(DYNPMC_INCLUDE) $(BUILD_PMC) compile $(PMCS) … … 81 79 @cd $(SRC_PMC_DIR) && $(BUILD_PMC) copy "--destination=$(DEST_PMC_DIR)" \ 82 80 $(PMCS) 83 81 82 # regenerate the Makefile 83 Makefile: @build_dir@/config/gen/makefiles/docs.in 84 cd @build_dir@ && $(RECONFIGURE) --step=gen::makefiles --target=docs/Makefile 84 85 85 86 # 86 87 # Test Targets … … 103 104 realclean: clean 104 105 105 106 distclean: realclean 107 108 # 109 # Local variables: 110 # mode: makefile 111 # ex: ft=make 112 # End: -
config/inter/libparrot.pm
old new 93 93 ); 94 94 } 95 95 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 96 107 $self->set_result( $parrot_is_shared ? 'yes' : 'no' ); 97 108 98 109 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 $ 2 2 3 PERL = @perl@4 RM_F = @rm_f@5 LOAD_EXT = @load_ext@3 PERL = @perl@ 4 RM_F = @rm_f@ 5 LOAD_EXT = @load_ext@ 6 6 RUNTIME_DIR = @build_dir@/runtime/parrot/dynext 7 O = @o@7 O = @o@ 8 8 9 9 # add your dynamic op libraries here 10 10 # … … 32 32 # win32 exported functions and data items 33 33 # win32 export definition files 34 34 dynext-clean : 35 $(RM_F) "*.lib" "*.pdb" "*.ilk" "*.exp" "*.def" "*.manifest"35 #IF(win32): $(RM_F) "*.lib" "*.pdb" "*.ilk" "*.exp" "*.def" "*.manifest" 36 36 37 37 clean : testclean dynext-clean 38 38 $(RM_F) "*.h" "*.c" "*$(LOAD_EXT)" "*$(O)" … … 46 46 distclean: realclean 47 47 48 48 svnclean: realclean 49 50 # 51 # Local variables: 52 # mode: makefile 53 # ex: ft=make 54 # End: -
config/gen/makefiles/dynoplibs_pl.in
old new 46 46 } 47 47 48 48 # OPS2C Config 49 our $OPS2C = "$PERL -I $PATHQUOTE" . 49 our $OPS2C = "$PERL -I $PATHQUOTE" . 50 50 q[@build_dir@@slash@lib] . 51 51 "$PATHQUOTE $PATHQUOTE" . 52 52 q[@build_dir@@slash@tools@slash@build@slash@ops2c.pl] . … … 73 73 74 74 sub partial_link_cmd { 75 75 my ($target, $libs, $sources) = @_; 76 76 77 77 my $liblist; 78 78 if ($^O =~ /mswin32/i) { 79 79 # Need to put various libraries in the link line. … … 93 93 "$LD ". 94 94 "@ld_out@" . $target . " " . 95 95 join(" ", map {"$PATHQUOTE$_$PATHQUOTE"} @$sources) . 96 " $ liblist $LDFLAGS $LD_LOAD_FLAGS $PATHQUOTE$LIBPARROT$PATHQUOTE";96 " $LDFLAGS $LD_LOAD_FLAGS $PATHQUOTE$LIBPARROT$PATHQUOTE $liblist"; 97 97 } 98 98 99 99 our $NOW = time(); -
config/init/hints/cygwin.pm
old new 17 17 my $build_dir = $conf->data->get('build_dir'); 18 18 $build_dir =~ s/ /\\ /g; 19 19 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 26 27 $conf->data->set( 27 28 build_dir => $build_dir, 28 ld => 'gcc', 29 ld => $conf->data->get('ld') eq 'ld2' 30 ? 'gcc' 31 : $conf->data->get('ld'), 29 32 ld_share_flags => '-shared', 30 33 ld_load_flags => '-shared', 31 34 libs => $libs, … … 35 38 sym_export => '__declspec(dllexport)', 36 39 sym_import => '__declspec(dllimport)', 37 40 cygchkdll => 'tools/build/cygchkdll.sh $(MINIPARROT) $(LIBPARROT)', 41 libparrot_ldflags => $conf->data->get('build_dir') . '/libparrot.dll.a', 38 42 ); 39 43 40 44 # inet_aton needs to be defined on Cygwin. -
config/init/hints/msys.pm
old new 1 1 # Copyright (C) 2005-2007, The Perl Foundation. 2 # $Id : msys.pm 18563 2007-05-16 00:53:55Z chromatic$2 # $Id$ 3 3 4 4 package init::hints::msys; 5 5