Re: cvs commit: fptools/green-card/distrib greencard.spec.in

Alastair Reid <[email protected]> Tue, 27 May 2003 10:06:40 +0100
Newsgroups gmane.comp.lang.haskell.cvs.green-card
Organization Reid Consulting (UK) Ltd
Message-ID <[email protected]>
>   * No Hugs-related stuff anymore, should probably be re-added (how???)

I deleted the lib/hugs directory because the use of the ffi target makes it 
possible to share the stddis.gc with ghc (and nhc?).

For Hugs, we need:

1) A wrapper script which invokes runhugs.

    Seems like green-card/src/green-card.sh.in can gain a little conditional
    execution or some preprocessorization.

2) To compile and install libgreencard.

    This is pretty trivial.

3) Finally, we need a way to select which compiler we're using when
    we invoke make.  Ideally, this should be consistent with whatever we
   do in the fptools infrastructure.

   I'm currently leaning towards:

      make HC=/usr/bin/hugs98

   and (once I remember how to write legal shell script) using something
   like this (I don't know if we actually need to know version numbers for
  greencard...):

      case ${HC} {
      (*hugs*) : 
        Target=HUGS
        FP_HUGS_VERSION(${HC})
        hc_version=$hugs_version
        break;
      (*ghc*):    
        Target=GHC;
        FP_GHC_VERSION(${HC})
        hc_version=$hugs_version
        break;
      (*nhc*):    
        Target=NHC;
        FP_NHC_VERSION(${HC})
        hc_version=$hugs_version
        break;
     }

Longer term, I think we should strip out the non-dist makefiles and rewrite to 
rely on the fptools make infrastructure rather than trying to maintain two 
separate parallel sets of makefiles.  

--
Alastair