Skip to content

Merge build systems in the stdlib directory#866

Merged
dra27 merged 1 commit intoocaml:trunkfrom
shindere:merge-stdlib-makefiles
Nov 9, 2016
Merged

Merge build systems in the stdlib directory#866
dra27 merged 1 commit intoocaml:trunkfrom
shindere:merge-stdlib-makefiles

Conversation

@shindere
Copy link
Contributor

This PR continues the build-systems merging work started in PRs
#762, #764, #785, #788, #811 and #812.

Changes specific to the Unix build system:

  - allopt target: replace invocations to $(MAKE) by prerequisites.

  - installopt-noprof tartget: call ln with the -f option rather than
    removing the destination file before creating the symlink

Changes specific to the Windows build system:

  - allopt target: add the allopt-$(PROFILING) target as a prereq
    Currently, $(PROFILING) is set to noprof in the default Windows
    configuration files (see config/Makefile.*) so this will not change
    anything in practice, except when PROFILING is set to "prof"
    under Windows. From now on this will be honored, whereas it was not,
    before this commit.

  - installopt now also supports installing the library with
    profiling support

Changes affecting both build systems:

  - Declare rules that do not build a file as PHONY.
    This was mostly done in the Unix build system but not in the Windows one.
    However, this commit adds one .PHONY declaration for each
    concerned rule, just above the rule itself, rather than declaring
    several rules PHONY simultaneously. Although this is longer, it
    feels better because that way the information specific to each
    rule is more local.
@shindere shindere force-pushed the merge-stdlib-makefiles branch from d4913ac to d24d9a2 Compare November 9, 2016 14:28
@shindere
Copy link
Contributor Author

shindere commented Nov 9, 2016

Just rebased on latest trunk. @alainfrisch can you review the code, please?

@gasche
Copy link
Member

gasche commented Nov 9, 2016

(cc: @dra27, @whitequark (does Adrien Nader have a github account?) who may also be interested in giving an opinion.)


# TODO: see whether there is a way to further merge the rules below
# with those above

Copy link
Member

Choose a reason for hiding this comment

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

Only with tremendous care - I think more than one of the lines below has been the subject of its own Mantis PR!

@dra27
Copy link
Member

dra27 commented Nov 9, 2016

Have you compilation with flexdll built using the submodule (rather than preinstalled)? I of course don't mind doing it, though from a testing perspective, I'd prefer to review/test all these merges at once, even if they're in separate PRs...

@shindere
Copy link
Contributor Author

shindere commented Nov 9, 2016

David Allsopp (2016/11/09 08:00 -0800):

Have you tested flexdll built using the submodule?

No, not yet. Am I correct that you are talking about boostrapping
flexdll? In that case: is there already a documentation explaining how
this can be tested? As far as I remember it was not obvious how to do it
last time I tried. Moreover flexdll is already installed on the machines
where I do the Windows tests.

@dra27 if you can test the build with the flexdll submodule I'd really
appreciate. This PR is actually the only unmerged one at the moment,
regarding the merge of build systems.

@dra27
Copy link
Member

dra27 commented Nov 9, 2016

No problem - I will try to this evening. Assuming you're using a git clone: git submodule update --init and then make -f Makefile.nt flexdll (you can include world/world.opt after flexdll). It should ignore the system-installed flexlink - though it's a good idea not to have one while testing.

@whitequark
Copy link
Member

My opinion is that this PR set is rather wonderful and is certain to make my life (as a cross-compilation package maintainer) rather easier, even if there are some omissions.

@shindere
Copy link
Contributor Author

shindere commented Nov 9, 2016

Thanks, David, for your prompt responses and your support!

David Allsopp (2016/11/09 08:21 -0800):

No problem - I will try to this evening.

Nice! Thanks!

Assuming you're using a git clone:

Yes, I do.

git submodule update --init and then make -f Makefile.nt flexdll
(you can include world/world.opt after flexdll).

Okay I'll try this tomorrow, thanks!

It should ignore the system-installed flexlink - though it's a good
idea not to have one while testing.

Given that I do my tests on the CI machines, not having flexdll
installed is not really an option. Well it oculd be, if there is the
choice to also test flexdll, but at the moment it's not the case.

What I can do, though, is to remove flexdll from the PATH.

And I'll try this tomorrow.

@dra27
Copy link
Member

dra27 commented Nov 9, 2016

Removing from PATH is safely equivalent to not having it - there's nothing in the build system which ever try to search for it.

@dra27
Copy link
Member

dra27 commented Nov 9, 2016

Just tried it with msvc x86 and bootstrapped flexdll and everything seems fine!

@gasche
Copy link
Member

gasche commented Nov 9, 2016

@dra27 Thanks for the testing! Feel free to merge if you think this is good.

Copy link
Contributor

@adrien-n adrien-n left a comment

Choose a reason for hiding this comment

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

Nothing obviously wrong stood out. The diff seems more difficult to read than it ought to be because git doesn't seem to notice this is a move but I assume you've simply moved the content of Makefile.nt around and wrapped it in a conditional.

echo '#!$(BINDIR)/ocamlrun'$$suff > camlheader$$suff && \
echo '#!$(TARGET_BINDIR)/ocamlrun'$$suff >target_camlheader$$suff; \
done && \
echo '#!' | tr -d '\012' > camlheader_ur;
Copy link
Contributor

Choose a reason for hiding this comment

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

This is most probably for another patchset:

printf "#!" > camlheader_ur

would be much cleaner. I'm not sure we can get into this branch on platforms with \r\n end-of-lines however.

@dra27 dra27 merged commit db12391 into ocaml:trunk Nov 9, 2016
@shindere shindere deleted the merge-stdlib-makefiles branch November 10, 2016 15:03
camlspotter pushed a commit to camlspotter/ocaml that referenced this pull request Oct 17, 2017
Changes specific to the Unix build system:

  - allopt target: replace invocations to $(MAKE) by prerequisites.

  - installopt-noprof tartget: call ln with the -f option rather than
    removing the destination file before creating the symlink

Changes specific to the Windows build system:

  - allopt target: add the allopt-$(PROFILING) target as a prereq
    Currently, $(PROFILING) is set to noprof in the default Windows
    configuration files (see config/Makefile.*) so this will not change
    anything in practice, except when PROFILING is set to "prof"
    under Windows. From now on this will be honored, whereas it was not,
    before this commit.

  - installopt now also supports installing the library with
    profiling support

Changes affecting both build systems:

  - Declare rules that do not build a file as PHONY.
    This was mostly done in the Unix build system but not in the Windows one.
    However, this commit adds one .PHONY declaration for each
    concerned rule, just above the rule itself, rather than declaring
    several rules PHONY simultaneously. Although this is longer, it
    feels better because that way the information specific to each
    rule is more local.
stedolan added a commit to stedolan/ocaml that referenced this pull request Oct 25, 2022
sadiqj pushed a commit to sadiqj/ocaml that referenced this pull request Feb 21, 2023
stedolan pushed a commit to stedolan/ocaml that referenced this pull request Mar 21, 2023
25188da flambda-backend: Missed comment from PR802 (ocaml#887)
9469765 flambda-backend: Improve the semantics of asynchronous exceptions (new simpler version) (ocaml#802)
d9e4dd0 flambda-backend: Fix `make runtest` on NixOS (ocaml#874)
4bbde7a flambda-backend: Simpler symbols (ocaml#753)
ef37262 flambda-backend: Add opaqueness to Obj.magic under Flambda 2 (ocaml#862)
a9616e9 flambda-backend: Add build system hooks for ocaml-jst (ocaml#869)
045ef67 flambda-backend: Allow the compiler to build with stock Dune (ocaml#868)
3cac5be flambda-backend: Simplify Makefile logic for natdynlinkops (ocaml#866)
c5b12bf flambda-backend: Remove unnecessary install lines (ocaml#860)
ff12bbe flambda-backend: Fix unused variable warning in st_stubs.c (ocaml#861)
c84976c flambda-backend: Static check for noalloc: attributes (ocaml#825)
ca56052 flambda-backend: Build system refactoring for ocaml-jst (ocaml#857)
39eb7f9 flambda-backend: Remove integer comparison involving nonconstant polymorphic variants (ocaml#854)
c102688 flambda-backend: Fix soundness bug by using currying information from typing (ocaml#850)
6a96b61 flambda-backend: Add a primitive to enable/disable the tick thread (ocaml#852)
f64370b flambda-backend: Make Obj.dup use a new primitive, %obj_dup (ocaml#843)
9b78eb2 flambda-backend: Add test for ocaml#820 (include functor soundness bug) (ocaml#841)
8f24346 flambda-backend: Add `-dtimings-precision` flag (ocaml#833)
65c2f22 flambda-backend: Add test for ocaml#829 (ocaml#831)
7b27a49 flambda-backend: Follow-up PR#829 (comballoc fixes for locals) (ocaml#830)
ad7ec10 flambda-backend: Use a custom condition variable implementation (ocaml#787)
3ee650c flambda-backend: Fix soundness bug in include functor (ocaml#820)
2f57378 flambda-backend: Static check noalloc (ocaml#778)
aaad625 flambda-backend: Emit begin/end region only when stack allocation is enabled (ocaml#812)
17c7173 flambda-backend: Fix .cmt for included signatures (ocaml#803)
e119669 flambda-backend: Increase delays in tests/lib-threads/beat.ml (ocaml#800)
ccc356d flambda-backend: Prevent dynamic loading of the same .cmxs twice in private mode, etc. (ocaml#784)
14eb572 flambda-backend: Make local extension point equivalent to local_ expression (ocaml#790)
487d11b flambda-backend: Fix tast_iterator and tast_mapper for include functor. (ocaml#795)
a50a818 flambda-backend: Reduce closure allocation in List (ocaml#792)
96c9c60 flambda-backend: Merge ocaml-jst
a775b88 flambda-backend: Fix ocaml/otherlibs/unix 32-bit build (ocaml#767)
f7c2679 flambda-backend: Create object files internally to avoid invoking GAS (ocaml#757)
c7a46bb flambda-backend: Bugfix for Cmmgen.expr_size with locals (ocaml#756)
b337cb6 flambda-backend: Fix build_upstream for PR749 (ocaml#750)
8e7e81c flambda-backend: Differentiate is_int primitive between generic and variant-only versions (ocaml#749)

git-subtree-dir: ocaml
git-subtree-split: 25188da
EmileTrotignon pushed a commit to EmileTrotignon/ocaml that referenced this pull request Jan 12, 2024
* Drop extra slashes

Handle the request unchanged if the target seems
canonical, otherwise:

  * Turns repeated slashes into a single one
  * Drop the last slash
  * Redirect to the resulting target

Note: Dream.split_targer bugged?
When passed a string beginning with exactly two slashes,
split_target drops everything before the first slash.
See: camlworks/dream#248
As a work around, three slashes are preprended to all targets

* Formatting

---------

Co-authored-by: Cuihtlauac ALVARADO <[email protected]>
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.

5 participants