Skip to contentSkip to conversation

Document MKDIR_WO_TRAILING_SLASH in Makefile

PATCH Superseded Joachim Schmitz 2 participants 5 messages Jun 15, 2016 Kbuild

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Document MKDIR_WO_TRAILING_SLASH in Makefile

---
 Makefile | 2 ++
 1 file changed, 2 insertions(+)
Makefile +2 -0
index ac49320..03e245a 100644
@@ -90,6 +90,8 @@ all::
 #
 # Define NO_MKDTEMP if you don't have mkdtemp in the C library.
 #
+# Define MKDIR_WO_TRAILING_SLASH if your mkdir() can't deal with trailing slash.
+#
 # Define NO_MKSTEMPS if you don't have mkstemps in the C library.
 #
 # Define NO_STRTOK_R if you don't have strtok_r in the C library.
Signature · 1 line
1.7.12
#1 lore raw
Quoted 10 lines · Joachim Schmitz
---
 Makefile | 2 ++
 1 file changed, 2 insertions(+)
Makefile +0 -0
index ac49320..03e245a 100644

Makefile all:: · line 97

Quoted 8 lines
Makefile +2 -0
@@ -90,6 +90,8 @@ all::
 #
 # Define NO_MKDTEMP if you don't have mkdtemp in the C library.
 #
+# Define MKDIR_WO_TRAILING_SLASH if your mkdir() can't deal with trailing slash.
+#
 # Define NO_MKSTEMPS if you don't have mkstemps in the C library.
 #
 # Define NO_STRTOK_R if you don't have strtok_r in the C library.

Not really. "make MKDIR_WO_TRAILING_SLASH=YesPlease" won't do anything.

You would need at least something like this, no?

 Makefile | 5 +++++
 1 file changed, 5 insertions(+)
Makefile +5 -0
index 66e8216..21b4816 100644
@@ -90,6 +90,8 @@ all::
 #
 # Define NO_MKDTEMP if you don't have mkdtemp in the C library.
 #
+# Define MKDIR_WO_TRAILING_SLASH if your mkdir() can't deal with trailing slash.
+#
 # Define NO_MKSTEMPS if you don't have mkstemps in the C library.
 #
 # Define NO_STRTOK_R if you don't have strtok_r in the C library.
@@ -1639,6 +1641,9 @@ ifdef NO_MKDTEMP
 	COMPAT_CFLAGS += -DNO_MKDTEMP
 	COMPAT_OBJS += compat/mkdtemp.o
 endif
+ifdef MKDIR_WO_TRAILING_SLASH
+	COMPAT_CFLAGS += -DMKDIR_WO_TRAILING_SLASH
+endif
 ifdef NO_MKSTEMPS
 	COMPAT_CFLAGS += -DNO_MKSTEMPS
 endif
#2 lore raw
Quoted 33 lines

-----Original Message-----
From: Junio C Hamano [mailto:[email protected]]
Sent: Friday, September 07, 2012 7:30 PM
To: Joachim Schmitz
Cc: [email protected]
Subject: Re: [PATCH] Document MKDIR_WO_TRAILING_SLASH in Makefile

Quoted 10 lines · Joachim Schmitz
---
 Makefile | 2 ++
 1 file changed, 2 insertions(+)
Makefile +0 -0
index ac49320..03e245a 100644

Makefile all:: · line 97

Quoted 8 lines
Makefile +2 -0
@@ -90,6 +90,8 @@ all::
 #
 # Define NO_MKDTEMP if you don't have mkdtemp in the C library.
 #
+# Define MKDIR_WO_TRAILING_SLASH if your mkdir() can't deal with trailing slash.
+#
 # Define NO_MKSTEMPS if you don't have mkstemps in the C library.
 #
 # Define NO_STRTOK_R if you don't have strtok_r in the C library.

Not really. "make MKDIR_WO_TRAILING_SLASH=YesPlease" won't do anything.

Quoted 2 lines

You would need at least something like this, no?

Yes, that is better, thanks

Quoted 26 lines
 Makefile | 5 +++++
 1 file changed, 5 insertions(+)
Makefile +5 -0
index 66e8216..21b4816 100644
@@ -90,6 +90,8 @@ all::
 #
 # Define NO_MKDTEMP if you don't have mkdtemp in the C library.
 #
+# Define MKDIR_WO_TRAILING_SLASH if your mkdir() can't deal with trailing slash.
+#
 # Define NO_MKSTEMPS if you don't have mkstemps in the C library.
 #
 # Define NO_STRTOK_R if you don't have strtok_r in the C library.
@@ -1639,6 +1641,9 @@ ifdef NO_MKDTEMP
 	COMPAT_CFLAGS += -DNO_MKDTEMP
 	COMPAT_OBJS += compat/mkdtemp.o
 endif
+ifdef MKDIR_WO_TRAILING_SLASH
+	COMPAT_CFLAGS += -DMKDIR_WO_TRAILING_SLASH
+endif
 ifdef NO_MKSTEMPS
 	COMPAT_CFLAGS += -DNO_MKSTEMPS
 endif
#3 lore raw
In reply to Junio C Hamano
Quoted 39 lines

From: Joachim Schmitz [mailto:[email protected]]
Sent: Friday, September 07, 2012 8:28 PM
To: 'Junio C Hamano'
Cc: '[email protected]'
Subject: RE: [PATCH] Document MKDIR_WO_TRAILING_SLASH in Makefile

Quoted 31 lines

-----Original Message-----
From: Junio C Hamano [mailto:[email protected]]
Sent: Friday, September 07, 2012 7:30 PM
To: Joachim Schmitz
Cc: [email protected]
Subject: Re: [PATCH] Document MKDIR_WO_TRAILING_SLASH in Makefile

Quoted 10 lines · Joachim Schmitz
---
 Makefile | 2 ++
 1 file changed, 2 insertions(+)
Makefile +0 -0
index ac49320..03e245a 100644

Makefile all:: · line 97

Quoted 8 lines
Makefile +2 -0
@@ -90,6 +90,8 @@ all::
 #
 # Define NO_MKDTEMP if you don't have mkdtemp in the C library.
 #
+# Define MKDIR_WO_TRAILING_SLASH if your mkdir() can't deal with trailing slash.
+#
 # Define NO_MKSTEMPS if you don't have mkstemps in the C library.
 #
 # Define NO_STRTOK_R if you don't have strtok_r in the C library.

Not really. "make MKDIR_WO_TRAILING_SLASH=YesPlease" won't do anything.

Quoted 4 lines
Quoted 2 lines

You would need at least something like this, no?

Yes, that is better, thanks

There's something missing though, to make it fully usable, see below

Quoted 15 lines
Quoted 15 lines
 Makefile | 5 +++++
 1 file changed, 5 insertions(+)
Makefile +2 -0
index 66e8216..21b4816 100644
@@ -90,6 +90,8 @@ all::
 #
 # Define NO_MKDTEMP if you don't have mkdtemp in the C library.
 #
+# Define MKDIR_WO_TRAILING_SLASH if your mkdir() can't deal with trailing slash.
+#
 # Define NO_MKSTEMPS if you don't have mkstemps in the C library.
Quoted 8 lines

Makefile ifdef NO_MKDTEMP · line 1645

Quoted 8 lines
Makefile +2 -0
 #
 # Define NO_STRTOK_R if you don't have strtok_r in the C library.
@@ -1639,6 +1641,9 @@ ifdef NO_MKDTEMP
 	COMPAT_CFLAGS += -DNO_MKDTEMP
 	COMPAT_OBJS += compat/mkdtemp.o
 endif
+ifdef MKDIR_WO_TRAILING_SLASH
+	COMPAT_CFLAGS += -DMKDIR_WO_TRAILING_SLASH

+ COMPAT_OBJS += compat/mkdir.o

Quoted 4 lines

Makefile ifdef NO_MKDTEMP · line 1649

Quoted 4 lines
Makefile +1 -0
+endif
 ifdef NO_MKSTEMPS
 	COMPAT_CFLAGS += -DNO_MKSTEMPS
 endif

Bye, Jojo