Skip to content

Commit

Permalink
epics-base: fix compilation due to GNUMake 4.4 upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
minijackson committed Jul 3, 2023
1 parent c53296b commit d0f5370
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkgs/epnix/epics-base/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
buildPackages,
mkEpicsPackage,
fetchgit,
fetchpatch,
version,
hash,
readline,
local_config_site ? {},
local_release ? {},
}:
Expand Down Expand Up @@ -37,11 +35,14 @@ in
inherit hash;
};

patches = optionals (older "7.0.5") [
patches = [
# From: https://github.com/epics-base/epics-base/pull/395
./fix-makeflags-parsing-4.4.patch
] ++ (optionals (older "7.0.5") [
# Support "undefine MYVAR" in convertRelease.pl
# Fixed by commit 79d7ac931502e1c25b247a43b7c4454353ac13a6
./handle-make-undefine-variable.patch
];
]);

# "build" as in Nix terminology (the build machine)
build_config_site =
Expand Down
15 changes: 15 additions & 0 deletions pkgs/epnix/epics-base/fix-makeflags-parsing-4.4.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/configure/CONFIG_COMMON b/configure/CONFIG_COMMON
index 19b26c24c..742e54ae4 100644
--- a/configure/CONFIG_COMMON
+++ b/configure/CONFIG_COMMON
@@ -83,8 +83,9 @@ IOCS_APPL_TOP = $(INSTALL_ABSOLUTE)

#-------------------------------------------------------
# How to portably check the flags to make
+makeflags := $(firstword $(filter-out -,$(filter-out --%,$(MAKEFLAGS))))
define checkflags
- make-$1 = $(findstring $1,$(filter-out --%,$(MAKEFLAGS)))
+ make-$1 := $(findstring $1,$(makeflags))
endef
# This is extensible to most single letter flags:
$(foreach flag,s q, $(eval $(call checkflags,$(flag))))

0 comments on commit d0f5370

Please sign in to comment.