Skip to content

Commit 2249b6e

Browse files
committed
add additional makefile rules for runinplace
1 parent fdc9c88 commit 2249b6e

File tree

2 files changed

+23
-96
lines changed

2 files changed

+23
-96
lines changed

Makefile

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ doc/$(packageprefix)$(package).qhc: doc/$(packageprefix)$(package).html
294294

295295
.PHONY: clean
296296

297-
clean: clean-tarballs clean-unpacked-release clean-install clean-docs
297+
clean: clean-tarballs clean-unpacked-release clean-install clean-docs clean-runinplace
298298
test -e inst/test && rmdir inst/test || true
299299
test -e $(target_dir)/fntests.log && rm -f $(target_dir)/fntests.log || true
300300
@echo "## Removing target directory (if empty)..."
@@ -309,9 +309,30 @@ CC_SOURCES := $(wildcard src/*.cc)
309309
PKG_ADD := $(shell $(GREP) -sPho '(?<=(//|\#\#) PKG_ADD: ).*' \
310310
$(CC_SOURCES))
311311

312-
runinplace: #all
312+
src/Makefile: src/Makefile.in
313+
ifneq (,$(wildcard $(TOPDIR)/src/bootstrap))
314+
cd "$(TOPDIR)/src" && ./bootstrap && $(RM) -r "autom4te.cache"
315+
endif
316+
ifneq (,$(wildcard $(TOPDIR)/src/configure))
317+
cd "$(TOPDIR)/src" && ./configure
318+
endif
319+
320+
ifneq (,$(wildcard $(TOPDIR)/src/Makefile.in))
321+
compile-inplace: src/Makefile
322+
$(MAKE) -C src
323+
else
324+
compile-inplace:
325+
# nothing to do ?
326+
endif
327+
328+
329+
runinplace: compile-inplace
313330
$(OCTAVE) --silent --persist --path "$(TOPDIR)/inst/" --path "$(TOPDIR)/src/" \
314331
--eval '$(PKG_ADD)'
315332

333+
clean-runinplace:
334+
ifneq (,$(wildcard $(TOPDIR)/src/Makefile))
335+
$(MAKE) -C src clean
336+
endif
316337

317338

src/config.h.in~

Lines changed: 0 additions & 94 deletions
This file was deleted.

0 commit comments

Comments
 (0)