summaryrefslogtreecommitdiff
path: root/fc-case
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2013-01-02 17:49:41 -0600
committerBehdad Esfahbod <behdad@behdad.org>2013-01-02 17:49:41 -0600
commit558b3c65f91b4b2dd65ce2242e1a21ace621e44b (patch)
treeaac8864b099927ed435c7c055448b73c70517946 /fc-case
parentec8a40d2381014ad2e72b5da0e6357a85f078f9f (diff)
Use CC_FOR_BUILD to generate source files
Previously we were failing if CROSS_COMPILING and the generated headers were not present. It works just fine now. One caveat: the fix is not fully correct since config.h is being included in the files built with CC_FOR_BUILD, but config.h has config for the host system, not the build system. Should be fine though.
Diffstat (limited to 'fc-case')
-rw-r--r--fc-case/Makefile.am8
1 files changed, 1 insertions, 7 deletions
diff --git a/fc-case/Makefile.am b/fc-case/Makefile.am
index 9bab1c7e..c56e6577 100644
--- a/fc-case/Makefile.am
+++ b/fc-case/Makefile.am
@@ -33,18 +33,13 @@ noinst_PROGRAMS=fc-case
noinst_HEADERS=$(TARG)
-fc_case_SOURCES= \
- fc-case.c
+fc_case_CC = $(CC_FOR_BUILD)
CASEFOLDING=CaseFolding.txt
SCASEFOLDING=${top_srcdir}/fc-case/CaseFolding.txt
EXTRA_DIST = $(TARG) $(TMPL) $(CASEFOLDING)
-if CROSS_COMPILING
-$(TARG): $(STMPL) fc-case.c $(SCASEFOLDING)
- @echo Warning: cannot rebuild $(TARG) when cross-compiling
-else
## BUILT_SOURCES doesn't effect to 'distcheck'
## so $(ALIAS_FILES) has to be appeared prior to fc-case$(EXEEXT)
## to make sure availability.
@@ -52,7 +47,6 @@ $(TARG): $(STMPL) $(ALIAS_FILES) fc-case$(EXEEXT) $(SCASEFOLDING)
$(AM_V_GEN) $(RM) $(TARG); \
./fc-case$(EXEEXT) $(SCASEFOLDING) < $(STMPL) > $(TARG).tmp && \
mv $(TARG).tmp $(TARG)
-endif
ALIAS_FILES = fcalias.h fcaliastail.h