bug-automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[WISH] Local target in cross compialtion


From: Jérôme Pouiller
Subject: [WISH] Local target in cross compialtion
Date: Tue, 6 Jun 2006 18:52:50 +0200
User-agent: KMail/1.9.1

Hi,

I have made research in automake documentation/ML, but, I have not found 
any solution to compile binary for local host (used, for exemple, to 
build some headers) in a project configured for cross compilation.
The best solution I found is :

data.h: $(genData_SOURCES)
        $(MAKE) $(AM_MAKEFLAGS) CC=$(HOSTCC) CCLD=$(HOSTCCLD) \
          CFLAGS="$(HOSTCFLAGS)" genData

HOSTCC, HOSTCCLD and HOSTCFLAGS are configured in configure.ac with:

AC_CANONICAL_HOST
[...]
if test x$cross_compiling = xyes; then
  HOSTCC=${HOSTCC:=${build_alias}-gcc}
else
  HOSTCC=${HOSTCC:=$CC}
fi

This seems to be the best way to compile local targets. It'd be really 
great if it would possible to do:
HOST_PROGRAMS = genData

At least, write the best method to use in documentation.

thank you,

-- 
Jérôme Pouiller (jerome.pouiller AT gmail.com)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]