patches/duma/2_5_1/100-cross-compile.patch
author Anthony Foiani <anthony.foiani@gmail.com>
Thu Apr 26 19:55:59 2012 -0600 (2012-04-26)
changeset 2939 58974be61289
parent 236 42650dc4e95e
permissions -rw-r--r--
Allow multi-word "install" command.

Autoconf can determine that the correct install command includes flags,
e.g., "/usr/bin/install -c". When using this as a command, we can't
enclose the value in double-quotes, as that makes some shells use the
whole expression as a filename:

# this is the value returned by autoconf and stored in CT_install
$ ins="/usr/bin/install -c"

# if we call it with quotes, the command is not found
$ "${ins}"
bash: /usr/bin/install -c: No such file or directory

# removing the quotes lets it work as expected
$ ${ins}
/usr/bin/install: missing file operand
Try `/usr/bin/install --help' for more information.

Signed-Off-By: Anthony Foiani <anthony.foiani@gmail.com>
yann@236
     1
diff -dur duma_2_5_1/Makefile duma_2_5_1.orig/Makefile
yann@236
     2
--- duma_2_5_1/Makefile	2006-06-18 06:02:13.000000000 +0200
yann@236
     3
+++ duma_2_5_1.orig/Makefile	2007-07-11 17:49:43.000000000 +0200
yann@236
     4
@@ -98,10 +98,6 @@
yann@236
     5
   LIBS=-lpthread
yann@236
     6
 endif
yann@236
     7
 
yann@236
     8
-
yann@236
     9
-CC=gcc
yann@236
    10
-CXX=g++
yann@236
    11
-AR=ar
yann@236
    12
 INSTALL=install
yann@236
    13
 
yann@236
    14
 ############################################################
yann@369
    15
@@ -169,7 +165,7 @@
yann@236
    16
 
yann@236
    17
 createconf: createconf.o
yann@236
    18
 	- rm -f createconf
yann@236
    19
-	$(CC) $(CFLAGS) $(DUMA_OPTIONS) createconf.o -o createconf
yann@369
    20
+	$(HOSTCC) $(HOSTCFLAGS) $(DUMA_OPTIONS) createconf.o -o createconf
yann@236
    21
 
yann@236
    22
 tstheap: libduma.a tstheap.o
yann@236
    23
 	- rm -f tstheap
yann@236
    24
@@ -211,7 +207,7 @@
yann@236
    25
 # define rules how to build objects for createconf
yann@236
    26
 #
yann@236
    27
 createconf.o:
yann@236
    28
-	$(CC) $(CFLAGS) $(DUMA_OPTIONS) -c createconf.c -o $@
yann@369
    29
+	$(HOSTCC) $(HOSTCFLAGS) $(DUMA_OPTIONS) -c createconf.c -o $@
yann@236
    30
 
yann@236
    31
 
yann@236
    32
 #