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

Re: [Xen-devel] [PATCH 2/9] tools/build: fix pygrub linking



Ian Jackson wrote:
> Roger Pau Monne writes ("Re: [PATCH 2/9] tools/build: fix pygrub linking"):
>> Ian Jackson wrote:
>>> Roger Pau Monne writes ("Re: [PATCH 2/9] tools/build: fix pygrub linking"):
>>>> Ian Jackson wrote:
>>>>> If DESTDIR is not "" then $(PRIVATE_BINDIR)/pygrub is not the same
>>>>> directory as $(DESTDIR)/$(BINDIR).
>>>> Ok, both conditions have to be meet, that DESTDIR == "" and
>>>> PRIVATE_BINDIR == BINDIR (so $(DESTDIR)/$(BINDIR) == $(PRIVATE_BINDIR)).
>>> Right.  OK.  I see now why my test -e is wrong.
>>>
>>> But I still think this should be done with an if in the rule's
>>> command, rather than a makefile conditional.
>> What do you think about:
>>
>> set -e; if [ `readlink -f $(DESTDIR)/$(BINDIR)` != \
>>              `readlink -f $(PRIVATE_BINDIR)` ]; then \
>>                 ln -sf $(PRIVATE_BINDIR)/pygrub $(DESTDIR)/$(BINDIR); \
>> fi
> 
> That looks plausible.
> 
> Can we assume that we are using bash as our shell for these commands ?
> If so we can use `test A -ef B'.

I wouldn't make such an assumption, I've build Xen on systems without
bash (Alpine Linux and NetBSD).


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.