#58 Patch for 2.0.0 Makefile on Solaris

closed-duplicate
5
2001-10-08
2001-09-13
No

The original Makefile fails on Solaris, because on Solaris the sh is a jsh and not a bash. So the used negations in if-statements are not parsed correctly.

The following patch should fix this (letting test do the negations, not sh) and still be working under bash respective Linux:

*** Makefile.original Thu Sep 13 16:33:16 2001
--- Makefile Thu Sep 13 17:26:55 2001
***************
*** 57,63 ****
# version of perl.
# I should also grab an install-sh instead of using $(CP)
slash:
! if ! [ $(RPM) ] ; then \ (cd Slash; $(PERL) Makefile.PL; make); \ else \ (cd Slash; $(PERL) Makefile.PL INSTALLSITEARCH=$(INSTALLSITEARCH) INSTALLSITELIB=$(INSTALLSITELIB) INSTALLMAN3DIR=$(INSTALLMAN3DIR); make); \ --- 57,63 ----
# version of perl.
# I should also grab an install-sh instead of using $(CP)
slash:
! if [ ! "$(RPM)" ] ; then \ (cd Slash; $(PERL) Makefile.PL; make); \ else \ (cd Slash; $(PERL) Makefile.PL INSTALLSITEARCH=$(INSTALLSITEARCH) INSTALLSITELIB=$(INSTALLSITELIB) INSTALLMAN3DIR=$(INSTALLMAN3DIR); make); \ ***************
*** 68,74 ****
for a in $(PLUGINS); do \ (cd $$a; \ if [ -f Makefile.PL ]; then \ ! if ! [ $(RPM) ] ; then \ $(PERL) Makefile.PL; make;\ else \ $(PERL) Makefile.PL INSTALLSITEARCH=$(INSTALLSITEARCH) INSTALLSITELIB=$(INSTALLSITELIB) INSTALLMAN3DIR=$(INSTALLMAN3DIR); make; \ --- 68,74 ----
for a in $(PLUGINS); do \ (cd $$a; \ if [ -f Makefile.PL ]; then \ ! if [ ! "$(RPM)" ] ; then \ $(PERL) Makefile.PL; make;\ else \ $(PERL) Makefile.PL INSTALLSITEARCH=$(INSTALLSITEARCH) INSTALLSITELIB=$(INSTALLSITELIB) INSTALLMAN3DIR=$(INSTALLMAN3DIR); make; \ ***************
*** 99,105 ****
if [ -f Makefile ]; then \ make install; \ elif [ -f Makefile.PL ]; then \ ! if ! [ $(RPM) ] ; then \ $(PERL) Makefile.PL; \ else \ $(PERL) Makefile.PL INSTALLSITEARCH=$(INSTALLSITEARCH) INSTALLSITELIB=$(INSTALLSITELIB) INSTALLMAN3DIR=$(INSTALLMAN3DIR); \ --- 99,105 ----
if [ -f Makefile ]; then \ make install; \ elif [ -f Makefile.PL ]; then \ ! if [ ! "$(RPM)" ] ; then \ $(PERL) Makefile.PL; \ else \ $(PERL) Makefile.PL INSTALLSITEARCH=$(INSTALLSITEARCH) INSTALLSITELIB=$(INSTALLSITELIB) INSTALLMAN3DIR=$(INSTALLMAN3DIR); \

And here's a more overviewable, non-context-based version of this patch:

60c60
< if ! [ $(RPM) ] ; then \ ---
> if [ ! "$(RPM)" ] ; then \ 71c71
< if ! [ $(RPM) ] ; then \ ---
> if [ ! "$(RPM)" ] ; then \ 102c102
< if ! [ $(RPM) ] ; then \ ---
> if [ ! "$(RPM)" ] ; then \

Discussion

  • Axel Beckert

    Axel Beckert - 2001-09-13

    Logged In: YES
    user_id=298058

    Due to the HTML around the patch screws up to indentation, here's the patch as attachement.

     
  • Axel Beckert

    Axel Beckert - 2001-09-13

    Logged In: YES
    user_id=298058

    Due to the HTML around the patch screws up to indentation, here's the patch as attachement.

     
  • Axel Beckert

    Axel Beckert - 2001-09-13

    Logged In: YES
    user_id=298058

    Due to the HTML around the patch screws up to indentation, here's the patch as attachement.

     
  • Axel Beckert

    Axel Beckert - 2001-09-13

    Logged In: YES
    user_id=298058

    Sorry for those repetitive comments, but my upload tries just resulted in a not further commented SourceForge error message saying "Invalid Filename". And I didn't expect that the comments where successfully posted despite that error message.
    BTW: What's wrong with the name "Makefile.solaris.patch" for a patch?

     
  • Nobody/Anonymous

    Logged In: NO

    How do I apply this patch? Where do I append it in the
    original Makefile?

     
  • Chris Nandor

    Chris Nandor - 2001-10-04
    • assigned_to: nobody --> pudge
     
  • Chris Nandor

    Chris Nandor - 2001-10-04

    Logged In: YES
    user_id=3660

     
  • Chris Nandor

    Chris Nandor - 2001-10-05

    Logged In: YES
    user_id=3660

    The quotes seem to be around $(RPM) already, in the copy I
    have. Thanks.

     
  • Chris Nandor

    Chris Nandor - 2001-10-05
    • assigned_to: pudge --> cmdrtaco
    • status: open --> open-duplicate
     
  • Axel Beckert

    Axel Beckert - 2001-10-05

    Logged In: YES
    user_id=298058

    But remember that the quotes weren't the only necessary changes. The "!" and "[" in the if-statements have to be switched, because in comparison to the bash, the standard bourne shell aka sh doesn't know negations outside of "[]" aka test.

     
  • Rob Malda

    Rob Malda - 2001-10-08
    • status: open-duplicate --> closed-duplicate
     

Log in to post a comment.