summaryrefslogtreecommitdiff
path: root/sys-devel/dev86/files/dev86-0.16.21-make.patch
blob: 248ff5814dbc9ddbb3c6feb1b4828dae90340b4d (plain)
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
From f14f78efcd5c865b470173dc06959c8de61e9711 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Thu, 8 Mar 2018 19:31:17 +0100
Subject: [PATCH] build: Always use $(MAKE) to spawn sub-make

Always use $(MAKE) instead of literal 'make' to spawn the correct make
variant. Otherwise, e.g. when using 'gmake' on FreeBSD the Makefiles
spawn BSD make and things fail because of incompatible MAKEFLAGS
set by GNU make.
---
 bootblocks/Makefile | 10 +++++-----
 libbsd/Makefile     |  2 +-
 makefile.in         |  2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/bootblocks/Makefile b/bootblocks/Makefile
index d954ea1..2887d86 100644
--- a/bootblocks/Makefile
+++ b/bootblocks/Makefile
@@ -55,31 +55,31 @@ fs_min.o: minix.h
 
 bootfile.sys: $(MSRC) $(MINC)
 	@rm -f $(MOBJ)
-	make 'CFLAGS=$(CFLAGS) -DDOSFLOPPY' monitor.out
+	$(MAKE) 'CFLAGS=$(CFLAGS) -DDOSFLOPPY' monitor.out
 	mv monitor.out bootfile.sys
 	@rm -f $(MOBJ)
 
 boottar.sys: $(MSRC) $(MINC) tarboot.bin
 	@rm -f $(MOBJ)
-	make 'CFLAGS=$(CFLAGS) -DTARFLOPPY' monitor.out
+	$(MAKE) 'CFLAGS=$(CFLAGS) -DTARFLOPPY' monitor.out
 	mv monitor.out boottar.sys
 	@rm -f $(MOBJ)
 
 bootminix.sys: $(MSRC) $(MINC) minix.bin
 	@rm -f $(MOBJ)
-	make 'CFLAGS=$(CFLAGS) -DMINFLOPPY' monitor.out
+	$(MAKE) 'CFLAGS=$(CFLAGS) -DMINFLOPPY' monitor.out
 	mv monitor.out bootminix.sys
 	@rm -f $(MOBJ)
 
 monitor.sys: $(MSRC) $(MINC)
 	@rm -f $(MOBJ)
-	make monitor.out
+	$(MAKE) monitor.out
 	mv monitor.out monitor.sys
 	@rm -f $(MOBJ)
 
 monitor: $(MSRC) $(MINC)
 	@rm -f $(MOBJ)
-	make 'CFLAGS=-ansi $(DEFS)' monitor.out
+	$(MAKE) 'CFLAGS=-ansi $(DEFS)' monitor.out
 	mv monitor.out monitor
 	@rm -f $(MOBJ)
 
diff --git a/libbsd/Makefile b/libbsd/Makefile
index 2b29f72..722b86d 100644
--- a/libbsd/Makefile
+++ b/libbsd/Makefile
@@ -29,7 +29,7 @@ install: all
 	install -m 644 $(LIBBSD) $(LIBDIR)/i86
 
 tests: dummy
-	make -C tests
+	$(MAKE) -C tests
 
 $(LIBBSD): $(OBJS)
 	$(AR) rc $(LIBBSD) $(OBJS)
diff --git a/makefile.in b/makefile.in
index b586da1..97ea519 100644
--- a/makefile.in
+++ b/makefile.in
@@ -326,7 +326,7 @@ config: ;
 #endif
 
 makec:
-	echo 'cd $$1 ; shift ; make "$$@"' > makec
+	echo 'cd $$1 ; shift ; $(MAKE) "$$@"' > makec
 	chmod +x makec
 
 versions: bcc/version.h