diff mbox

Issues with ubi utils Makefile

Message ID AANLkTinDuG62AapBDGvcjjJFUDxQDxcik3zEs2Gkm_st@mail.gmail.com
State New, archived
Headers show

Commit Message

Mike Frysinger Oct. 25, 2010, 8:57 p.m. UTC
On Mon, Oct 25, 2010 at 16:45, Mike Frysinger wrote:
> On Mon, Oct 25, 2010 at 15:03, Artem Bityutskiy wrote:
>> Commit 96a4f76f2e9dad7fdbd6fd7740de44bc90d5769e broke 'make install'.
>> Before that commit, $DESTDIR was undefined, so  ${DESTDIR}/${SBINDIR}
>> was /usr/sbin, and after the commit $DESTDIR became /usr/local, so
>> ${DESTDIR}/${SBINDIR} became /usr/local//usr/sbin, which is wrong.
>
> that isnt really true.  DESTDIR had value in makefiles before my changes.
>
>> Fix this by making $DESTDIR become the distination directory of installing,
>> i.e. 'DESTDIR ?= /usr' and making SBINDIR become just 'sbin'.
>
> i'd rather we change DESTDIR to match the standard -- it's a "root"
> prefix only.  so the default should be:
> DESTDIR ?=

i guess this is also why i never noticed before.  i never do plain
`make install` since i'm not root and i dont want it clobbering
things.  i always do `make install DESTDIR=$PWD/foo` when testing and
in that regard, it works fine.  so i guess we want this simple change:
-mike

Comments

Artem Bityutskiy Oct. 27, 2010, 6:30 p.m. UTC | #1
On Mon, 2010-10-25 at 16:57 -0400, Mike Frysinger wrote:
> On Mon, Oct 25, 2010 at 16:45, Mike Frysinger wrote:
> > On Mon, Oct 25, 2010 at 15:03, Artem Bityutskiy wrote:
> >> Commit 96a4f76f2e9dad7fdbd6fd7740de44bc90d5769e broke 'make install'.
> >> Before that commit, $DESTDIR was undefined, so  ${DESTDIR}/${SBINDIR}
> >> was /usr/sbin, and after the commit $DESTDIR became /usr/local, so
> >> ${DESTDIR}/${SBINDIR} became /usr/local//usr/sbin, which is wrong.
> >
> > that isnt really true.  DESTDIR had value in makefiles before my changes.
> >
> >> Fix this by making $DESTDIR become the distination directory of installing,
> >> i.e. 'DESTDIR ?= /usr' and making SBINDIR become just 'sbin'.
> >
> > i'd rather we change DESTDIR to match the standard -- it's a "root"
> > prefix only.  so the default should be:
> > DESTDIR ?=
> 
> i guess this is also why i never noticed before.  i never do plain
> `make install` since i'm not root and i dont want it clobbering
> things.  i always do `make install DESTDIR=$PWD/foo` when testing and
> in that regard, it works fine.  so i guess we want this simple change:
> --- a/common.mk
> +++ b/common.mk
> @@ -20,7 +20,7 @@ ifneq ($(WITHOUT_LARGEFILE), 1)
>    CPPFLAGS += -D_FILE_OFFSET_BITS=64
>  endif
> 
> -DESTDIR ?= /usr/local
> +DESTDIR?=
>  PREFIX=/usr
>  EXEC_PREFIX=$(PREFIX)
>  SBINDIR=$(EXEC_PREFIX)/sbin

Ok, pushed, made you the author, fabricated your signed-off-by as well.
Thanks.
diff mbox

Patch

--- a/common.mk
+++ b/common.mk
@@ -20,7 +20,7 @@  ifneq ($(WITHOUT_LARGEFILE), 1)
   CPPFLAGS += -D_FILE_OFFSET_BITS=64
 endif

-DESTDIR ?= /usr/local
+DESTDIR?=
 PREFIX=/usr
 EXEC_PREFIX=$(PREFIX)
 SBINDIR=$(EXEC_PREFIX)/sbin