summaryrefslogtreecommitdiff
path: root/fc-lang
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-lang
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-lang')
-rw-r--r--fc-lang/Makefile.am9
1 files changed, 3 insertions, 6 deletions
diff --git a/fc-lang/Makefile.am b/fc-lang/Makefile.am
index 35e94e52..536cff27 100644
--- a/fc-lang/Makefile.am
+++ b/fc-lang/Makefile.am
@@ -31,14 +31,12 @@ TARG=fclang.h
noinst_PROGRAMS=fc-lang
-noinst_MANS=fc-lang.man
+noinst_HEADERS=$(TARG)
+
+fc_lang_CC = $(CC_FOR_BUILD)
EXTRA_DIST = $(TARG) $(TMPL) $(ORTH)
-if CROSS_COMPILING
-$(TARG):$(ORTH) fc-lang.c $(STMPL)
- @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-lang$(EXEEXT)
## to make sure availability.
@@ -46,7 +44,6 @@ $(TARG):$(ORTH) $(ALIAS_FILES) fc-lang${EXEEXT} $(STMPL)
$(AM_V_GEN) $(RM) $(TARG); \
./fc-lang${EXEEXT} -d ${srcdir} $(ORTH) < $(STMPL) > $(TARG).tmp && \
mv $(TARG).tmp $(TARG)
-endif
ALIAS_FILES = fcalias.h fcaliastail.h