]> git.wh0rd.org - fontconfig.git/blobdiff - fc-lang/Makefile.am
Make most generated-files cross-compiling-safe
[fontconfig.git] / fc-lang / Makefile.am
index 242fae0ee6ab37419e6db85a2c260d0f685eb589..29cee59340ab93564c0319a9ff78356cc6d81378 100644 (file)
 # PERFORMANCE OF THIS SOFTWARE.
 #
 
-CC = @CC_FOR_BUILD@
-EXEEXT = @EXEEXT_FOR_BUILD@
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-
 INCLUDES=-I${top_srcdir}/src -I${top_srcdir} $(WARN_CFLAGS)
 
 TMPL=fclang.tmpl.h
@@ -36,21 +32,28 @@ noinst_PROGRAMS=fc-lang
 
 noinst_MANS=fc-lang.man
 
-EXTRA_DIST=$(TMPL) $(ORTH)
+EXTRA_DIST = $(TARG) $(TMPL) $(ORTH)
 
+if CROSS_COMPILING
+$(TARG):$(ORTH) fc-lang.c $(STMPL)
+       @echo Warning: cannot rebuild $(TARG) when cross-compiling
+else
 $(TARG):$(ORTH) 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
 
 BUILT_SOURCES = $(ALIAS_FILES) $(TARG)
 
-$(ALIAS_FILES): 
+$(ALIAS_FILES):
        touch $(ALIAS_FILES)
 
-CLEANFILES = $(TARG) $(ALIAS_FILES)
+CLEANFILES = $(ALIAS_FILES)
+
+MAINTAINERCLEANFILES = $(TARG)
 
 # NOTE:
 #