Skip to content

Commit

Permalink
add additional makefile rules for runinplace
Browse files Browse the repository at this point in the history
  • Loading branch information
lostbard committed Oct 12, 2022
1 parent fdc9c88 commit 2249b6e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 96 deletions.
25 changes: 23 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ doc/$(packageprefix)$(package).qhc: doc/$(packageprefix)$(package).html

.PHONY: clean

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

runinplace: #all
src/Makefile: src/Makefile.in
ifneq (,$(wildcard $(TOPDIR)/src/bootstrap))
cd "$(TOPDIR)/src" && ./bootstrap && $(RM) -r "autom4te.cache"
endif
ifneq (,$(wildcard $(TOPDIR)/src/configure))
cd "$(TOPDIR)/src" && ./configure
endif

ifneq (,$(wildcard $(TOPDIR)/src/Makefile.in))
compile-inplace: src/Makefile
$(MAKE) -C src
else
compile-inplace:
# nothing to do ?
endif


runinplace: compile-inplace
$(OCTAVE) --silent --persist --path "$(TOPDIR)/inst/" --path "$(TOPDIR)/src/" \
--eval '$(PKG_ADD)'

clean-runinplace:
ifneq (,$(wildcard $(TOPDIR)/src/Makefile))
$(MAKE) -C src clean
endif


94 changes: 0 additions & 94 deletions src/config.h.in~

This file was deleted.

0 comments on commit 2249b6e

Please sign in to comment.