Skip to content
This repository has been archived by the owner on Aug 2, 2020. It is now read-only.

Provide legacy interface #255

Open
hvr opened this issue May 18, 2016 · 6 comments
Open

Provide legacy interface #255

hvr opened this issue May 18, 2016 · 6 comments

Comments

@hvr
Copy link
Contributor

hvr commented May 18, 2016

I've mentioned this already elsewhere, but I think this deserves a ticket of its own:

When we switch over to Hadrian as the only buildsystem, there needs to be a legacy interface in place so that existing ci-build-scripts & deb/rpm recipes (which currently work back till at least GHC 7.0) have a chance continuing to work without having to special-case post-Hadrian GHC trees. This specifically means that the sequence of commands such as

git clone git://git.haskell.org/ghc.git --recursive
cd ghc/
./boot
./configure $some_flags
make -j4 V=0 sdist-ghc

needs to produce a tarball in ./sdistprep

Moreover, for the resulting source-tarball we need a sequence such as (radically simplified, the Debian packaging scripts do actually a lot more, and a assume a conventional autoconf/makefile interface while doing so -- diverging from that causes pain as we can't reuse debhelper's scriptlets which rely on that assumption)

        echo "HADDOCK_DOCS=YES"         >  mk/build.mk
        echo "HSCOLOUR_SRCS=YES"        >> mk/build.mk
        echo "LATEX_DOCS=NO"            >> mk/build.mk
        echo "BUILD_SPHINX_HTML=NO"     >> mk/build.mk
        echo "BUILD_SPHINX_PDF=NO"      >> mk/build.mk
        echo "BUILD_DOCBOOK_HTML=NO"    >> mk/build.mk
        echo "BUILD_DOCBOOK_PDF=NO"     >> mk/build.mk
        echo "BUILD_DOCBOOK_PS=NO"      >> mk/build.mk
        echo "GhcLibWays=v dyn p"       >> mk/build.mk
        PATH=...:$PATH ./configure --prefix=/opt/ghc/$GHCDEBVER CC=... CFLAGS=...  $some_other_flags

        make V=0 -j3

        make install prefix=/opt/ghc/$GHCDEBVER

        make clean -k

to keep working. So the minimal basic interface for source-tarballs is ENVVARS=.. ./configure $flags + make {(all),install,clean}, and this needs to be provided unless we want CI-bots & packaging to break

PS: we also need

  • make dist-clean
  • make maintainer-clean
  • make test
@snowleopard
Copy link
Owner

snowleopard commented May 18, 2016

@hvr Many thanks for documenting this!

Providing a make wrapper calling to Hadrian should not be difficult.

Starting by forwarding (all) and clean targets to Hadrian with all command line arguments and adding the --skip-configure flag seems to be the simplest approach.

@snowleopard snowleopard added this to the ghc-quake milestone May 18, 2016
@hvr hvr mentioned this issue Jun 3, 2016
KaiHa added a commit to KaiHa/hadrian that referenced this issue Jun 9, 2016
@KaiHa
Copy link
Collaborator

KaiHa commented Jun 9, 2016

I have added a sdist-ghc rule to hadrian (see here). @hvr @snowleopard maybe you can have a look at it and tell me if the direction I am heading makes sense to you. @snowleopard if you like you can assign this ticket to me.

@snowleopard
Copy link
Owner

snowleopard commented Jun 9, 2016

@KaiHa Wow, thanks for starting to work on this. To be honest I haven't yet looked at distribution rules, so I can't really review properly. It's unclear though why you are discussing sdist rule here -- #219 seems to be a more relevant issue? Shall we continue there? Sure, I'll happily assign you.

@KaiHa
Copy link
Collaborator

KaiHa commented Jun 10, 2016

It's unclear though why you are discussing sdist rule here -- #219 seems to be a more relevant issue?

You are right, let's move this discussion to #219.

@izgzhen
Copy link
Collaborator

izgzhen commented Jul 18, 2017

@snowleopard What do you think about the urgency of this before merging with GHC?

@snowleopard
Copy link
Owner

snowleopard commented Jul 18, 2017

@izgzhen It's hard for me to judge. Personally, I think it's not that hard to edit one line in a script (change make blah to build qwe), but I can see how this can be tedious if there are hundreds of such scripts.

Perhaps @bgamari can comment?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants