diff mbox

[2/2] Makefile export libraries headers

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

Commit Message

Sidney Amani Dec. 18, 2008, 2:16 p.m. UTC
>From 9d61143fdeb85b0239bd8e755114c50a45a151ef Mon Sep 17 00:00:00 2001
From: Sidney Amani <amani_s@epitech.net>
Date: Wed, 17 Dec 2008 12:50:54 +0100
Subject: [PATCH] Makefile export libraries headers

Export headers, if we want to use the previoulsy exported
shared libraries we will need them.

Signed-off-by: Sidney Amani <amani_s@epitech.net>
Signed-off-by: Corentin Chary <chary_c@epitech.net>
---
 ubi-utils/new-utils/Makefile |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

Comments

Mike Frysinger Dec. 18, 2008, 8:25 p.m. UTC | #1
On Thu, Dec 18, 2008 at 09:16, Sidney Amani wrote:
> >From 9d61143fdeb85b0239bd8e755114c50a45a151ef Mon Sep 17 00:00:00 2001
> From: Sidney Amani <amani_s@epitech.net>
> Date: Wed, 17 Dec 2008 12:50:54 +0100
> Subject: [PATCH] Makefile export libraries headers
>
> Export headers, if we want to use the previoulsy exported
> shared libraries we will need them.
>
> Signed-off-by: Sidney Amani <amani_s@epitech.net>
> Signed-off-by: Corentin Chary <chary_c@epitech.net>
> ---
>  ubi-utils/new-utils/Makefile |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/ubi-utils/new-utils/Makefile b/ubi-utils/new-utils/Makefile
> index a975a99..560e391 100644
> --- a/ubi-utils/new-utils/Makefile
> +++ b/ubi-utils/new-utils/Makefile
> @@ -6,7 +6,7 @@ KERNELHDR := ../../include
>  DESTDIR := /usr/local
>  SBINDIR=/usr/sbin
>  MANDIR=/usr/man
> -INCLUDEDIR=/usr/include
> +INCLUDEDIR=/include
>  LIBDIR=/lib
>
>  CC := $(CROSS)gcc
> @@ -74,6 +74,9 @@ clean:
>  install: ${UTILS}
>        mkdir -p ${DESTDIR}/${SBINDIR}
>        install -m 0755 ${UTILS} ${DESTDIR}/${SBINDIR}/
> +       for i in $(addsuffix .h, $(LIBS)); do \
> +               [ -f include/$$i ] &&  install -m 0755 include/$$i  ${DESTDIR}/${LIBDIR}/; \
> +       done

you're installing headers into /usr/lib/ ?  that doesnt make any sense ...
-mike
Corentin Chary Dec. 19, 2008, 9:29 a.m. UTC | #2
>> +       for i in $(addsuffix .h, $(LIBS)); do \
>> +               [ -f include/$$i ] &&  install -m 0755 include/$$i  ${DESTDIR}/${LIBDIR}/; \
>> +       done
>
> you're installing headers into /usr/lib/ ?  that doesnt make any sense ...
> -mike
>

/LIBDIR/INCLUDEDIR/s

It seems that we need to work a ltitle more on theses patch. But it
may be a good idea to wait that the other patch related to the build
system are merged.
Mike Frysinger Dec. 19, 2008, 6:21 p.m. UTC | #3
On Fri, Dec 19, 2008 at 04:29, Corentin Chary wrote:
>>> +       for i in $(addsuffix .h, $(LIBS)); do \
>>> +               [ -f include/$$i ] &&  install -m 0755 include/$$i  ${DESTDIR}/${LIBDIR}/; \
>>> +       done
>>
>> you're installing headers into /usr/lib/ ?  that doesnt make any sense ...
>
> /LIBDIR/INCLUDEDIR/s

well that change doesnt make sense either as you changed INCLUDEDIR to
"/include" ... i'm guessing you'll want to revert that too :)
-mike
Corentin Chary Dec. 19, 2008, 7:42 p.m. UTC | #4
On Fri, Dec 19, 2008 at 7:21 PM, Mike Frysinger <vapier.adi@gmail.com> wrote:
> On Fri, Dec 19, 2008 at 04:29, Corentin Chary wrote:
>>>> +       for i in $(addsuffix .h, $(LIBS)); do \
>>>> +               [ -f include/$$i ] &&  install -m 0755 include/$$i  ${DESTDIR}/${LIBDIR}/; \
>>>> +       done
>>>
>>> you're installing headers into /usr/lib/ ?  that doesnt make any sense ...
>>
>> /LIBDIR/INCLUDEDIR/s
>
> well that change doesnt make sense either as you changed INCLUDEDIR to
> "/include" ... i'm guessing you'll want to revert that too :)
> -mike
>

with DESTDIR=/usr/local -> /usr/local/include
with DESTDIR=/usr -> /usr/include

So it seems ok to me.
Mike Frysinger Dec. 19, 2008, 7:46 p.m. UTC | #5
On Fri, Dec 19, 2008 at 14:42, Corentin Chary wrote:
> On Fri, Dec 19, 2008 at 7:21 PM, Mike Frysinger wrote:
>> On Fri, Dec 19, 2008 at 04:29, Corentin Chary wrote:
>>>>> +       for i in $(addsuffix .h, $(LIBS)); do \
>>>>> +               [ -f include/$$i ] &&  install -m 0755 include/$$i  ${DESTDIR}/${LIBDIR}/; \
>>>>> +       done
>>>>
>>>> you're installing headers into /usr/lib/ ?  that doesnt make any sense ...
>>>
>>> /LIBDIR/INCLUDEDIR/s
>>
>> well that change doesnt make sense either as you changed INCLUDEDIR to
>> "/include" ... i'm guessing you'll want to revert that too :)
>
> with DESTDIR=/usr/local -> /usr/local/include
> with DESTDIR=/usr -> /usr/include
>
> So it seems ok to me.

that isnt how DESTDIR works.  DESTDIR is the root directory, not the
prefix.  so the normal behavior would be:
make DESTDIR=/some/place/temp/ install
cp -r /some/place/temp/* /
and now you have headers in /include/
-mike
Corentin Chary Dec. 19, 2008, 7:52 p.m. UTC | #6
On Fri, Dec 19, 2008 at 8:46 PM, Mike Frysinger <vapier.adi@gmail.com> wrote:
> On Fri, Dec 19, 2008 at 14:42, Corentin Chary wrote:
>> On Fri, Dec 19, 2008 at 7:21 PM, Mike Frysinger wrote:
>>> On Fri, Dec 19, 2008 at 04:29, Corentin Chary wrote:
>>>>>> +       for i in $(addsuffix .h, $(LIBS)); do \
>>>>>> +               [ -f include/$$i ] &&  install -m 0755 include/$$i  ${DESTDIR}/${LIBDIR}/; \
>>>>>> +       done
>>>>>
>>>>> you're installing headers into /usr/lib/ ?  that doesnt make any sense ...
>>>>
>>>> /LIBDIR/INCLUDEDIR/s
>>>
>>> well that change doesnt make sense either as you changed INCLUDEDIR to
>>> "/include" ... i'm guessing you'll want to revert that too :)
>>
>> with DESTDIR=/usr/local -> /usr/local/include
>> with DESTDIR=/usr -> /usr/include
>>
>> So it seems ok to me.
>
> that isnt how DESTDIR works.  DESTDIR is the root directory, not the
> prefix.  so the normal behavior would be:
> make DESTDIR=/some/place/temp/ install
> cp -r /some/place/temp/* /
> and now you have headers in /include/
> -mike
>

Ok, didn't understand DESTDIR that way
diff mbox

Patch

diff --git a/ubi-utils/new-utils/Makefile b/ubi-utils/new-utils/Makefile
index a975a99..560e391 100644
--- a/ubi-utils/new-utils/Makefile
+++ b/ubi-utils/new-utils/Makefile
@@ -6,7 +6,7 @@  KERNELHDR := ../../include
 DESTDIR := /usr/local
 SBINDIR=/usr/sbin
 MANDIR=/usr/man
-INCLUDEDIR=/usr/include
+INCLUDEDIR=/include
 LIBDIR=/lib

 CC := $(CROSS)gcc
@@ -74,6 +74,9 @@  clean:
 install: ${UTILS}
 	mkdir -p ${DESTDIR}/${SBINDIR}
 	install -m 0755 ${UTILS} ${DESTDIR}/${SBINDIR}/
+	for i in $(addsuffix .h, $(LIBS)); do \
+		[ -f include/$$i ] &&  install -m 0755 include/$$i  ${DESTDIR}/${LIBDIR}/; \
+	done
 	for i in $(addsuffix .so, $(LIBS)); do \
 		[ -f $$i ] &&  install -m 0755 $$i  ${DESTDIR}/${LIBDIR}/; \
 	done