Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAKEFILE #60

Merged
merged 2 commits into from
Mar 6, 2017
Merged

MAKEFILE #60

merged 2 commits into from
Mar 6, 2017

Conversation

amosr
Copy link
Contributor

@amosr amosr commented Feb 8, 2017

wow

@amosr
Copy link
Contributor Author

amosr commented Feb 8, 2017

it works!

amos@Amos zebra $ touch src/Zebra/Foreign/Bindings.hsc
amos@Amos zebra $ /Users/amos/proj/ambiata/mafia-dev/dist/build/mafia/mafia build -w
(HSC) Converting -------- src/Zebra/Foreign/Bindings.hsc
(HSC) Dependencies ------ dist/build/make/Zebra/Foreign/Bindings_hsc_make.c
(Forget) ---------------- dist/build/Zebra/Foreign/Bindings.hs
Building ambiata-zebra-0.0.1...
Preprocessing library ambiata-zebra-0.0.1...
[ 2 of 31] Compiling Zebra.Foreign.Bindings ( dist/build/Zebra/Foreign/Bindings.hs, dist/build/Zebra/Foreign/Bindings.o )
[ 3 of 31] Compiling Zebra.Foreign.Util ( src/Zebra/Foreign/Util.hs, dist/build/Zebra/Foreign/Util.o ) [Zebra.Foreign.Bindings changed]
[ 4 of 31] Compiling Zebra.Foreign.Serial ( src/Zebra/Foreign/Serial.hs, dist/build/Zebra/Foreign/Serial.o ) [Zebra.Foreign.Util changed]

@tranma
Copy link
Contributor

tranma commented Feb 8, 2017

amazing

#include "../lib/anemone/csrc/anemone_base.h"
#include "../lib/anemone/csrc/anemone_memcmp.h"
#include "../lib/anemone/csrc/anemone_mempool.h"
#endif
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so you guys with your weird editors that do things will have to do something like

CFLAGS=$(mafia cflags)

good luck with that?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm, let me try in emacs

@erikd-ambiata
Copy link
Contributor

I'd like a bit more information about what this fixes.

It seems to me that this is just papering over bugs in cabal. Has anyone check the cabal-install github issues page to see if this issue this works around has already been raised? If it hasn't been raised already, maybe it should be.

@amosr
Copy link
Contributor Author

amosr commented Feb 8, 2017

Definitely. There are issues for the hsc2hs case (going back to 2012), but not for the C case. Either way, this is easier than fixing it in Cabal, and works now.

haskell/cabal#24
haskell/cabal#3087
https://github.com/haskell/cabal/blob/master/Cabal/Distribution/Simple/GHC.hs#L1327

@erikd-ambiata
Copy link
Contributor

Either way, this is easier than fixing it in Cabal

Ever hear of the Tradgedy of the Commons?

@amosr
Copy link
Contributor Author

amosr commented Feb 8, 2017

I should have put that in the other order: the important part for me is that it works now. I don't care how. But given that fixing it in Cabal would take more time and then require waiting for a release, this is a fine interim solution.

@erikd-ambiata
Copy link
Contributor

Its only an interim solution if someone actually does the work in Cabal.

@amosr
Copy link
Contributor Author

amosr commented Feb 8, 2017

Ok.. I don't think that's particularly relevant to this PR

@amosr
Copy link
Contributor Author

amosr commented Feb 8, 2017

Looks like they intend on replacing the Cabal build system with Shake, which should make it easier to implement this properly in Cabal. If this one day ends up being replaced with a shake cabal, all the better; if not it still works.

haskell/cabal#4174

haskell/cabal#4306

@amosr amosr changed the title WIP: MAKEFILE MAKEFILE Mar 5, 2017
@amosr
Copy link
Contributor Author

amosr commented Mar 5, 2017

gonna merge this. too bad, suckers

@amosr amosr merged commit 2068c64 into master Mar 6, 2017
@amosr amosr deleted the topic/makefile branch March 6, 2017 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants