Coder Social home page Coder Social logo

Comments (7)

snowleopard avatar snowleopard commented on May 22, 2024

My first guess would be to put binaries into inplace/bin and header files into inplace/include. Isn't that a standard approach?

from hadrian.

angerman avatar angerman commented on May 22, 2024

Me too. I guess, the wrapper we put into bin and the binary and includes into lib/bin and lib/includes then.
Maybe we should follow a different naming scheme with the wrapper?
Say _cmd being the binary, and cmd being the wrapper around _cmd?

from hadrian.

snowleopard avatar snowleopard commented on May 22, 2024

I propose not to change this convention for now, because we may accidentally break some usage patterns occurring outside of the build system. This is somewhat similar to the wrappers story (#38): the build system may not need them, yet users may still want wrappers to exist.

Let us put utilities into inplace/lib/bin then as make does.

from hadrian.

snowleopard avatar snowleopard commented on May 22, 2024

As I understand only the following utilities are placed into inplace/lib/bin: ghc-split, touchy and unlit. Since we don't build them yet (touchy seems unnecessary, unlit waits for c-only packages to be supported, ghc-split lives in driver which is not yet built), I think we can close this issue for now -- there is nothing to change in the current implementation of the build system. But I'll keep this in mind when adding build rules for these utilities.

Relevant TODO note: 58d7fcc (if this becomes urgent please raise an issue).

from hadrian.

angerman avatar angerman commented on May 22, 2024

Alright, here's a dump of tree for inplace after make.

inplace
├── bin
│   ├── deriveConstants
│   ├── dll-split
│   ├── genapply
│   ├── genprimopcode
│   ├── ghc-cabal
│   ├── ghc-pkg
│   ├── ghc-stage1
│   ├── hp2ps
│   ├── hsc2hs
│   └── mkdirhier
└── lib
    ├── bin
    │   ├── deriveConstants
    │   ├── genprimopcode
    │   ├── ghc-pkg
    │   ├── ghc-split
    │   ├── ghc-stage1
    │   ├── hsc2hs
    │   ├── unlit
    │   └── unlit.bin
    ├── package.conf.d
    │   ├── Cabal-1.23.0.0.conf
    │   ├── array-0.5.1.0.conf
    │   ├── base-4.9.0.0.conf
    │   ├── binary-0.8.0.0.conf
    │   ├── bytestring-0.10.7.0.conf
    │   ├── containers-0.5.7.1.conf
    │   ├── deepseq-1.4.2.0.conf
    │   ├── directory-1.2.5.0.conf
    │   ├── filepath-1.4.1.0.conf
    │   ├── ghc-7.11.conf
    │   ├── ghc-boot-7.11.conf
    │   ├── ghc-prim-0.5.0.0.conf
    │   ├── ghci-7.11.conf
    │   ├── haskeline-0.7.2.2.conf
    │   ├── hoopl-3.10.2.1.conf
    │   ├── hpc-0.6.0.2.conf
    │   ├── integer-gmp-1.0.0.0.conf
    │   ├── package.cache
    │   ├── pretty-1.1.3.2.conf
    │   ├── process-1.4.1.0.conf
    │   ├── rts.conf
    │   ├── template-haskell-2.11.0.0.conf
    │   ├── terminfo-0.4.0.2.conf
    │   ├── time-1.6.conf
    │   ├── transformers-0.5.0.0.conf
    │   └── unix-2.7.1.1.conf
    ├── platformConstants
    ├── settings
    └── template-hsc.h

I hope, I didn't have too many shake / make artifacts in there.

from hadrian.

snowleopard avatar snowleopard commented on May 22, 2024

Do I understand correctly that inplace/bin/ghc-stage1 is actually a wrapper around inplace/lib/bin/ghc-stage1?

from hadrian.

angerman avatar angerman commented on May 22, 2024

Do I understand correctly that inplace/bin/ghc-stage1 is actually a wrapper around `inplace/lib/bin/ghc-stage1?

Yes exactly. Here’s the contents of inplace/bin/ghc-stage1 on my system.

#!/bin/sh
executablename="/Users/angerman/Projects/Haskell/ghc/inplace/lib/bin/ghc-stage1"
datadir="/Users/angerman/Projects/Haskell/ghc/inplace/lib"
bindir="/Users/angerman/Projects/Haskell/ghc/inplace/bin"
topdir="/Users/angerman/Projects/Haskell/ghc/inplace/lib"
pgmgcc="/usr/bin/clang"
export DYLD_LIBRARY_PATH="/Users/angerman/Projects/Haskell/ghc/compiler/stage1/build:/Users/angerman/Projects/Haskell/ghc/libraries/transformers/dist-boot/build:/Users/angerman/Projects/Haskell/ghc/libraries/template-haskell/dist-boot/build:/usr/local/Cellar/ghc/7.10.2/lib/ghc-7.10.2/prett_7UQTOB05U7lIYPkFOVraeR:/usr/local/Cellar/ghc/7.10.2/lib/ghc-7.10.2/proce_FLTz0SLwyG6LJUpZ52HjkU:/Users/angerman/Projects/Haskell/ghc/libraries/hpc/dist-boot/build:/Users/angerman/Projects/Haskell/ghc/libraries/hoopl/dist-boot/build:/Users/angerman/Projects/Haskell/ghc/libraries/ghc-boot/dist-boot/build:/usr/local/Cellar/ghc/7.10.2/lib/ghc-7.10.2/direc_KowvXytSqazBcvN7MGpFtg:/usr/local/Cellar/ghc/7.10.2/lib/ghc-7.10.2/unix_A3WgcI5QiHK4PDo4jSYdwQ:/usr/local/Cellar/ghc/7.10.2/lib/ghc-7.10.2/time_AXTdBF9VRQoBOqJT6qtmVH:/usr/local/Cellar/ghc/7.10.2/lib/ghc-7.10.2/filep_KsGE6pHE5eZHSN90ZVax6A:/Users/angerman/Projects/Haskell/ghc/libraries/binary/dist-boot/build:/usr/local/Cellar/ghc/7.10.2/lib/ghc-7.10.2/conta_LKCPrTJwOTOLk4OU37YmeN:/usr/local/Cellar/ghc/7.10.2/lib/ghc-7.10.2/bytes_6elQVSg5cWdFrvRnfxTUrH:/usr/local/Cellar/ghc/7.10.2/lib/ghc-7.10.2/deeps_LbCWUlehDDeLxurARKDH5o:/usr/local/Cellar/ghc/7.10.2/lib/ghc-7.10.2/array_E0sTtauuKsGDLZoT7lTbgZ:/usr/local/Cellar/ghc/7.10.2/lib/ghc-7.10.2/base_GDytRqRVSUX7zckgKqJjgw:/usr/local/Cellar/ghc/7.10.2/lib/ghc-7.10.2/integ_2aU3IZNMF9a7mQ0OzsZ0dS:/usr/local/Cellar/ghc/7.10.2/libexec/integer-gmp/lib:/usr/local/Cellar/ghc/7.10.2/lib/ghc-7.10.2/ghcpr_8TmvWUcS1U1IKHT0levwg3:/usr/local/Cellar/ghc/7.10.2/lib/ghc-7.10.2/rts${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH}"
exec "$executablename" -B"$topdir" ${1+"$@“}

from hadrian.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.