Re: [ANNOUNCE] util-linux-ng v2.16-rc2

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

 



On Fri, Jul 03, 2009 at 02:08:31PM +0200, Peter Breitenlohner wrote:
> On Fri, 3 Jul 2009, Juergen Daubert wrote:
>
>> -# move devel files from $(libdir) to $(usrlibexecdir) if needed
>> +# move lib from $(usrlibexecdir) to $(libdir) if needed
>> install-data-hook:
>> -	rm  $(DESTDIR)$(libdir)/$(lib_LTLIBRARIES)
>> 	if test "$(usrlibexecdir)" != "$(libdir)"; then \
>> -		mkdir -p $(DESTDIR)$(usrlibexecdir); \
>> -		mv $(DESTDIR)$(libdir)/libblkid.a $(DESTDIR)$(usrlibexecdir)/; \
>> -		so_img_name=$$(readlink $(DESTDIR)$(libdir)/libblkid.so); \
>> -		rm $(DESTDIR)$(libdir)/libblkid.so; \
>> +		mkdir -p $(DESTDIR)$(libdir); \
>> +		so_img_name=$$(readlink $(DESTDIR)$(usrlibexecdir)/libblkid.so); \
>> 		so_img_rel_target=$$(echo $(usrlibexecdir) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \
>> -		ln -sf  $$so_img_rel_target$(libdir)/$$so_img_name \
>> -			$(DESTDIR)$(usrlibexecdir)/libblkid.so; \
>> +		ln -sf  $$so_img_rel_target$(libdir)/$$so_img_name $(DESTDIR)$(usrlibexecdir)/libblkid.so; \
>> +		mv $(DESTDIR)$(usrlibexecdir)/libblkid.so.* $(DESTDIR)$(libdir); \
>> 	fi
>
> Two objections:
>
> (1) This belongs to install-exec-hook instead of install-data-hook because

 yes, exactly. I found it few minutes ago. The nice test is to try
 "make install-data" or "make install-exec" (fortunately this is not
 tested by "make distcheck").

> *_LTLIBRARIES are installed as part of install-exec.

I think the exec or data category is mostly based on target directory.
http://www.gnu.org/software/hello/manual/automake/The-Two-Parts-of-Install.html#The-Two-Parts-of-Install

> (2) You probably should use $(LN_S) instead of 'ln -sf' and create symlinks
> from within the target directory (too many things can go wrong otherwise).
> The Automake manual recommends something like:
> 	(cd $(DESTDIR)$(usrlibexecdir) && \
>             rm -f libblkid.so && \
>             $(LN_S) $$so_img_rel_target$(libdir)/$$so_img_name libblkid.so) && \
> 	mv $(DESTDIR)$(usrlibexecdir)/libblkid.so.* $(DESTDIR)$(libdir); \
>
> The use of CMD && CMD should propagate errors.

 Good point. Thanks.

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux