Skip to content

Commit 08b99f2

Browse files
committed
Makefiles are template files, need to escape every %
1 parent 5f58d25 commit 08b99f2

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

madgraph/iolibs/template_files/madmatrix/madmatrix.mk

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ endif
7070
#=== Configure MADMATRIX_BUILDDIR
7171

7272
# Build directory "full" tag (used for build lockfiles to prevent mixing builds with different options)
73-
override DIRTAG := $(patsubst cpp%,%,$(BACKEND))_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)
73+
override DIRTAG := $(patsubst cpp%%,%%,$(BACKEND))_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)
7474

7575
# Build directory: current directory by default, or build.<BACKEND> if USEBUILDDIR==1
7676
# NB: using '=' (not ':=') ensures BACKEND is evaluated lazily after potential cppauto resolution
@@ -667,10 +667,10 @@ endif
667667
#=== Configure build directories and build lockfiles ===
668668

669669
# Build lockfile "full" tag (defines full specification of object-file builds that cannot be intermixed)
670-
override TAG = $(patsubst cpp%,%,$(BACKEND))_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)
670+
override TAG = $(patsubst cpp%%,%%,$(BACKEND))_$(FPTYPE)_inl$(HELINL)_hrd$(HRDCOD)
671671

672672
# Export TAG (so that there is no need to check/define it again in src/Makefile)
673-
xport TAG
673+
export TAG
674674

675675
# Build directory for object files: current directory by default, or build.<BACKEND> if USEBUILDDIR==1
676676
override BUILDDIR = $(MADMATRIX_BUILDDIR)
@@ -752,11 +752,11 @@ endif
752752
# incompatible backends (different BACKEND, FPTYPE, etc.) in the same directory.
753753
# Use USEBUILDDIR=1 to build for multiple backends simultaneously without cleaning.
754754
ifeq ($(GPUCC),)
755-
$(BUILDDIR)/%.o : %.cc *.h $(SRC)/*.h $(BUILDDIR)/.build.$(TAG)
755+
$(BUILDDIR)/%%.o : %%.cc *.h $(SRC)/*.h $(BUILDDIR)/.build.$(TAG)
756756
@if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi
757757
$(CXX) $(CPPFLAGS) $(INCFLAGS) $(CXXFLAGS) -c $< -o $@
758758
else
759-
$(BUILDDIR)/%.o : %.cc *.h $(SRC)/*.h $(BUILDDIR)/.build.$(TAG)
759+
$(BUILDDIR)/%%.o : %%.cc *.h $(SRC)/*.h $(BUILDDIR)/.build.$(TAG)
760760
@if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi
761761
$(GPUCC) $(CPPFLAGS) $(INCFLAGS) $(GPUFLAGS) -c -x $(GPULANGUAGE) $< -o $@
762762
endif

madgraph/iolibs/template_files/madmatrix/madmatrix_src.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ $(BUILDDIR)/.build.$(TAG):
8989
# Plain .o suffix — the BUILDDIR (e.g. build.cppavx2/) provides backend separation.
9090
# Use USEBUILDDIR=1 to build for multiple backends simultaneously without cleaning.
9191
ifeq ($(GPUCC),)
92-
$(BUILDDIR)/%.o : %.cc *.h $(BUILDDIR)/.build.$(TAG)
92+
$(BUILDDIR)/%%.o : %%.cc *.h $(BUILDDIR)/.build.$(TAG)
9393
@if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi
9494
$(CXX) $(CPPFLAGS) $(INCFLAGS) $(CXXFLAGS) -c $< -o $@
9595
else
96-
$(BUILDDIR)/%.o : %.cc *.h $(BUILDDIR)/.build.$(TAG)
96+
$(BUILDDIR)/%%.o : %%.cc *.h $(BUILDDIR)/.build.$(TAG)
9797
@if [ ! -d $(BUILDDIR) ]; then echo "mkdir -p $(BUILDDIR)"; mkdir -p $(BUILDDIR); fi
9898
$(GPUCC) $(CPPFLAGS) $(INCFLAGS) $(GPUFLAGS) -c -x $(GPULANGUAGE) $< -o $@
9999
endif

0 commit comments

Comments
 (0)