File: remove-test-dir.patch

package info (click to toggle)
octave-lssa 0.1.4-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 376 kB
  • sloc: cpp: 738; makefile: 158
file content (31 lines) | stat: -rw-r--r-- 1,077 bytes parent folder | download | duplicates (2)
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
Description: Remove inst/test directory in target clean
Author: Rafael Laboissière <rafael@debian.org>
Forwarded: https://savannah.gnu.org/bugs/?63471
Last-Update: 2022-12-05

--- octave-lssa-0.1.4.orig/src/Makefile
+++ octave-lssa-0.1.4/src/Makefile
@@ -3,7 +3,8 @@ GREP ?= grep
 
 CC_SOURCES  := $(wildcard *.cc)
 CC_TST_SOURCES := $(shell $(GREP) --files-with-matches '^%!' $(CC_SOURCES))
-TST_SOURCES := $(patsubst %.cc,../inst/test/%.cc-tst,$(CC_TST_SOURCES))
+TST_DIR := ../inst/test
+TST_SOURCES := $(patsubst %.cc,$(TST_DIR)/%.cc-tst,$(CC_TST_SOURCES))
 
 all: fastlscomplex.oct $(TST_SOURCES)
 
@@ -17,7 +18,7 @@ fastlscomplex.oct: fastlscomplex.cc
 ../inst/test:
 	@mkdir -p "$@"
 
-$(TST_SOURCES): ../inst/test/%.cc-tst: %.cc | ../inst/test
+$(TST_SOURCES): ../inst/test/%.cc-tst: %.cc | $(TST_DIR)
 	@echo "Extracting tests from $< ..."
 	@$(RM) -f "$@" "$@-t"
 	@(	echo "## Generated from $<"; \
@@ -26,3 +27,4 @@ $(TST_SOURCES): ../inst/test/%.cc-tst: %
 # helper function just in case
 clean:
 	rm -f *.o *.oct *~ octave-core $(TST_SOURCES)
+	rm -rf $(TST_DIR)