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

Merge yacc/Makefile into the root Makefile #11243

Merged
merged 1 commit into from
May 9, 2022

Conversation

shindere
Copy link
Contributor

@shindere shindere commented May 6, 2022

This PR should be the first in a series whose purpose is to progresively
merge all the sub-makefiles (except those of the testsuite and manual) into
the root one.

The expected benefit is beter support for parallel/incremental builds,
both in terms of performance and, more importantly, in that more
dependencies will become visible to the same instance of make,
which should make the build system more robust and more parallel by
construction.

Given that this is already an important change, not much effort is
planned, in the series itself, to factorise rules. The only purpose
at the moment is to have everything controlled by a single Makefile.
Improving that Makefile will be addressed later.

In a way, this series acknowledgest the fact that GNU make is actually
not a modular build system and that pretending it is is just creating
more problems and pain for ourselves.

@dra27
Copy link
Member

dra27 commented May 9, 2022

The Windows build could be fixed with this diff:

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -87,7 +87,7 @@ ifeq "$(BOOTSTRAPPING_FLEXDLL)" "false"
 else
   COLDSTART_DEPS = boot/ocamlruns$(EXE)
   BOOT_FLEXLINK_CMD = \
-    FLEXLINK_CMD="../boot/ocamlruns$(EXE) ../boot/flexlink.byte$(EXE)"
+    FLEXLINK_CMD='$$(ROOTDIR)/boot/ocamlruns$(EXE) $$(ROOTDIR)/boot/flexlink.byte$(EXE)'
 endif

i.e. including $(ROOTDIR) in the definition, but delaying its evaluation to the sub-make.

@shindere
Copy link
Contributor Author

shindere commented May 9, 2022 via email

@dra27 dra27 merged commit f7eb3b5 into ocaml:trunk May 9, 2022
@shindere shindere deleted the merge-yacc-makefile branch May 9, 2022 13:42
shindere added a commit that referenced this pull request May 20, 2022
This had been forgotten in #11243
@shindere
Copy link
Contributor Author

Just pushed 52278f6 to fix the distclean target.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants