bug-automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: [bug-libunistring] Small "make install" problem


From: Reuben Thomas
Subject: Fwd: [bug-libunistring] Small "make install" problem
Date: Mon, 3 May 2010 22:07:47 +0100

automake's make install seems to create directories using mkdir when
it should use install to get the permissions right. Thanks to Bruno
Haible for the analysis below.


---------- Forwarded message ----------
From: Bruno Haible <address@hidden>
Date: 2 May 2010 19:46:54 UTC+1
Subject: Re: [bug-libunistring] Small "make install" problem
To: address@hidden
Cc: Reuben Thomas <address@hidden>


Hi,

Reuben Thomas wrote in
<http://lists.gnu.org/archive/html/bug-libunistring/2010-04/msg00002.html>:
> When I "sudo make install 0.9.2.1", where my user's umask is 0027, all
> of the files are installed with correct (world-readable & executable
> as necessary) permissions, but the unistring include directory itself
> is created with my user's umask (i.e. with perms 0770), although the
> files in it are created correctly world readable (0644).

This comes from the MKDIR_P and INSTALL_DATA values that are substituted
in lib/Makefile. On my system I see

 MKDIR_P = /arch/x86-linux/gnu/bin/mkdir -p
 INSTALL = /arch/x86-linux/gnu/bin/install -c
 INSTALL_DATA = ${INSTALL} -m 644
 INSTALL_PROGRAM = ${INSTALL}
 INSTALL_SCRIPT = ${INSTALL}

which explains why the creation of a subdirectory is sensitive to your
umask and the creation of installed files is not.

The code which creates the installation directory is found in
lib/Makefile.in, generated by Automake:

install-nobase_includeHEADERS: $(nobase_include_HEADERS)
      address@hidden(NORMAL_INSTALL)
       test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
      address@hidden'$(nobase_include_HEADERS)'; test -n "$(includedir)" || 
list=; \
       $(am__nobase_list) | while read dir files; do \
         xfiles=; for file in $$files; do \
           if test -f "$$file"; then xfiles="$$xfiles $$file"; \
           else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \
         test -z "$$xfiles" || { \
           test "x$$dir" = x. || { \
             echo "$(MKDIR_P) '$(DESTDIR)$(includedir)/$$dir'"; \
             $(MKDIR_P) "$(DESTDIR)$(includedir)/$$dir"; }; \
           echo " $(INSTALL_HEADER) $$xfiles '$(DESTDIR)$(includedir)/$$dir'"; \
           $(INSTALL_HEADER) $$xfiles "$(DESTDIR)$(includedir)/$$dir"
|| exit $$?; }; \
       done

As you can see, it uses $(MKDIR_P). If it were to use instead
 $(install_sh) -d -m 0755
it would behave as you wish.

Please report this to the bug-automake mailing list.

Bruno



-- 
http://rrt.sc3d.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]