Make most generated-files cross-compiling-safe

By simply including a copy in the tarball.

Remains fc-arch which is trickier.
This commit is contained in:
Behdad Esfahbod 2010-12-27 13:20:47 -06:00
parent 0d47cfabd8
commit 2a6b235ff6
5 changed files with 38 additions and 28 deletions

View File

@ -21,10 +21,6 @@
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE. # PERFORMANCE OF THIS SOFTWARE.
CC = @CC_FOR_BUILD@
EXEEXT = @EXEEXT_FOR_BUILD@
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
DOC_SRC = $(srcdir) DOC_SRC = $(srcdir)
DOC_MODULE = fontconfig DOC_MODULE = fontconfig
DOC2HTML = docbook2html DOC2HTML = docbook2html
@ -83,7 +79,7 @@ DOC_FUNCS_SGML=\
fcstrset.sgml \ fcstrset.sgml \
fcvalue.sgml fcvalue.sgml
man5_MANS=fonts-conf.5 man5_MANS=fonts-conf.5
man3_MANS=$(DOCMAN3) man3_MANS=$(DOCMAN3)
noinst_PROGRAMS=edit-sgml noinst_PROGRAMS=edit-sgml
@ -96,15 +92,20 @@ check_SCRIPTS=check-missing-doc
TESTS_ENVIRONMENT=top_srcdir=${top_srcdir} sh TESTS_ENVIRONMENT=top_srcdir=${top_srcdir} sh
TESTS=check-missing-doc TESTS=check-missing-doc
EXTRA_DIST=$(LOCAL_DOCS) $(SGML) $(DOC_FUNCS_FNCS) $(check_SCRIPTS) func.sgml confdir.sgml.in EXTRA_DIST=$(LOCAL_DOCS) $(SGML) $(DOC_FUNCS_FNCS) $(DOC_FUNCS_SGML) $(check_SCRIPTS) func.sgml confdir.sgml.in
SUFFIXES=.fncs .sgml .txt .html SUFFIXES=.fncs .sgml .txt .html
if USEDOCBOOK if USEDOCBOOK
if CROSS_COMPILING
.fncs.sgml:
@echo Warning: cannot rebuild $@ when cross-compiling
else
.fncs.sgml: .fncs.sgml:
$(RM) $@ $(RM) $@
./edit-sgml$(EXEEXT) $(FNCS_TMPL) < '$<' > $*.sgml ./edit-sgml$(EXEEXT) $(FNCS_TMPL) < '$<' > $*.sgml
endif
.sgml.txt: .sgml.txt:
$(RM) $@ $(RM) $@
@ -127,7 +128,7 @@ func.refs: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sg
local-fontconfig-devel.sgml: fontconfig-devel.sgml local-fontconfig-devel.sgml: fontconfig-devel.sgml
$(LN_S) $< $@ $(LN_S) $< $@
$(DOC_FUNCS_SGML): edit-sgml$(EXEEXT) $(FNCS_TMPL) $(DOC_FUNCS_SGML): edit-sgml.c $(FNCS_TMPL)
fonts-conf.5: local-fontconfig-user.sgml version.sgml confdir.sgml fonts-conf.5: local-fontconfig-user.sgml version.sgml confdir.sgml
$(RM) $@ $(RM) $@
@ -140,9 +141,11 @@ local-fontconfig-user.sgml: fontconfig-user.sgml
all-local: $(LOCAL_DOCS) all-local: $(LOCAL_DOCS)
clean-local: clean-local:
$(RM) $(man3_MANS) $(man5_MANS) $(DOC_FILES) $(DOC_FUNCS_SGML) func.refs $(RM) $(man3_MANS) $(man5_MANS) $(DOC_FILES) func.refs
$(RM) -r $(HTML_DIR) $(RM) -r $(HTML_DIR)
MAINTAINERCLEANFILES = $(DOC_FUNCS_SGML)
$(HTML_DIR): local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml $(HTML_DIR): local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml
$(RM) -r $(HTML_DIR) $(RM) -r $(HTML_DIR)
$(DOC2HTML) -V '%use-id-as-filename%' -o $(HTML_DIR) local-fontconfig-devel.sgml $(DOC2HTML) -V '%use-id-as-filename%' -o $(HTML_DIR) local-fontconfig-devel.sgml

View File

@ -29,7 +29,7 @@
@@@ use something reasonable and don't include any spaces @@@ use something reasonable and don't include any spaces
@@@ @@@
@@@ So far the differences boil down to: endianness, 32 vs 64 bit pointers, @@@ So far the differences boil down to: endianness, 32 vs 64 bit pointers,
@@@ and on @@@ 32bit ones, whether double is aligned to one word or two words. @@@ and on 32bit ones, whether double is aligned to one word or two words.
@@@ Those result in the 6 formats listed below. @@@ Those result in the 6 formats listed below.
@@@ @@@
@@@ ,name (endianness,pointer-size,double-alignment) @@@ ,name (endianness,pointer-size,double-alignment)

View File

@ -22,10 +22,6 @@
# PERFORMANCE OF THIS SOFTWARE. # 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) INCLUDES=-I${top_srcdir}/src -I${top_srcdir} $(WARN_CFLAGS)
TMPL=fccase.tmpl.h TMPL=fccase.tmpl.h
@ -44,12 +40,17 @@ fc_case_SRCS= \
CASEFOLDING=CaseFolding.txt CASEFOLDING=CaseFolding.txt
SCASEFOLDING=${top_srcdir}/fc-case/CaseFolding.txt SCASEFOLDING=${top_srcdir}/fc-case/CaseFolding.txt
EXTRA_DIST=$(TMPL) $(CASEFOLDING) EXTRA_DIST = $(TARG) $(TMPL) $(CASEFOLDING)
if CROSS_COMPILING
$(TARG): $(STMPL) fc-case.c $(SCASEFOLDING)
@echo Warning: cannot rebuild $(TARG) when cross-compiling
else
$(TARG): $(STMPL) fc-case$(EXEEXT) $(SCASEFOLDING) $(TARG): $(STMPL) fc-case$(EXEEXT) $(SCASEFOLDING)
$(AM_V_GEN) $(RM) $(TARG); \ $(AM_V_GEN) $(RM) $(TARG); \
./fc-case$(EXEEXT) $(SCASEFOLDING) < $(STMPL) > $(TARG).tmp && \ ./fc-case$(EXEEXT) $(SCASEFOLDING) < $(STMPL) > $(TARG).tmp && \
mv $(TARG).tmp $(TARG) mv $(TARG).tmp $(TARG)
endif
ALIAS_FILES = fcalias.h fcaliastail.h ALIAS_FILES = fcalias.h fcaliastail.h
@ -58,5 +59,6 @@ BUILT_SOURCES = $(ALIAS_FILES)
$(ALIAS_FILES): $(ALIAS_FILES):
touch $(ALIAS_FILES) touch $(ALIAS_FILES)
CLEANFILES=$(TARG) $(ALIAS_FILES) CLEANFILES = $(ALIAS_FILES)
MAINTAINERCLEANFILES = $(TARG)

View File

@ -22,10 +22,6 @@
# PERFORMANCE OF THIS SOFTWARE. # 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) INCLUDES=-I${top_srcdir}/src -I${top_srcdir} $(WARN_CFLAGS)
TMPL=fcglyphname.tmpl.h TMPL=fcglyphname.tmpl.h
@ -37,12 +33,17 @@ noinst_PROGRAMS=fc-glyphname
GLYPHNAME=zapfdingbats.txt GLYPHNAME=zapfdingbats.txt
SGLYPHNAME=${top_srcdir}/fc-glyphname/zapfdingbats.txt SGLYPHNAME=${top_srcdir}/fc-glyphname/zapfdingbats.txt
EXTRA_DIST=$(TMPL) $(GLYPHNAME) EXTRA_DIST = $(TARG) $(TMPL) $(GLYPHNAME)
if CROSS_COMPILING
$(TARG): $(STMPL) fc-glyphname.c $(SGLYPHNAME)
@echo Warning: cannot rebuild $(TARG) when cross-compiling
else
$(TARG): $(STMPL) fc-glyphname$(EXEEXT) $(SGLYPHNAME) $(TARG): $(STMPL) fc-glyphname$(EXEEXT) $(SGLYPHNAME)
$(AM_V_GEN) $(RM) $(TARG); \ $(AM_V_GEN) $(RM) $(TARG); \
./fc-glyphname$(EXEEXT) $(SGLYPHNAME) < $(STMPL) > $(TARG).tmp && \ ./fc-glyphname$(EXEEXT) $(SGLYPHNAME) < $(STMPL) > $(TARG).tmp && \
mv $(TARG).tmp $(TARG) mv $(TARG).tmp $(TARG)
endif
ALIAS_FILES = fcalias.h fcaliastail.h ALIAS_FILES = fcalias.h fcaliastail.h
@ -51,5 +52,6 @@ BUILT_SOURCES = $(ALIAS_FILES) $(TARG)
$(ALIAS_FILES): $(ALIAS_FILES):
touch $(ALIAS_FILES) touch $(ALIAS_FILES)
CLEANFILES=$(TARG) $(ALIAS_FILES) CLEANFILES = $(ALIAS_FILES)
MAINTAINERCLEANFILES = $(TARG)

View File

@ -22,10 +22,6 @@
# PERFORMANCE OF THIS SOFTWARE. # 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) INCLUDES=-I${top_srcdir}/src -I${top_srcdir} $(WARN_CFLAGS)
TMPL=fclang.tmpl.h TMPL=fclang.tmpl.h
@ -36,21 +32,28 @@ noinst_PROGRAMS=fc-lang
noinst_MANS=fc-lang.man 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) $(TARG):$(ORTH) fc-lang${EXEEXT} $(STMPL)
$(AM_V_GEN) $(RM) $(TARG); \ $(AM_V_GEN) $(RM) $(TARG); \
./fc-lang${EXEEXT} -d ${srcdir} $(ORTH) < $(STMPL) > $(TARG).tmp && \ ./fc-lang${EXEEXT} -d ${srcdir} $(ORTH) < $(STMPL) > $(TARG).tmp && \
mv $(TARG).tmp $(TARG) mv $(TARG).tmp $(TARG)
endif
ALIAS_FILES = fcalias.h fcaliastail.h ALIAS_FILES = fcalias.h fcaliastail.h
BUILT_SOURCES = $(ALIAS_FILES) $(TARG) BUILT_SOURCES = $(ALIAS_FILES) $(TARG)
$(ALIAS_FILES): $(ALIAS_FILES):
touch $(ALIAS_FILES) touch $(ALIAS_FILES)
CLEANFILES = $(TARG) $(ALIAS_FILES) CLEANFILES = $(ALIAS_FILES)
MAINTAINERCLEANFILES = $(TARG)
# NOTE: # NOTE:
# #