make clean removes excesively

Started by Kyotaro Horiguchiover 6 years ago2 messages
#1Kyotaro Horiguchi
horikyota.ntt@gmail.com
1 attachment(s)

I found the following make's behavior is annoying (at dab81b9953).

make distclean
./configure ....
make all
<succeeds>
make -j4 clean all
relpath.c:21:10: fatal error: catalog/pg_tablespace_d.h: No such file or directory
#include "catalog/pg_tablespace_d.h"

(-j is needed, this happnes for me by -j2)

Just fixing the Makefile for it reveals the next complainer.

I'm not sure that it's the right thing but make got quiet by
moving include to the top in SUBDIRS in src/Makefile.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

Attachments:

0001-Make-src-include-first.patchtext/x-patch; charset=us-asciiDownload
From dab81b99539d9d689e80cb50c914c28c09e5e124 Mon Sep 17 00:00:00 2001
From: Kyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
Date: Wed, 10 Jul 2019 14:48:21 +0900
Subject: [PATCH] Make src/include first

Make complains and stops its work in some directories that requires
some inclue/catalog/*_d.h files when -j is specified. Moving include
to the top of SUBDIRS in the top Makefile to fix it.
---
 src/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/Makefile b/src/Makefile
index bcdbd9588a..a1139d960b 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -12,14 +12,15 @@ subdir = src
 top_builddir = ..
 include Makefile.global
 
+# include is needed to be processed prior to the other subdirs
 SUBDIRS = \
+	include \
 	common \
 	port \
 	timezone \
 	backend \
 	backend/utils/mb/conversion_procs \
 	backend/snowball \
-	include \
 	interfaces \
 	backend/replication/libpqwalreceiver \
 	backend/replication/pgoutput \
-- 
2.16.3

#2Kyotaro Horiguchi
horikyota.ntt@gmail.com
In reply to: Kyotaro Horiguchi (#1)
make -jn fails by requiring not-yet-generated include files.

Sorry, the subject of the previous mail was wrong. I resend it
with the correct subject.

====
I found the following make's behavior is annoying (at dab81b9953).

make distclean
./configure ....
make all
<succeeds>
make -j4 clean all
relpath.c:21:10: fatal error: catalog/pg_tablespace_d.h: No such file or directory
#include "catalog/pg_tablespace_d.h"

(-j is needed, this happnes for me by -j2)

Just fixing the Makefile for it reveals the next complainer.

I'm not sure that it's the right thing but make got quiet by
moving include to the top in SUBDIRS in src/Makefile.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center