Skip to content
Snippets Groups Projects
Commit b0a76aab authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Nicer make syntax

parent c9665669
No related branches found
No related tags found
No related merge requests found
...@@ -52,10 +52,10 @@ include $(top_srcdir)/flymake.mk ...@@ -52,10 +52,10 @@ include $(top_srcdir)/flymake.mk
MKOCTFILE ?= mkoctfile MKOCTFILE ?= mkoctfile
OCTAVE ?= octave OCTAVE ?= octave
OCTAVE_MODULES= duneminimise duneevaluate OCTAVE_MODULES= duneminimise.oct duneevaluate.oct
.PHONY: run-octave .PHONY: run-octave
run-octave: $(addsuffix .oct,$(OCTAVE_MODULES)) run-octave: $(OCTAVE_MODULES)
$(OCTAVE) --path $(abs_builddir) --path $(abs_srcdir) $(OCTAVE) --path $(abs_builddir) --path $(abs_srcdir)
include $(srcdir)/octave.mk include $(srcdir)/octave.mk
define OCTFILE_template = $(OCTAVE_MODULES): %.oct: %.o
$(1).oct: $(1).o $(MKOCTFILE) -o $@ $< -ldunecommon
$$(MKOCTFILE) -o $$@ $$< -ldunecommon
$(1).o: $(1).cc duneoctave.hh $(OCTAVE_MODULES:.oct=.o): %.o: %.cc duneoctave.hh
$$(MKOCTFILE) $$(DEFS) $$(AM_CPPFLAGS) -c -o $$@ $$< $(MKOCTFILE) $(DEFS) $(AM_CPPFLAGS) -c -o $@ $<
endef
$(foreach octave_module,$(OCTAVE_MODULES),$(eval $(call OCTFILE_template,$(octave_module))))
CLEANFILES = $(addsuffix .oct,$(OCTAVE_MODULES)) $(addsuffix .o,$(OCTAVE_MODULES))
CLEANFILES = $(OCTAVE_MODULES) $(OCTAVE_MODULES:.oct=.o)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment