blob: 0270a2845b867789cfbb4b54da0d629a7eaff51b (
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
|
$NetBSD: patch-config_common__make__rules,v 1.3 2019/09/07 11:42:49 nia Exp $
hunk 1:
Don't use a platform-specific build directory to make installation
easier.
hunk 2:
Work around PR 48385, a tmpfs bug that combined with this package's
build system causes gmake 4.0 to loop forever making depend.
The problem in tmpfs, which assigns file and directory timestamps
lazily and therefore frequently out of order, gets tickled because the
depend file depends on the directory containing it.
It is, in any event, almost never a good idea to depend on directories
in makefiles. The workaround is to not do that and explicitly run a
sub-make to create the object directory.
--- config/common_make_rules.orig 2017-10-21 14:01:07.000000000 +0000
+++ config/common_make_rules
@@ -55,7 +55,7 @@ CFLAGS += $(EXTRA_CC_FLAGS) $(OPT) $(DBG
TARGET_PLATFORM=$(TARGET_CPU)-$(TARGET_OS)
HOST_PLATFORM=$(HOST_CPU)-$(HOST_OS)
ifndef BUILDDIR
-BUILDDIR=$(TOP)/build/$(TARGET_PLATFORM)
+BUILDDIR=$(TOP)/build/platform
endif
OBJDIR=$(BUILDDIR)/obj/$(DIRNAME)
BINDIR=$(BUILDDIR)/bin
@@ -172,8 +172,11 @@ ifdef ALL_DIRS
done
endif
-$(DEPEND): $(SRCS) $(OBJDIR)
+$(DEPEND): $(SRCS)
ifdef BUILD_DIRS
+ @ echo Doing implicit make depend.
+ @ touch $(DEPEND)
+ @ $(MAKE) $(OBJDIR)
@ rm -f $(DEPEND)
@ for i in $(SRCS) ; \
do \
|