X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=cygwin%2FMakefile.SHs;h=0a5a408f79d80d031d64673837397a96b4a4d6e8;hb=561acf652e2c3e82e74118f0790fcb3211e65ad3;hp=e4beabecba1329733f3c79b05ea42f76fa3f0f5a;hpb=8babd21611073cf7ab71cbfaf139d06738ff3f27;p=p5sagit%2Fp5-mst-13.2.git diff --git a/cygwin/Makefile.SHs b/cygwin/Makefile.SHs index e4beabe..0a5a408 100644 --- a/cygwin/Makefile.SHs +++ b/cygwin/Makefile.SHs @@ -25,20 +25,20 @@ esac addtopath=`pwd` $spitshell >>Makefile <ld2 + @$sed s,@buildpath@,$addtopath,g <${src}/cygwin/ld2.in >ld2 @echo "installing ld2 into $installbin" # install is included in Cygwin distributions, and we make a note of th -# requirement in the README.cygwin32 file. However, let's give them +# requirement in the README.cygwin file. However, let's give them # a warning. - @if test -n "`type $1 2>&1 | sed -n -e '/'$1'$/p'`" ; then \ - install -c -m 755 ld2 ${installbin}/ld2 ; \ - else \ + @install -c -m 755 ld2 ${installbin}/ld2 + @if test ! -f ${installbin}/ld2; then \ echo "*************************************************" ; \ - echo "Oh, no! You didn't read the README.cygwin32" ; \ - echo "file, which stated that \"install\" was required." ; \ echo "Make will probably fail in a few more steps." ; \ echo "When it does, copy \"ld2\" to a directory in" ; \ echo "your path, other than \".\"." ; \ @@ -67,14 +67,14 @@ EXPORT_ALL = 1 DEF_EXT = .def EXP_EXT = .exp -perlld: $& Makefile ${src}/cygwin32/perlld.in +perlld: $& Makefile ${src}/cygwin/perlld.in @echo "extracting perlld (with variable substitutions)" @$sed -e s,@CC@,\${CC}, -e s,@DLLWRAP@,\${DLLWRAP},g \\ -e s,@WRAPDRIVER@,\${WRAPDRIVER},g -e s,@DLLTOOL@,\${DLLTOOL},g \\ -e s,@AS@,\${AS},g -e s,@EXPORT_ALL@,\${EXPORT_ALL},g \\ -e s,@DEF_EXT@,\${DEF_EXT},g -e s,@EXP_EXT@,\${EXP_EXT},g \\ -e s,@LIB_EXT@,\${LIB_EXT},g \\ - ${src}/cygwin32/perlld.in >perlld + ${src}/cygwin/perlld.in >perlld !GROK!THIS! @@ -124,14 +124,15 @@ $(LIBPERL)$(LIB_EXT): $& perl$(OBJ_EXT) $(cwobj) ld2 # build problems but that's not obvious to the novice. # The Module used here must not depend on Config or any extensions. -miniperl: $& miniperlmain$(OBJ_EXT) $(LIBPERL)s$(LIB_EXT) - $(LDLIBPTH) $(CC) $(LARGE) $(CLDFLAGS) -o miniperl miniperlmain$(OBJ_EXT) $(LLIBPERL)s $(libs) - $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e 0 || $(MAKE) minitest +miniperl: $& miniperlmain$(OBJ_EXT) $(LIBPERL)s$(LIB_EXT) opmini$(OBJ_EXT) + $(LDLIBPTH) $(CC) $(CLDFLAGS) -o miniperl miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) $(LLIBPERL)s $(libs) + $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '' || $(MAKE) minitest !NO!SUBS! ;; *) $spitshell >>Makefile <<'!NO!SUBS!' +cwobj = $(obj) # perl library $(LIBPERL)$(LIB_EXT): $& perl$(OBJ_EXT) $(cwobj) @@ -145,9 +146,9 @@ $(LIBPERL)$(LIB_EXT): $& perl$(OBJ_EXT) $(cwobj) # build problems but that's not obvious to the novice. # The Module used here must not depend on Config or any extensions. -miniperl: $& miniperlmain$(OBJ_EXT) $(LIBPERL)$(LIB_EXT) - $(LDLIBPTH) $(CC) $(LARGE) $(CLDFLAGS) -o miniperl miniperlmain$(OBJ_EXT) $(LLIBPERL) $(libs) - $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e 0 || $(MAKE) minitest +miniperl: $& miniperlmain$(OBJ_EXT) $(LIBPERL)$(LIB_EXT) opmini$(OBJ_EXT) + $(LDLIBPTH) $(CC) $(CLDFLAGS) -o miniperl miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) $(LLIBPERL) $(libs) + $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e '' || $(MAKE) minitest !NO!SUBS! ;; @@ -156,19 +157,24 @@ esac # libperl.a is _the_ library both in dll and static cases # $(LIBPERL)$(LIB_EXT) expands to this name dependless of build model # +# NOTE: The "-Wl,-Bstatic $(LLIBPERL) -Wl,-Bdynamic" is required to give +# the import library linking priority over the dynamic library, since both +# the .dll and .a are in the same directory. When the new standard for +# naming import/dynamic/static libraries emerges this should be updated. +# $spitshell >>Makefile <<'!NO!SUBS!' perl: $& perlmain$(OBJ_EXT) $(LIBPERL)$(LIB_EXT) $(DYNALOADER) $(static_ext) ext.libs - $(SHRPENV) $(LDLIBPTH) $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o perl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) + $(SHRPENV) $(LDLIBPTH) $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o perl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) -Wl,-Bstatic $(LLIBPERL) -Wl,-Bdynamic `cat ext.libs` $(libs) pureperl: $& perlmain$(OBJ_EXT) $(LIBPERL)$(LIB_EXT) $(DYNALOADER) $(static_ext) ext.libs - $(SHRPENV) $(LDLIBPTH) purify $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o pureperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) + $(SHRPENV) $(LDLIBPTH) purify $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o pureperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) purecovperl: $& perlmain$(OBJ_EXT) $(LIBPERL)$(LIB_EXT) $(DYNALOADER) $(static_ext) ext.libs - $(SHRPENV) $(LDLIBPTH) purecov $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o purecovperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) + $(SHRPENV) $(LDLIBPTH) purecov $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o purecovperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) quantperl: $& perlmain$(OBJ_EXT) $(LIBPERL)$(LIB_EXT) $(DYNALOADER) $(static_ext) ext.libs - $(SHRPENV) $(LDLIBPTH) quantify $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o quantperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) + $(SHRPENV) $(LDLIBPTH) quantify $(CC) $(CLDFLAGS) $(CCDLFLAGS) -o quantperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) !NO!SUBS!