This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Create multiple directory through fixinc.in script.


On 08/01/2016 08:55 AM, mbilal wrote:
Hi,

This patch fixes the mkheaders directory creation. It failed to create
the multiple multilib directory on some cases.
e.g
For i686-pc-linux-gnu target config, I have following 'fixinc_list' for
multilibs.

/system32;
/system64;/64
/sgxx-glibc;/sgxx-glibc
/sgxx-glibc;/64/sgxx-glibc
/sgxx-glibc;/x32/sgxx-glibc

Now, mkheaders failed to create fixed include directory for the case of
 '/sgxx-glibc;/x32/sgxx-glibc'.
here fixinc.sh tries to make 'mkdir <include-dir>/x32/sgxx-glibc' and
failed because parent 'x32' directory doesn't exist. (we defined
MULTILIB_EXCEPTIONS for x32 directory)


Following patch fixes the problem.

fixincludes/ChangeLog:
2016-08-01  Muhammad Bilal  <mbilal@codesourcery.com>

        * fixinc.in: Use --parents option to make LIB directory.
OK. Please install if you have permissions. If not, let me know and I'll do the commit.



Index: fixincludes/fixinc.in
===================================================================
--- fixincludes/fixinc.in    (revision 238952)
+++ fixincludes/fixinc.in    (working copy)
@@ -41,7 +41,7 @@

 # Make sure it exists.
 if [ ! -d $LIB ]; then
-  mkdir $LIB || {
+  mkdir -p $LIB || {
     echo fixincludes:  output dir '`'$LIB"' cannot be created"
     exit 1
   }


I think 'mkdir -p' option is now portable as I'm seeing that
mkinstalldirs script also uses 'mkdir -p' options.
Right. I actually double-checked and -p is part of the current posix specification.

Thanks,
Jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]