Skip to content

Commit

Permalink
fix: Add patch to add .Makefile.inc to fastjet-contrib
Browse files Browse the repository at this point in the history
* As each contribution in fastjet-contrib has their own Makefile which
  defines CXX and CXXFLAGS it is necessary to use a globally used
  .Makefile.inc to change these everywhere. For fastjet to be able to
  control the values from the environment that fastjet is being built
  in, use a .Makefile.inc patch to undefine CXX and CXXFLAGS for Make.
  This allows for the environment varaibles to be picked up.
* Remove patch_makefilein.txt as patch_makefileinc.txt supreceeds it.
  • Loading branch information
matthewfeickert committed Feb 17, 2024
1 parent 1897631 commit f7df4b5
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 17 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ graft fastjet-core
graft fastjet-contrib
graft pybind11
global-exclude .git .gitmodules
include LICENSE README.md pyproject.toml setup.py setup.cfg patch_fastjet_i.txt patch_clustersequence.txt patch_makefilein.txt
include LICENSE README.md pyproject.toml setup.py setup.cfg patch_fastjet_i.txt patch_clustersequence.txt patch_makefileinc.txt
exclude .cirrus.yml
15 changes: 0 additions & 15 deletions patch_makefilein.txt

This file was deleted.

21 changes: 21 additions & 0 deletions patch_makefileinc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
From 8044976424439224824e4dd265380bb2f750be1a Mon Sep 17 00:00:00 2001
From: Matthew Feickert <[email protected]>
Date: Fri, 16 Feb 2024 18:00:36 -0600
Subject: [PATCH] Add .Makefile.inc for fastjet

---
.Makefile.inc | 3 +++
1 file changed, 3 insertions(+)
create mode 100644 .Makefile.inc

diff --git a/.Makefile.inc b/.Makefile.inc
new file mode 100644
index 0000000..595b3aa
--- /dev/null
+++ b/.Makefile.inc
@@ -0,0 +1,3 @@
+# undefine variables defined in Makefile.in and each contrib Makefile
+undefine CXX=g++
+undefine CXXFLAGS=-O2 -Wall -g
--
2.34.1
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def build_extensions(self):
subprocess.run(["make", "install"], cwd=FASTJET, env=env, check=True)

subprocess.run(
["patch", "./Makefile.in", DIR / "patch_makefilein.txt"],
["patch", "./.Makefile.inc", DIR / "patch_makefileinc.txt"],
cwd=FASTJET_CONTRIB,
env=env,
check=True,
Expand Down

0 comments on commit f7df4b5

Please sign in to comment.