depot/third_party/nixpkgs/pkgs/development/ocaml-modules/tcpip/makefile-no-opam.patch
Default email bba55970ba Project import generated by Copybara.
GitOrigin-RevId: 3d1a7716d7f1fccbd7d30ab3b2ed3db831f43bde
2021-04-05 17:23:46 +02:00

12 lines
447 B
Diff

diff --git a/freestanding/Makefile b/freestanding/Makefile
index f22d220d..3e97b4c5 100644
--- a/freestanding/Makefile
+++ b/freestanding/Makefile
@@ -1,4 +1,6 @@
-PKG_CONFIG_PATH := $(shell opam config var prefix)/lib/pkgconfig
+ifneq (, $(shell command -v opam))
+ PKG_CONFIG_PATH ?= $(shell opam config var prefix)/lib/pkgconfig
+endif
EXISTS := $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --exists ocaml-freestanding; echo $$?)