[PATCH libXt] Use $(MKDIR_P) in Makefile.am for better code portability

Alan Coopersmith alan.coopersmith at oracle.com
Sun Sep 22 08:13:30 PDT 2013


On 09/22/13 06:20 AM, Gaetan Nadon wrote:
> On 13-09-21 01:48 PM, Alan Coopersmith wrote:
>> On 09/21/13 09:58 AM, Gaetan Nadon wrote:
>>> Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
>>> ---
>>>   src/Makefile.am |    4 ++--
>>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/src/Makefile.am b/src/Makefile.am
>>> index a466ae5..8c1a664 100644
>>> --- a/src/Makefile.am
>>> +++ b/src/Makefile.am
>>> @@ -98,8 +98,8 @@ $(BUILT_HEADER): $(BUILT_SOURCE)
>>>
>>>   $(BUILT_SOURCE):
>>>       $(AM_V_GEN)$(top_builddir)/util/makestrs -i $(top_srcdir)
>>> $(STRINGSABIOPTIONS) < $(STRING_LIST) > StringDefs.c
>>> -    $(AM_V_at)mkdir -p $(top_builddir)/src
>>> -    $(AM_V_at)mkdir -p $(top_builddir)/include/X11
>>> +    $(AM_V_at)$(MKDIR_P) $(top_builddir)/src
>>> +    $(AM_V_at)$(MKDIR_P) $(top_builddir)/include/X11
>>>       $(AM_V_at)cp StringDefs.h $(top_builddir)/include/X11
>>>       $(AM_V_at)cp Shell.h $(top_builddir)/include/X11
>>>       $(AM_V_at)rm StringDefs.h Shell.h
>>>
>>
>> Do we need to add AC_PROG_MKDIR_P to configure.ac or xorg-macros, or does
>> automake automatically call it already?
>>
> AC_PROG_MKDIR_P gets included very early in configure.ac, by AM_INIT_AUTOMAKE or
> something.
>
> It writes this line on the terminal when running autogen.sh:
>
>     checking for a thread-safe mkdir -p... /bin/mkdir -p
>
> All X.Org modules have $(MKDIR_P) defined in the generated Makefile.

I thought I'd seen it in many of our modules, just wasn't sure why.
If it's always there, that works for me.

Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>

-- 
	-Alan Coopersmith-              alan.coopersmith at oracle.com
	 Oracle Solaris Engineering - http://blogs.oracle.com/alanc


More information about the xorg-devel mailing list