Package: magic / 8.1.218+ds.1-1~bpo9+1

01-makefile-exit-on-error.patch Patch series | download
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
From: Roland Stigge <stigge@antcom.de>
Date: Thu, 26 Jul 2018 18:14:03 +0000
Subject: Makefile adjustment

This patch adjusts the Makefile to exit on errors
---
 Makefile | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)

diff --git a/Makefile b/Makefile
index 2e48388..74c3988 100644
--- a/Makefile
+++ b/Makefile
@@ -18,12 +18,10 @@ include defs.mak
 all:	$(ALL_TARGET)
 
 standard:
-	@echo --- errors and warnings logged in file make.log
-	@${MAKE} mains 2>&1 | tee -a make.log | egrep -i "(.c:|Stop.|---)"
+	${MAKE} mains
 
 tcl:
-	@echo --- errors and warnings logged in file make.log
-	@${MAKE} tcllibrary 2>&1 | tee -a make.log | egrep -i "(.c:|Stop.|---)"
+	${MAKE} tcllibrary
 
 force: clean all
 
@@ -36,12 +34,12 @@ config:
 tcllibrary: database/database.h modules
 	@echo --- making Tcl shared libraries
 	for dir in ${PROGRAMS}; do \
-		(cd $$dir && ${MAKE} tcl-main); done
+		${MAKE} -C $$dir tcl-main || exit 1 ; done
 
 mains: database/database.h modules libs
 	@echo --- making main programs
 	for dir in ${PROGRAMS}; do \
-		(cd $$dir && ${MAKE} main); done
+		${MAKE} -C $$dir main || exit 1 ; done
 
 database/database.h: database/database.h.in
 	@echo --- making header file database/database.h
@@ -50,30 +48,30 @@ database/database.h: database/database.h.in
 modules:
 	@echo --- making modules
 	for dir in ${MODULES} ${PROGRAMS}; do \
-		(cd $$dir && ${MAKE} module); done
+		${MAKE} -C $$dir module || exit 1 ; done
 
 libs:
 	@echo --- making libraries
 	for dir in ${LIBRARIES}; do \
-		(cd $$dir && ${MAKE} lib); done
+		${MAKE} -C $$dir lib || exit 1 ; done
 
 depend:	database/database.h
 	${RM} */Depend
 	for dir in ${MODULES} ${UNUSED_MODULES} ${PROGRAMS}; do \
-		(cd $$dir && ${MAKE} depend); done
+		${MAKE} -C $$dir depend || exit 1 ; done
 
 install: $(INSTALL_TARGET)
 
 install-magic:
 	@echo --- installing executable to $(DESTDIR)${BINDIR}
 	@echo --- installing runtime files to $(DESTDIR)${LIBDIR}
-	@${MAKE} install-real 2>&1 >> install.log
+	@${MAKE} install-real 2>&1
 
 install-real: install-dirs
 	for dir in ${INSTALL_CAD_DIRS}; do \
-		(cd $$dir && ${MAKE} install); done
+		${MAKE} -C $$dir install || exit 1 ; done
 	for dir in ${PROGRAMS}; do \
-		(cd $$dir && ${MAKE} install); done
+		${MAKE} -C $$dir install || exit 1 ; done
 
 install-tcl-dirs:
 	${MAGICDIR}/scripts/mkdirs $(DESTDIR)${BINDIR} $(DESTDIR)${MANDIR} \
@@ -86,11 +84,11 @@ install-dirs:
 install-tcl:
 	@echo --- installing executable to $(DESTDIR)${BINDIR}
 	@echo --- installing runtime files to $(DESTDIR)${LIBDIR}
-	@${MAKE} install-tcl-real 2>&1 >> install.log
+	@${MAKE} install-tcl-real
 
 install-tcl-real: install-tcl-dirs
 	for dir in ${INSTALL_CAD_DIRS} ${PROGRAMS}; do \
-		(cd $$dir && ${MAKE} install-tcl); done
+		${MAKE} -C $$dir install-tcl || exit 1 ; done
 
 clean:
 	for dir in ${MODULES} ${PROGRAMS} ${TECH} ${UNUSED_MODULES}; do \