Hi Daniel,

On Thu, 2008-10-16 at 23:07 +0200, Daniel Gollub wrote:
> plain text document attachment (buildenv-destdir.patch)
> Introduced PREFIX and LIBSUFFIX variables.
> 
> DESTDIR is often used within packaging scripts/spec files. Use PREFIX
> variable instead to manipulate the installation destination directory.
> 
> Introduced LIBSUFFIX to allow to manipulate library directory to lib64
> e.g. for distribution packaging for x86_64 or others architectures.
> 
> Signed-off-by: Daniel Gollub <[EMAIL PROTECTED]>
> 
> ---
>  doc/man1/Makefile |    4 ++--
>  doc/man3/Makefile |    4 ++--
>  include/Makefile  |    4 ++--
>  lib/Makefile      |    6 +++---
>  pan/Makefile      |    8 ++++----
>  5 files changed, 13 insertions(+), 13 deletions(-)
> 
> Index: ltp-full-20080825/pan/Makefile
> ===================================================================
> --- ltp-full-20080825.orig/pan/Makefile
> +++ ltp-full-20080825/pan/Makefile
> @@ -2,7 +2,7 @@
>  LOADLIBES += -lm
>  LFLAGS += -l
>  CFLAGS += -w 
> -DESTDIR = /opt/ltp
> +PREFIX = /opt/ltp
> 
>  all: pan bump scanner
> 
> @@ -16,9 +16,9 @@ scanner: scan.o scanner.o reporter.o tag
> 
> 
>  install: pan bump scanner
> -     install -D scanner $(DESTDIR)/bin/scanner
> -     install -D pan $(DESTDIR)/bin/pan
> -     install -D bump $(DESTDIR)/bin/bump
> +     install -D scanner $(DESTDIR)/$(PREFIX)/bin/scanner
> +     install -D pan $(DESTDIR)/$(PREFIX)/bin/pan
> +     install -D bump $(DESTDIR)/$(PREFIX)/bin/bump

Should the above not be:

+       install -D scanner $(PREFIX)/bin/scanner
+       install -D pan $(PREFIX)/bin/pan
+       install -D bump $(PREFIX)/bin/bump


> 
>  clean:
>       rm -f *.o pan bump scanner
> Index: ltp-full-20080825/include/Makefile
> ===================================================================
> --- ltp-full-20080825.orig/include/Makefile
> +++ ltp-full-20080825/include/Makefile
> @@ -1,6 +1,6 @@
> 
> 
> -DESTDIR=/opt/ltp
> +PREFIX=/opt/ltp
>  HEADERS=compiler.h dataascii.h databin.h file_lock.h forker.h open_flags.h \
>       pattern.h random_range.h rmobj.h search_path.h string_to_tokens.h \
>       str_to_bytes.h test.h tlibio.h usctest.h write_log.h \
> @@ -10,6 +10,6 @@ all:
> 
>  install: $(HEADERS)
>       for i in $(HEADERS); do \
> -             install -D -m 644 $$i $(DESTDIR)/include/$$i; \
> +             install -D -m 644 $$i $(DESTDIR)/$(PREFIX)/include/ltp/$$i; \

Here:
+               install -D -m 644 $$i $(PREFIX)/include/ltp/$$i; \

>       done
> 
> Index: ltp-full-20080825/lib/Makefile
> ===================================================================
> --- ltp-full-20080825.orig/lib/Makefile
> +++ ltp-full-20080825/lib/Makefile
> @@ -1,5 +1,5 @@
> 
> -DESTDIR=/opt/ltp
> +PREFIX=/opt/ltp
> 
>  CFLAGS+= -Wall
>  CFLAGS+= -D_USC_LIB_
> @@ -20,6 +20,6 @@ clean:
>       rm -f $(TARGET) $(OBJS)
> 
>  install: $(TARGET)
> -     install -D $(TARGET) $(DESTDIR)/lib/$(TARGET)
> -     install -D ltp.pc /usr/share/pkgconfig/ltp.pc
> +     install -D $(TARGET) $(DESTDIR)/$(PREFIX)/lib$(LIBSUFFIX)/$(TARGET)
> +     install -D ltp.pc $(DESTDIR)/$(PREFIX)/share/pkgconfig/ltp.pc

Here:

+       install -D $(TARGET) $(PREFIX)/lib$(LIBSUFFIX)/$(TARGET)
+       install -D ltp.pc $(PREFIX)/share/pkgconfig/ltp.pc

> 
> Index: ltp-full-20080825/doc/man3/Makefile
> ===================================================================
> --- ltp-full-20080825.orig/doc/man3/Makefile
> +++ ltp-full-20080825/doc/man3/Makefile
> @@ -1,6 +1,6 @@
> 
> 
> -DESTDIR=/usr
> +PREFIX=/usr
>  MANPAGES=forker.3 get_attrib.3 parse_open_flags.3 parse_opts.3 \
>       parse_ranges.3 pattern.3 random_range.3 random_range_seed.3 \
>       rmobj.3 string_to_tokens.3 str_to_bytes.3 tst_res.3 \
> @@ -10,6 +10,6 @@ all:
> 
>  install: $(MANPAGES)
>       for i in $(MANPAGES); do \
> -             install -D -m 644 $$i $(DESTDIR)/share/man/man3/$$i; \
> +             install -D -m 644 $$i $(DESTDIR)/$(PREFIX)/share/man/man3/$$i; \

Here:
+               install -D -m 644 $$i $(PREFIX)/share/man/man3/$$i; \

>       done
> 
> Index: ltp-full-20080825/doc/man1/Makefile
> ===================================================================
> --- ltp-full-20080825.orig/doc/man1/Makefile
> +++ ltp-full-20080825/doc/man1/Makefile
> @@ -1,12 +1,12 @@
> 
> 
> -DESTDIR=/usr
> +PREFIX=/usr
>  MANPAGES=bump.1 doio.1 iogen.1 pan.1
> 
>  all:
> 
>  install: $(MANPAGES)
>       for i in $(MANPAGES); do \
> -             install -D -m 644 $$i $(DESTDIR)/share/man/man1/$$i; \
> +             install -D -m 644 $$i $(DESTDIR)/$(PREFIX)/share/man/man1/$$i; \

And here:
+               install -D -m 644 $$i $(PREFIX)/share/man/man1/$$i; \

>       done
> 
> 

Regards--
Subrata

> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Ltp-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ltp-list


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to