Skip to content

[REFACTOR] Phase out root Makefile#18828

Merged
tqchen merged 2 commits intoapache:mainfrom
tqchen:makefile-phaseout
Feb 26, 2026
Merged

[REFACTOR] Phase out root Makefile#18828
tqchen merged 2 commits intoapache:mainfrom
tqchen:makefile-phaseout

Conversation

@tqchen
Copy link
Member

@tqchen tqchen commented Feb 26, 2026

This PR removes the root Makefile and inlines its remaining functionality
into CI scripts and READMEs. Also removes legacy lint scripts that are
now handled by pre-commit.

Changes

  • Delete root Makefile — all targets either unused or inlined
  • Create tests/scripts/task_jvm_build.sh — extracted JVM platform
    detection + mvn build from Makefile
  • Update CI scripts: task_python_docs.sh (cppdoc/javadoc),
    task_java_unittest.sh (jvmpkg), cppdocs.sh (doxygen)
  • Update READMEs: docker/README.md, jvm/README.md,
    apps/cpp_rpc/README.md — replace make with direct commands
  • Remove legacy lint scripts from tests/lint/ (8 files) —
    pre-commit handles all linting now

Subdirectory Makefiles (docs/Makefile, web/Makefile) are unchanged.

This PR removes the root Makefile and inlines its remaining functionality into CI scripts and READMEs. Also removes unused legacy lint scripts (pre-commit handles all linting now).
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @tqchen, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly refactors the project's build and CI infrastructure by eliminating the top-level Makefile. Its responsibilities have been distributed into specific shell scripts for CI tasks and direct commands within documentation, aiming to simplify the build process, improve maintainability, and leverage modern tools like pre-commit for linting.

Highlights

  • Root Makefile Removal: The central Makefile has been entirely deleted, with its functionalities migrated to other scripts and documentation.
  • New JVM Build Script: A dedicated shell script, tests/scripts/task_jvm_build.sh, was introduced to handle JVM platform detection and Maven build processes.
  • CI Script Updates: Continuous Integration scripts for Python documentation, Java unit tests, and C++ documentation were modified to use direct commands instead of make targets.
  • README Documentation Refinement: Various README.md files were updated to reflect the removal of make commands, providing direct build and lint instructions.
  • Legacy Lint Script Deprecation: Eight old linting scripts located in tests/lint/ were removed, as their functionalities are now managed by pre-commit hooks.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • Makefile
    • Removed the entire Makefile.
  • apps/cpp_rpc/README.md
    • Updated the C++ RPC server compilation command from make to cmake --build.
  • docker/README.md
    • Updated the lint command to use pre-commit run --all-files instead of make pylint.
    • Updated the CUDA build command to use cmake -GNinja .. && ninja instead of make.
    • Updated the docs build command to use cd docs && make html instead of make -C docs html.
  • jvm/README.md
    • Updated the tvm4j compilation command to use bash tests/scripts/task_jvm_build.sh instead of make jvmpkg.
    • Updated the tvm4j installation command to use direct mvn install instead of make jvminstall.
  • tests/lint/blocklint.sh
    • Removed the script.
  • tests/lint/check_asf_header.sh
    • Removed the script.
  • tests/lint/cppdocs.sh
    • Replaced make cppdoc with a direct doxygen docs/Doxyfile command.
  • tests/lint/flake8.sh
    • Removed the script.
  • tests/lint/git-black.sh
    • Removed the script.
  • tests/lint/git-clang-format.sh
    • Removed the script.
  • tests/lint/jnilint.sh
    • Removed the script.
  • tests/lint/pylint.sh
    • Removed the script.
  • tests/lint/whitespace.sh
    • Removed the script.
  • tests/scripts/task_java_unittest.sh
    • Replaced calls to make jvmpkg with bash "$(dirname "$0")"/task_jvm_build.sh.
  • tests/scripts/task_jvm_build.sh
    • Added a new script to build the TVM JVM package using Maven with platform detection.
  • tests/scripts/task_python_docs.sh
    • Replaced make cppdoc with doxygen docs/Doxyfile.
    • Replaced make javadoc with (cd jvm && mvn "javadoc:javadoc" -Dnotimestamp=true).
Activity
  • No human activity (comments, reviews, etc.) has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request is a great refactoring that removes the root Makefile and replaces its functionality with more explicit shell commands and scripts. This improves clarity and reduces magic. The changes in the CI scripts and READMEs are mostly correct. I've found a critical issue in the updated jvm/README.md where the command for jvminstall is incorrect and will fail for many users. I've also suggested an improvement to the new task_jvm_build.sh script to make it more flexible and help resolve the README issue.

- task_jvm_build.sh now accepts an optional first arg as the Maven goal
  (default: "clean package"), with remaining args passed through to mvn
- jvm/README.md install step updated to use task_jvm_build.sh install
  instead of hardcoding the linux-x86_64 profile
@tqchen tqchen merged commit e30208c into apache:main Feb 26, 2026
10 checks passed
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.

2 participants