[Yhc] Yhc autumn cleaning

Mathieu Boespflug mboes at tweag.net
Thu Nov 8 11:24:41 EST 2007


> elif "push" in COMMAND_LINE_TARGETS:
>     fw = ARGUMENTS.get("fw", "")
>     if fw == "":
>         os.system("darcs push --no-set-default
> neil at darcs.haskell.org:/home/darcs/yhc")
>         os.system("darcs push --no-set-default
> neil at darcs.haskell.org:/home/darcs/york-compiler98
> --repodir=src/compiler")
>     else:
>         print "Pushing via firewall - you may be asked for passwords
> multiple times"
>         os.system("export SSH_PORT=2222;" + \
>                   "ssh -L $SSH_PORT:darcs.haskell.org:22 -f " + fw + "
> sleep 1000;" + \
>                   "darcs push --no-set-default
> neil at localhost:/home/darcs/yhc;" + \
>                   "darcs push --no-set-default
> neil at localhost:/home/darcs/york-compiler98 --repodir=src/compiler")
>     env.Alias("push", [])
>
>
> ==============================
>
> so one can run "scons push fw=hostname" and get around a firewall.
>
> I'd like that this logic be kept in the new build system, whatever it
> will be, so what would be the best place to plug it in? With scons,
> that was just an additional `if ' statement that analyzes the command
> line.

I have added a patch to yhc.cmake repo to support this. The user can
modify interactively the settings regarding what remote host to bounce
from and what ports to use with the ccmake command or any other cmake
cache management utility.

Note the firewall support is untested.

> Also, eventually there will come time to integrate the Javascript
> backend into the new build system: what can be recommended for this?
>
> Currently there is a Makefile within the backend.

If the build system is migrated to CMake then ideally this would have
to be converted to a CMakeLists.txt file. You can make on in
src/translator/js, self contained and independent of the top-level
CMakeLists.txt file. We can then add an appropriate directive in the
toplevel file to build ycr2js from the toplevel. For now I have added
a patch to the repo at

http://code.haskell.org/~mboes/yhc.cmake

that just calls make in ycr2js's directory. So at the top-level,

$ cmake .
$ make ycr2js

This only calls "make" atm, not "make install".

Regards,

Mathieu


More information about the Yhc mailing list