public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Makeconfig: Use $(error ...) to output error message
@ 2020-04-28 22:20 Simon Marchi
  2020-04-28 23:33 ` Joseph Myers
  0 siblings, 1 reply; 8+ messages in thread
From: Simon Marchi @ 2020-04-28 22:20 UTC (permalink / raw)
  To: libc-alpha; +Cc: Simon Marchi

Being not familiar with the glibc repository, I typed "make" inside some
subdirectory that has a Makefile, and was met with:

    $ make
    ../Makeconfig:42: *** missing separator.  Stop.

At Makeconfig:42, we have:

    objdir must be defined by the build-directory Makefile.

Change that to use $(error ...), which I guess was the original
intention.  The result is:

    $ make
    ../Makeconfig:42: *** objdir must be defined by the build-directory Makefile.  Stop.
---
 Makeconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makeconfig b/Makeconfig
index ac567caddc10..dfda418aaccb 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -39,7 +39,7 @@ objpfx := $(patsubst %//,%/,$(objdir)/$(subdir)/)
 common-objpfx = $(objdir)/
 common-objdir = $(objdir)
 else
-objdir must be defined by the build-directory Makefile.
+$(error objdir must be defined by the build-directory Makefile)
 endif
 
 # Root of the sysdeps tree.
-- 
2.26.2


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Makeconfig: Use $(error ...) to output error message
  2020-04-28 22:20 [PATCH] Makeconfig: Use $(error ...) to output error message Simon Marchi
@ 2020-04-28 23:33 ` Joseph Myers
  2020-04-28 23:48   ` Simon Marchi
  0 siblings, 1 reply; 8+ messages in thread
From: Joseph Myers @ 2020-04-28 23:33 UTC (permalink / raw)
  To: Simon Marchi; +Cc: libc-alpha

On Tue, 28 Apr 2020, Simon Marchi via Libc-alpha wrote:

> Being not familiar with the glibc repository, I typed "make" inside some
> subdirectory that has a Makefile, and was met with:
> 
>     $ make
>     ../Makeconfig:42: *** missing separator.  Stop.
> 
> At Makeconfig:42, we have:
> 
>     objdir must be defined by the build-directory Makefile.
> 
> Change that to use $(error ...), which I guess was the original
> intention.  The result is:

This patch is OK.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Makeconfig: Use $(error ...) to output error message
  2020-04-28 23:33 ` Joseph Myers
@ 2020-04-28 23:48   ` Simon Marchi
  2020-04-29  9:25     ` Florian Weimer
  2020-04-30 22:31     ` Maciej W. Rozycki
  0 siblings, 2 replies; 8+ messages in thread
From: Simon Marchi @ 2020-04-28 23:48 UTC (permalink / raw)
  To: Joseph Myers; +Cc: libc-alpha

On 2020-04-28 7:33 p.m., Joseph Myers wrote:
> On Tue, 28 Apr 2020, Simon Marchi via Libc-alpha wrote:
> 
>> Being not familiar with the glibc repository, I typed "make" inside some
>> subdirectory that has a Makefile, and was met with:
>>
>>     $ make
>>     ../Makeconfig:42: *** missing separator.  Stop.
>>
>> At Makeconfig:42, we have:
>>
>>     objdir must be defined by the build-directory Makefile.
>>
>> Change that to use $(error ...), which I guess was the original
>> intention.  The result is:
> 
> This patch is OK.

Thanks, could you please push it for me?  I don't have write access to the
glibc repo (and don't plan to make enough contributions to justify it).

Simon

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Makeconfig: Use $(error ...) to output error message
  2020-04-28 23:48   ` Simon Marchi
@ 2020-04-29  9:25     ` Florian Weimer
  2020-04-29 13:51       ` Simon Marchi
  2020-04-30 22:31     ` Maciej W. Rozycki
  1 sibling, 1 reply; 8+ messages in thread
From: Florian Weimer @ 2020-04-29  9:25 UTC (permalink / raw)
  To: Simon Marchi via Libc-alpha; +Cc: Joseph Myers, Simon Marchi

* Simon Marchi via Libc-alpha:

> On 2020-04-28 7:33 p.m., Joseph Myers wrote:
>> On Tue, 28 Apr 2020, Simon Marchi via Libc-alpha wrote:
>> 
>>> Being not familiar with the glibc repository, I typed "make" inside some
>>> subdirectory that has a Makefile, and was met with:
>>>
>>>     $ make
>>>     ../Makeconfig:42: *** missing separator.  Stop.
>>>
>>> At Makeconfig:42, we have:
>>>
>>>     objdir must be defined by the build-directory Makefile.
>>>
>>> Change that to use $(error ...), which I guess was the original
>>> intention.  The result is:
>> 
>> This patch is OK.
>
> Thanks, could you please push it for me?  I don't have write access to the
> glibc repo (and don't plan to make enough contributions to justify it).

I have pushed this for you, although I don't think the error message
is a clear improvement.  It still does not tell the casual user what
they did wrong.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Makeconfig: Use $(error ...) to output error message
  2020-04-29  9:25     ` Florian Weimer
@ 2020-04-29 13:51       ` Simon Marchi
  0 siblings, 0 replies; 8+ messages in thread
From: Simon Marchi @ 2020-04-29 13:51 UTC (permalink / raw)
  To: Florian Weimer, Simon Marchi via Libc-alpha; +Cc: Joseph Myers

On 2020-04-29 5:25 a.m., Florian Weimer wrote:
> * Simon Marchi via Libc-alpha:
> 
>> On 2020-04-28 7:33 p.m., Joseph Myers wrote:
>>> On Tue, 28 Apr 2020, Simon Marchi via Libc-alpha wrote:
>>>
>>>> Being not familiar with the glibc repository, I typed "make" inside some
>>>> subdirectory that has a Makefile, and was met with:
>>>>
>>>>     $ make
>>>>     ../Makeconfig:42: *** missing separator.  Stop.
>>>>
>>>> At Makeconfig:42, we have:
>>>>
>>>>     objdir must be defined by the build-directory Makefile.
>>>>
>>>> Change that to use $(error ...), which I guess was the original
>>>> intention.  The result is:
>>>
>>> This patch is OK.
>>
>> Thanks, could you please push it for me?  I don't have write access to the
>> glibc repo (and don't plan to make enough contributions to justify it).
> 
> I have pushed this for you, although I don't think the error message
> is a clear improvement.  It still does not tell the casual user what
> they did wrong.
> 

Right, I thought about displaying the error message, not so much about the error
message itself.  You are probably better placed than I am to come up with a
meaningful error message, but here's my proposal:

  $(error You must run `make` in the build directory, not the source directory)

Simon

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Makeconfig: Use $(error ...) to output error message
  2020-04-28 23:48   ` Simon Marchi
  2020-04-29  9:25     ` Florian Weimer
@ 2020-04-30 22:31     ` Maciej W. Rozycki
  2020-05-01  0:22       ` Simon Marchi
  2020-05-01 16:20       ` Florian Weimer
  1 sibling, 2 replies; 8+ messages in thread
From: Maciej W. Rozycki @ 2020-04-30 22:31 UTC (permalink / raw)
  To: Simon Marchi; +Cc: Joseph Myers, libc-alpha

Hi Simon,

> Thanks, could you please push it for me?  I don't have write access to the
> glibc repo (and don't plan to make enough contributions to justify it).

 FTR I don't think you need any additional credentials to push to any of 
the repos hosted at sourceware as long as you have an account there, and 
obviously you do.

  Maciej

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Makeconfig: Use $(error ...) to output error message
  2020-04-30 22:31     ` Maciej W. Rozycki
@ 2020-05-01  0:22       ` Simon Marchi
  2020-05-01 16:20       ` Florian Weimer
  1 sibling, 0 replies; 8+ messages in thread
From: Simon Marchi @ 2020-05-01  0:22 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: Joseph Myers, libc-alpha

On 2020-04-30 6:31 p.m., Maciej W. Rozycki wrote:
> Hi Simon,
> 
>> Thanks, could you please push it for me?  I don't have write access to the
>> glibc repo (and don't plan to make enough contributions to justify it).
> 
>  FTR I don't think you need any additional credentials to push to any of 
> the repos hosted at sourceware as long as you have an account there, and 
> obviously you do.
> 
>   Maciej
> 

Oh, maybe you are right, I was able to fetch from ssh://sourceware.org/git/glibc.git.

Simon

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] Makeconfig: Use $(error ...) to output error message
  2020-04-30 22:31     ` Maciej W. Rozycki
  2020-05-01  0:22       ` Simon Marchi
@ 2020-05-01 16:20       ` Florian Weimer
  1 sibling, 0 replies; 8+ messages in thread
From: Florian Weimer @ 2020-05-01 16:20 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: Simon Marchi, libc-alpha, Joseph Myers

* Maciej W. Rozycki:

> Hi Simon,
>
>> Thanks, could you please push it for me?  I don't have write access to the
>> glibc repo (and don't plan to make enough contributions to justify it).
>
>  FTR I don't think you need any additional credentials to push to any of 
> the repos hosted at sourceware as long as you have an account there, and 
> obviously you do.

You need to be added to the project-specific POSIX group, though.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-05-01 16:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-28 22:20 [PATCH] Makeconfig: Use $(error ...) to output error message Simon Marchi
2020-04-28 23:33 ` Joseph Myers
2020-04-28 23:48   ` Simon Marchi
2020-04-29  9:25     ` Florian Weimer
2020-04-29 13:51       ` Simon Marchi
2020-04-30 22:31     ` Maciej W. Rozycki
2020-05-01  0:22       ` Simon Marchi
2020-05-01 16:20       ` Florian Weimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).