Skip to content

dune: fix build of primitives#11522

Closed
trefis wants to merge 1 commit intoocaml:trunkfrom
trefis:dune-primitives
Closed

dune: fix build of primitives#11522
trefis wants to merge 1 commit intoocaml:trunkfrom
trefis:dune-primitives

Conversation

@trefis
Copy link
Copy Markdown
Contributor

@trefis trefis commented Aug 30, 2022

Two things here:

  • the list of files to consider wasn't up to date
  • gen_primitives.sh had changed and assumed it was being run from the root of the repository; I decided to add "a flag" to change that behavior … pardon my bash.

cc @OlivierNicole

@trefis trefis requested a review from shindere August 30, 2022 12:17
@shindere
Copy link
Copy Markdown
Contributor

shindere commented Aug 30, 2022 via email

@shindere
Copy link
Copy Markdown
Contributor

shindere commented Aug 30, 2022 via email

@trefis
Copy link
Copy Markdown
Contributor Author

trefis commented Aug 30, 2022

It is possible; it just wasn't done that way initially because I was trying to reproduce the Makefile structure.
Apparently it was recently decided to change that; but I have just been focusing on having the minimal patches to have the dune build work, not to rewrite it all.

@trefis
Copy link
Copy Markdown
Contributor Author

trefis commented Aug 30, 2022

How about this?

Sounds good.

@shindere
Copy link
Copy Markdown
Contributor

shindere commented Aug 30, 2022 via email

@shindere
Copy link
Copy Markdown
Contributor

shindere commented Aug 30, 2022 via email

output="$prim.c"
else
output="runtime/$prim.c"
fi
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For what is worth, what I do to make scripts robust wrt to the current directory is to add a cd $(dirname "$0") at the top of the script, which has the effect of putting yourself in the directory that contains the script itself (here, runtime/).

@trefis
Copy link
Copy Markdown
Contributor Author

trefis commented Sep 14, 2022

Closing for now as more things are needed to fix the dune build.
I'll keep this discussion in mind when I get round to actually fixing things.

@trefis trefis closed this Sep 14, 2022
xavierleroy added a commit to xavierleroy/ocaml that referenced this pull request Sep 21, 2022
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