1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
From: Dima Kogan <dima@secretsauce.net>
Date: Thu, 7 Nov 2013 11:21:57 -0800
Subject: octave 'make clean' now works properly
Two fixes:
1. 'make clean' now always cleans up octave stuff, even if octave builds are
off. This works to clean up from previous runs
2. octave now cleans up its .o files
---
make/octave.mak | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/make/octave.mak b/make/octave.mak
index 1ee0100..fa79df3 100644
--- a/make/octave.mak
+++ b/make/octave.mak
@@ -28,10 +28,13 @@ endif
ifdef OCTAVE_ENABLE
all: octave-mex-all
+endif
+
+# cleaning rules are defined even if OCTAVE_ENABLE is off, so that we can clean
+# up previous build products
clean: octave-mex-clean
archclean: octave-mex-archclean
distclean: octave-mex-distclean
-endif
info: octave-mex-info
@@ -61,6 +64,7 @@ octave_mex_src := $(shell find $(VLDIR)/toolbox -name "*.c")
octave_mex_tgt := $(addprefix $(OCTAVE_MEX_BINDIR)/,\
$(notdir $(mex_src:.c=.$(OCTAVE_MEX_SUFFIX)) ) )
octave_mex_dep := $(octave_mex_tgt:.$(OCTAVE_MEX_SUFFIX)=.d)
+octave_mex_obj := $(notdir $(mex_src:.c=.o))
octave_mex_dll := $(OCTAVE_MEX_BINDIR)/lib$(DLL_NAME).$(DLL_SUFFIX)
ifdef OCTAVE_ENABLE
@@ -110,7 +114,7 @@ octave-mex-info:
@echo
octave-mex-clean:
- rm -f $(octave_mex_dep)
+ rm -f $(octave_mex_dep) $(octave_mex_obj)
octave-mex-archclean: octave-clean
rm -f $(octave_mex_tgt)
|