patches/dmalloc/5.5.2/150-use_DESTDIR.patch
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Sun May 11 13:38:12 2014 +0200 (2014-05-11)
changeset 3313 ad14212ebf54
parent 103 b6e20abe9256
permissions -rw-r--r--
config: switch cc with libc in the config order

Some of the compiler options depend on the C library choice, (e.g.
whether core passes are needed).

Since the compiler menu comes before the C library menu, those options
may or may not be visible until the C library is chosen, leading to
either options being visible by the user (thus be puzzling as they would
not apply to his case), or invisible to him (yet again puzzling him).

Invert the order of the compiler and the C library in the menuconfig. It
anyway looks more rational, in the end.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
     1 Make install rules use DESTDIR.
     2 Split installation of the utilitity from the global install.
     3 
     4 Copyright 2007 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
     5 Licensed to you as dmalloc-5.5.2 is.
     6 
     7 diff -dur dmalloc-5.5.2.orig/Makefile.in dmalloc-5.5.2/Makefile.in
     8 --- dmalloc-5.5.2.orig/Makefile.in	2007-05-18 16:03:31.000000000 +0200
     9 +++ dmalloc-5.5.2/Makefile.in	2007-05-18 16:22:59.000000000 +0200
    10 @@ -174,66 +174,67 @@
    11  #	rm -f configure
    12  
    13  installdirs :
    14 -	$(srcdir)/mkinstalldirs $(includedir) $(libdir) $(bindir)
    15 +	$(srcdir)/mkinstalldirs $(DESTDIR)/$(includedir) $(DESTDIR)/$(libdir) $(DESTDIR)/$(bindir)
    16  
    17  installincs : $(HFLS)
    18 -	$(srcdir)/mkinstalldirs $(includedir)
    19 -	$(INSTALL_DATA) $(HFLS) $(includedir)
    20 +	$(srcdir)/mkinstalldirs $(DESTDIR)/$(includedir)
    21 +	$(INSTALL_DATA) $(HFLS) $(DESTDIR)/$(includedir)
    22  
    23  installthsl : $(LIB_TH_SL)
    24 -	$(srcdir)/mkinstalldirs $(libdir)
    25 -	$(INSTALL_PROGRAM) $(LIB_TH_SL) $(libdir)
    26 +	$(srcdir)/mkinstalldirs $(DESTDIR)/$(libdir)
    27 +	$(INSTALL_PROGRAM) $(LIB_TH_SL) $(DESTDIR)/$(libdir)
    28  
    29  installth : $(INSTALL_THREADS)
    30 -	$(srcdir)/mkinstalldirs $(libdir)
    31 -	$(INSTALL_PROGRAM) $(LIB_TH) $(libdir)
    32 +	$(srcdir)/mkinstalldirs $(DESTDIR)/$(libdir)
    33 +	$(INSTALL_PROGRAM) $(LIB_TH) $(DESTDIR)/$(libdir)
    34  @CXX_OFF@	@echo "Enter 'make installthcxx' to install the threaded C++ library"
    35  @SL_OFF@	@echo "Enter 'make installthsl' to install the threaded shared-library"
    36  
    37  installthcxxsl : $(LIB_TH_CXX_SL)
    38 -	$(srcdir)/mkinstalldirs $(shlibdir)
    39 -	$(INSTALL_PROGRAM) $(LIB_TH_CXX_SL) $(shlibdir)
    40 +	$(srcdir)/mkinstalldirs $(DESTDIR)/$(shlibdir)
    41 +	$(INSTALL_PROGRAM) $(LIB_TH_CXX_SL) $(DESTDIR)/$(shlibdir)
    42  
    43  installthcxx : $(INSTALL_TH_CXX)
    44 -	$(srcdir)/mkinstalldirs $(libdir)
    45 -	$(INSTALL_PROGRAM) $(LIB_TH_CXX) $(libdir)
    46 +	$(srcdir)/mkinstalldirs $(DESTDIR)/$(libdir)
    47 +	$(INSTALL_PROGRAM) $(LIB_TH_CXX) $(DESTDIR)/$(libdir)
    48  @SL_OFF@	@echo "Enter 'make installthcxxsl' to install the threaded C++ shared-library"
    49  
    50  installcxxsl : $(LIB_CXX_SL)
    51 -	$(srcdir)/mkinstalldirs $(libdir)
    52 -	$(INSTALL_PROGRAM) $(LIB_CXX_SL) $(libdir)
    53 +	$(srcdir)/mkinstalldirs $(DESTDIR)/$(libdir)
    54 +	$(INSTALL_PROGRAM) $(LIB_CXX_SL) $(DESTDIR)/$(libdir)
    55  
    56  installcxx : $(INSTALL_CXX)
    57 -	$(srcdir)/mkinstalldirs $(libdir)
    58 -	$(INSTALL_PROGRAM) $(LIB_CXX) $(libdir)
    59 +	$(srcdir)/mkinstalldirs $(DESTDIR)/$(libdir)
    60 +	$(INSTALL_PROGRAM) $(LIB_CXX) $(DESTDIR)/$(libdir)
    61  @TH_OFF@	@echo "Enter 'make installthcxx' to install the threaded C++ library"
    62  @SL_OFF@	@echo "Enter 'make installcxxsl' to install the C++ shared-library"
    63  
    64  installsl : $(LIB_SL)
    65 -	$(srcdir)/mkinstalldirs $(shlibdir)
    66 -	$(INSTALL_PROGRAM) $(LIB_SL) $(shlibdir)
    67 +	$(srcdir)/mkinstalldirs $(DESTDIR)/$(shlibdir)
    68 +	$(INSTALL_PROGRAM) $(LIB_SL) $(DESTDIR)/$(shlibdir)
    69  @CXX_OFF@	@echo "Enter 'make installcxxsl' to install the C++ shared-library"
    70  @TH_OFF@	@echo "Enter 'make installthsl' to install thread shared-library"
    71  
    72  installlib : $(INSTALL_LIB)
    73 -	$(srcdir)/mkinstalldirs $(libdir)
    74 -	$(INSTALL_PROGRAM) $(LIBRARY) $(libdir)
    75 -	@RANLIB@ $(libdir)/$(LIBRARY)
    76 +	$(srcdir)/mkinstalldirs $(DESTDIR)/$(libdir)
    77 +	$(INSTALL_PROGRAM) $(LIBRARY) $(DESTDIR)/$(libdir)
    78 +	@RANLIB@ $(DESTDIR)/$(libdir)/$(LIBRARY)
    79  @SL_OFF@	@echo "Enter 'make installsl' to install $(LIB_SL) in $(shlibdir)"
    80  @CXX_OFF@	@echo "Enter 'make installcxx' to install the C++ library"
    81  @TH_OFF@	@echo "Enter 'make installth' to install thread library"
    82  
    83  installdocs : $(srcdir)/docs/$(HTMLFILE) $(srcdir)/docs/$(TEXIFILE) \
    84  		$(srcdir)/docs/$(PDFFILE)
    85 -	$(srcdir)/mkinstalldirs $(docdir)
    86 -	$(INSTALL_DATA) $(srcdir)/docs/$(HTMLFILE) $(docdir)
    87 -	$(INSTALL_DATA) $(srcdir)/docs/$(TEXIFILE) $(docdir)
    88 -	$(INSTALL_DATA) $(srcdir)/docs/$(PDFFILE) $(docdir)
    89 +	$(srcdir)/mkinstalldirs $(DESTDIR)/$(docdir)
    90 +	$(INSTALL_DATA) $(srcdir)/docs/$(HTMLFILE) $(DESTDIR)/$(docdir)
    91 +	$(INSTALL_DATA) $(srcdir)/docs/$(TEXIFILE) $(DESTDIR)/$(docdir)
    92 +	$(INSTALL_DATA) $(srcdir)/docs/$(PDFFILE) $(DESTDIR)/$(docdir)
    93  
    94 -install : installincs installlib $(UTIL)
    95 -	$(srcdir)/mkinstalldirs $(bindir)
    96 -	$(INSTALL_PROGRAM) $(UTIL) $(bindir)
    97 -	@echo "Enter 'make installdocs' to install $(DOCFILES) in $(docdir)"
    98 +installutil : $(UTIL)
    99 +	$(srcdir)/mkinstalldirs $(DESTDIR)/$(bindir)
   100 +	$(INSTALL_PROGRAM) $(UTIL) $(DESTDIR)/$(bindir)
   101 +
   102 +install : installincs installlib installutil installdocs
   103  
   104  dmalloc.h.2 : $(srcdir)/configure
   105  	$(SHELL) $(srcdir)/configure