bug-libunistring
[Top][All Lists]
Advanced

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

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


From: Bruno Haible
Subject: Re: [bug-libunistring] Small "make install" problem
Date: Sun, 2 May 2010 20:46:54 +0200
User-agent: KMail/1.9.9

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)
        @$(NORMAL_INSTALL)
        test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
        @list='$(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




reply via email to

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