Skip to content

Commit 2d21a0b

Browse files
committed
Explicitly pass LIBDIR to src Makefile
If not passed explicitly, an error is triggered in case LIBDIR is chosen as a relative path with respect to the SubProcesses Makefile
1 parent 08b99f2 commit 2d21a0b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

madgraph/iolibs/template_files/madmatrix/madmatrix.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ override SRC := ../../src
113113
# NB: LIBDIR is resolved to an absolute path so it can be passed unchanged to sub-makes via export.
114114
LIBDIR ?= ../../lib
115115
override LIBDIR := $(abspath $(LIBDIR))
116-
export LIBDIR
117116

118117
$(info Building objects in BUILDDIR=$(BUILDDIR), libraries in LIBDIR=$(LIBDIR))
119118

@@ -767,7 +766,7 @@ endif
767766
commonlib : $(LIBDIR)/lib$(MADMATRIX_COMMONLIB).so
768767

769768
$(LIBDIR)/lib$(MADMATRIX_COMMONLIB).so: $(SRC)/*.h $(SRC)/*.cc $(BUILDDIR)/.build.$(TAG)
770-
$(MAKE) -C $(SRC) BACKEND=$(BACKEND)
769+
$(MAKE) -C $(SRC) BACKEND=$(BACKEND) LIBDIR=$(LIBDIR)
771770

772771
#-------------------------------------------------------------------------------
773772

@@ -851,14 +850,15 @@ else
851850
rm -f $(BUILDDIR)/.build.* $(BUILDDIR)/*.o
852851
rm -f $(LIBDIR)/lib$(MADMATRIX_LIB).so
853852
rm -f $(BACKEND_LOG)
854-
$(MAKE) -C $(SRC) clean BACKEND=$(BACKEND)
853+
$(MAKE) -C $(SRC) clean BACKEND=$(BACKEND) LIBDIR=$(LIBDIR)
854+
endif
855855

856856
# cleanall: remove objects and libraries for ALL backends.
857857
cleanall:
858858
rm -rf build.*
859859
rm -f ./.build.* ./*.o
860860
rm -f $(LIBDIR)/libmadmatrix_$(processid_short)_*.so
861-
$(MAKE) -C $(SRC) cleanall
861+
$(MAKE) -C $(SRC) cleanall LIBDIR=$(LIBDIR)
862862

863863
#-------------------------------------------------------------------------------
864864

0 commit comments

Comments
 (0)