diff options
author | Keith Packard <keithp@keithp.com> | 2003-10-27 10:44:13 +0000 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2003-10-27 10:44:13 +0000 |
commit | 4cbc3ee8fe4a6266b2d107c7475a65de6bdd1068 (patch) | |
tree | 731004f1fee5b25147fce2f8eb15c4764be57714 | |
parent | 394b2bf04651d62194c7faa836899d33ca3ed017 (diff) |
Yet more cleanups to finish getting 'make distcheck' working This has been
tested to ensure that it even works from a _build directory.
-rw-r--r-- | ChangeLog | 16 | ||||
-rw-r--r-- | Makefile.am | 1 | ||||
-rw-r--r-- | configure.in | 10 | ||||
-rw-r--r-- | doc/Makefile.am | 133 | ||||
-rw-r--r-- | fc-cache/Makefile.am | 2 | ||||
-rw-r--r-- | fc-glyphname/Makefile.am | 6 | ||||
-rw-r--r-- | fc-lang/Makefile.am | 5 | ||||
-rw-r--r-- | fc-list/Makefile.am | 2 | ||||
-rw-r--r-- | fc-match/Makefile.am | 2 | ||||
-rw-r--r-- | test/Makefile.am | 4 | ||||
-rw-r--r-- | test/run-test.sh | 28 |
11 files changed, 98 insertions, 111 deletions
@@ -1,3 +1,19 @@ +2003-10-27 Keith Packard <keithp@keithp.com> + + * Makefile.am: + * configure.in: + * doc/Makefile.am: + * fc-cache/Makefile.am: + * fc-glyphname/Makefile.am: + * fc-lang/Makefile.am: + * fc-list/Makefile.am: + * fc-match/Makefile.am: + * test/Makefile.am: + * test/run-test.sh: + Yet more cleanups to finish getting 'make distcheck' working + This has been tested to ensure that it even works from a _build + directory. + 2003-10-26 Keith Packard <keithp@keithp.com> * configure.in: diff --git a/Makefile.am b/Makefile.am index bf93beb..074a9ae 100644 --- a/Makefile.am +++ b/Makefile.am @@ -40,6 +40,7 @@ configdir=$(CONFDIR) config_DATA=fonts.conf fonts.dtd install-data-local: + $(mkinstalldirs) $(DESTDIR)/$(configdir) if [ -f $(DESTDIR)$(configdir)/local.conf ]; then \ echo "not overwriting existing $(DESTDIR)$(configdir)/local.conf"; \ else if [ -f $(srcdir)/local.conf ]; then \ diff --git a/configure.in b/configure.in index f87a7a5..7ecedf9 100644 --- a/configure.in +++ b/configure.in @@ -359,11 +359,21 @@ AM_CONDITIONAL(ENABLE_DOCS, test "x$enable_docs" = xyes) if test "x$enable_docs" = xyes; then DOCSRC="doc" + tmp=funcs.$$ + cat $srcdir/doc/*.fncs | awk ' + /^@TITLE@/ { if (!done) { printf ("%s\n", $2); done = 1; } } + /^@FUNC@/ { if (!done) { printf ("%s\n", $2); done = 1; } } + /^@@/ { done = 0; }' > $tmp + DOCMAN3=`cat $tmp | awk '{ printf ("%s.3 ", $1); }'` + echo DOCMAN3 $DOCMAN3 + rm -f $tmp else DOCSRC="" + DOCMAN3="" fi AC_SUBST(DOCSRC) +AC_SUBST(DOCMAN3) # # Figure out where to install documentation diff --git a/doc/Makefile.am b/doc/Makefile.am index 6c83d7e..793ae4f 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -21,8 +21,7 @@ # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -DOC_SRC = ${top_srcdir}/doc -DOC_BLD = ${top_builddir}/doc +DOC_SRC = $(srcdir) DOC_MODULE = fontconfig DOC2HTML = docbook2html DOC2TXT = docbook2txt @@ -30,8 +29,8 @@ DOC2MAN = docbook2man TXT = fontconfig-user.txt fontconfig-devel.txt HTML_FILES = fontconfig-user.html -HTML_DIRS = fontconfig-devel -SGML = ${DOC_SRC}/fontconfig-user.sgml ${DOC_SRC}/fontconfig-devel.sgml +HTML_DIR = fontconfig-devel +SGML = fontconfig-user.sgml fontconfig-devel.sgml FNCS_TMPL = ${DOC_SRC}/func.sgml DOC_FUNCS_FNCS=\ @@ -70,49 +69,15 @@ DOC_FUNCS_SGML=\ fcstrset.sgml \ fcvalue.sgml -man_MANS=fonts-conf.5 \ -FcAtomicCreate.3 FcAtomicDeleteNew.3 FcAtomicDestroy.3 FcAtomicLock.3 \ -FcAtomicNewFile.3 FcAtomicOrigFile.3 FcAtomicReplaceOrig.3 FcAtomicUnlock.3 \ -FcBlanksAdd.3 FcBlanksCreate.3 FcBlanksDestroy.3 FcBlanksIsMember.3 \ -FcCharSetAddChar.3 FcCharSetCopy.3 FcCharSetCount.3 FcCharSetCreate.3 \ -FcCharSetDestroy.3 FcCharSetEqual.3 FcCharSetFirstPage.3 FcCharSetHasChar.3 \ -FcCharSetIntersect.3 FcCharSetIntersectCount.3 FcCharSetIsSubset.3 \ -FcCharSetNextPage.3 FcCharSetSubtract.3 FcCharSetSubtractCount.3 \ -FcCharSetUnion.3 FcConfigAppFontAddDir.3 FcConfigAppFontAddFile.3 \ -FcConfigAppFontClear.3 FcConfigBuildFonts.3 FcConfigCreate.3 \ -FcConfigDestroy.3 FcConfigFilename.3 FcConfigGetBlanks.3 FcConfigGetCache.3 \ -FcConfigGetConfigDirs.3 FcConfigGetConfigFiles.3 FcConfigGetCurrent.3 \ -FcConfigGetFontDirs.3 FcConfigGetFonts.3 FcConfigGetRescanInverval.3 \ -FcConfigParseAndLoad.3 FcConfigSetCurrent.3 FcConfigSetRescanInverval.3 \ -FcConfigSubstitute.3 FcConfigSubstituteWithPat.3 FcConfigUptoDate.3 \ -FcDefaultSubstitute.3 FcDirCacheValid.3 FcDirSave.3 FcDirScan.3 FcFini.3 FcFileScan.3 \ -FcFontList.3 FcFontMatch.3 FcFontRenderPrepare.3 FcFontSetAdd.3 \ -FcFontSetCreate.3 FcFontSetDestroy.3 FcFontSort.3 FcFreeTypeCharIndex.3 \ -FcFreeTypeCharSet.3 FcFreeTypeQuery.3 FcGetVersion.3 FcInit.3 \ -FcInitBringUptoDate.3 FcInitLoadConfig.3 FcInitLoadConfigAndFonts.3 \ -FcInitReinitialize.3 FcMatrixCopy.3 FcMatrixEqual.3 FcMatrixInit.3 \ -FcMatrixMultiply.3 FcMatrixRotate.3 FcMatrixScale.3 FcMatrixShear.3 \ -FcNameConstant.3 FcNameGetConstant.3 FcNameGetObjectType.3 FcNameParse.3 \ -FcNameRegisterConstants.3 FcNameRegisterObjectTypes.3 FcNameUnparse.3 \ -FcNameUnregisterConstants.3 FcNameUnregisterObjectTypes.3 FcObjectSetAdd.3 \ -FcObjectSetBuild.3 FcObjectSetCreate.3 FcObjectSetDestroy.3 \ -FcPatternAdd-Type.3 FcPatternAdd.3 FcPatternAddWeak.3 FcPatternBuild.3 \ -FcPatternCreate.3 FcPatternDel.3 FcPatternDestroy.3 FcPatternEqual.3 \ -FcPatternEqualSubset.3 FcPatternGet-Type.3 FcPatternGet.3 FcPatternHash.3 \ -FcPatternPrint.3 FcStrBasename.3 FcStrCmpIgnoreCase.3 FcStrCopy.3 \ -FcStrCopyFilename.3 FcStrDirname.3 FcStrListCreate.3 FcStrListDone.3 \ -FcStrListNext.3 FcStrSetAdd.3 FcStrSetAddFilename.3 FcStrSetCreate.3 \ -FcStrSetDel.3 FcStrSetDestroy.3 FcStrSetMember.3 FcUcs4ToUtf8.3 FcUtf16Len.3 \ -FcUtf16ToUcs4.3 FcUtf8Len.3 FcUtf8ToUcs4.3 FcValueDestroy.3 FcValueSave.3 +man_MANS=fonts-conf.5 @DOCMAN3@ noinst_PROGRAMS=edit-sgml edit_sgml_SOURCES=edit-sgml.c -DOCDIR=@DOCDIR@ +docdir=@DOCDIR@ DOC_FILES=$(TXT) $(HTML_FILES) -DOC_DIRS=$(HTML_DIRS) -LOCAL_DOCS=$(man_MANS) $(DOC_FILES) $(DOC_DIRS) +LOCAL_DOCS=$(man_MANS) $(DOC_FILES) $(HTML_DIR)/* EXTRA_DIST=$(LOCAL_DOCS) $(SGML) $(DOC_FUNCS_FNCS) $(FNCS_TMPL) confdir.sgml.in @@ -122,86 +87,74 @@ if USEDOCBOOK .fncs.sgml: $(RM) $@ - ./edit-sgml $(FNCS_TMPL) < `test -f '$<' || echo '$(srcdir)/'`$< > $*.sgml + ./edit-sgml $(FNCS_TMPL) < '$<' > $*.sgml .sgml.txt: $(RM) $@ - test -f '$<' || ln -s '$(srcdir)/'$< $< $(DOC2TXT) $< $(man_MANS): func.refs -func.refs: fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml +func.refs: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml $(RM) func.refs - $(DOC2MAN) fontconfig-devel.sgml + $(DOC2MAN) local-fontconfig-devel.sgml mv manpage.refs func.refs $(RM) manpage.links +local-fontconfig-devel.sgml: fontconfig-devel.sgml + $(LN_S) $< $@ + $(DOC_FUNCS_SGML): edit-sgml $(FNCS_TMPL) -fonts-conf.5: fontconfig-user.sgml version.sgml confdir.sgml - $(RM) file.refs - $(DOC2MAN) fontconfig-user.sgml +fonts-conf.5: local-fontconfig-user.sgml version.sgml confdir.sgml + $(RM) $@ + $(DOC2MAN) local-fontconfig-user.sgml $(RM) manpage.refs manpage.links + +local-fontconfig-user.sgml: fontconfig-user.sgml + $(LN_S) $< $@ all-local: $(LOCAL_DOCS) clean-local: $(RM) $(man_MANS) $(DOC_FILES) $(DOC_FUNCS_SGML) func.refs - $(RM) -r $(DOC_DIRS) - -fontconfig-devel: ./fontconfig-devel.sgml $(DOCS_FUNCS_SGML) version.sgml confdir.sgml - $(RM) -r fontconfig-devel - $(DOC2HTML) -o fontconfig-devel fontconfig-devel.sgml - -fontconfig-devel.txt: ./fontconfig-devel.sgml version.sgml confdir.sgml - -fontconfig-user.html: ./fontconfig-user.sgml version.sgml confdir.sgml - $(DOC2HTML) -u fontconfig-user.sgml + $(RM) -r $(HTML_DIR) -fontconfig-user.txt: ./fontconfig-user.sgml version.sgml confdir.sgml +$(HTML_DIR): local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml confdir.sgml + $(RM) -r $(HTML_DIR) + $(DOC2HTML) -o $(HTML_DIR) local-fontconfig-devel.sgml -./fontconfig-user.sgml: ALWAYS - test -f fontconfig-user.sgml || $(LN_S) ${srcdir}/fontconfig-user.sgml fontconfig-user.sgml +fontconfig-devel.txt: local-fontconfig-devel.sgml version.sgml confdir.sgml + $(RM) $@ + $(DOC2TXT) local-fontconfig-devel.sgml + mv local-fontconfig-devel.txt $@ -./fontconfig-devel.sgml: ALWAYS - test -f fontconfig-devel.sgml || $(LN_S) ${srcdir}/fontconfig-devel.sgml fontconfig-devel.sgml +fontconfig-user.html: local-fontconfig-user.sgml version.sgml confdir.sgml + $(RM) $@ local-$@ $@.tmp + $(DOC2HTML) -u local-fontconfig-user.sgml > $@.tmp + -test -f local-$@ && mv local-$@ $@ + -test -f $@ || mv $@.tmp $@ -ALWAYS: +fontconfig-user.txt: local-fontconfig-user.sgml version.sgml confdir.sgml + $(RM) $@ + $(DOC2TXT) local-fontconfig-user.sgml + mv local-fontconfig-user.txt $@ STRIPNL=awk '{ if (NR > 1) printf ("\n"); printf ("%s", $$0); }' confdir.sgml: ${DOC_SRC}/confdir.sgml.in sed "s,@CONFDIR\@,${CONFDIR}," < ${DOC_SRC}/confdir.sgml.in | $(STRIPNL) > confdir.sgml -clean:: - $(RM) confdir.sgml +CLEANFILES=confdir.sgml local-fontconfig-user.sgml local-fontconfig-devel.sgml else all-local: clean-local: endif -install-data-local: - $(mkinstalldirs) $(DESTDIR)$(DOCDIR) - for i in $(DOC_FILES); do \ - echo '-- Installing '$$i ; \ - $(INSTALL_DATA) $$i $(DESTDIR)$(DOCDIR)/$$i; \ - done - for i in $(DOC_DIRS); do \ - $(mkinstalldirs) $(DESTDIR)$(DOCDIR)/$$i ; \ - for f in $$i/*; do \ - echo '-- Installing '$$f ; \ - $(INSTALL_DATA) $$f $(DESTDIR)$(DOCDIR)/$$f; \ - done \ - done - -uninstall-local: - for i in $(DOC_FILES); do \ - echo '-- Uninstalling '$$i ; \ - $(RM) $(DESTDIR)$(DOCDIR)/$$i ; \ - done - for i in $(DOC_DIRS); do \ - echo '-- Uninstalling '$$i ; \ - rm -rf $(DESTDIR)$(DOCDIR)/$$i ; \ - done - rmdir $(DESTDIR)$(DOCDIR) +htmldocdir=$(docdir)/$(HTML_DIR) + +doc_DATA = $(DOC_FILES) + +htmldoc_DATA = $(HTML_DIR)/* + +$(HTML_DIR)/*: $(HTML_DIR) diff --git a/fc-cache/Makefile.am b/fc-cache/Makefile.am index 3d584bc..0d7fb30 100644 --- a/fc-cache/Makefile.am +++ b/fc-cache/Makefile.am @@ -27,7 +27,7 @@ FC_CACHE_SRC=${top_srcdir}/fc-cache SGML = ${FC_CACHE_SRC}/fc-cache.sgml -INCLUDES=$(FREETYPE_CFLAGS) +INCLUDES=-I${top_srcdir} $(FREETYPE_CFLAGS) man_MANS=fc-cache.1 diff --git a/fc-glyphname/Makefile.am b/fc-glyphname/Makefile.am index b379e38..d741f4e 100644 --- a/fc-glyphname/Makefile.am +++ b/fc-glyphname/Makefile.am @@ -22,7 +22,7 @@ # PERFORMANCE OF THIS SOFTWARE. # -INCLUDES=-I${top_srcdir}/src $(FREETYPE_CFLAGS) +INCLUDES=-I${top_srcdir}/src -I${top_srcdir} $(FREETYPE_CFLAGS) TMPL=fcglyphname.tmpl.h STMPL=${top_srcdir}/fc-glyphname/${TMPL} @@ -43,5 +43,5 @@ $(TARG): $(STMPL) fc-glyphname $(SGLYPHNAME) rm -f $(TARG) ./fc-glyphname $(SGLYPHNAME) < $(STMPL) > $(TARG) -clean:: - $(RM) $(TARG) +CLEANFILES=$(TARG) + diff --git a/fc-lang/Makefile.am b/fc-lang/Makefile.am index 4fd0b3e..3544545 100644 --- a/fc-lang/Makefile.am +++ b/fc-lang/Makefile.am @@ -22,7 +22,7 @@ # PERFORMANCE OF THIS SOFTWARE. # -INCLUDES=-I${top_srcdir}/src $(FREETYPE_CFLAGS) +INCLUDES=-I${top_srcdir}/src -I${top_srcdir} $(FREETYPE_CFLAGS) TMPL=fclang.tmpl.h STMPL=${top_srcdir}/fc-lang/fclang.tmpl.h @@ -42,5 +42,4 @@ $(TARG):$(ORTH) fc-lang $(STMPL) rm -f $(TARG) ./fc-lang -d ${srcdir} $(ORTH) < $(STMPL) > $(TARG) -clean:: - $(RM) $(TARG) +CLEANFILES=$(TARG) diff --git a/fc-list/Makefile.am b/fc-list/Makefile.am index 356c9f1..1af8384 100644 --- a/fc-list/Makefile.am +++ b/fc-list/Makefile.am @@ -31,7 +31,7 @@ bin_PROGRAMS=fc-list man_MANS=fc-list.1 -INCLUDES=$(FREETYPE_CFLAGS) +INCLUDES=-I${top_srcdir} $(FREETYPE_CFLAGS) EXTRA_DIST=$(SGML) diff --git a/fc-match/Makefile.am b/fc-match/Makefile.am index 229ac60..80629fc 100644 --- a/fc-match/Makefile.am +++ b/fc-match/Makefile.am @@ -25,7 +25,7 @@ bin_PROGRAMS=fc-match man_MANS=fc-match.1 -INCLUDES=$(FREETYPE_CFLAGS) +INCLUDES=-I${top_srcdir} $(FREETYPE_CFLAGS) EXTRA_DIST=$(man_MANS) diff --git a/test/Makefile.am b/test/Makefile.am index 2c5344e..72da8d6 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,7 +1,9 @@ check_SCRIPTS=run-test.sh -TESTS_ENVIRONMENT=sh +TESTS_ENVIRONMENT=src=${srcdir} sh TESTS=run-test.sh TESTDATA=4x6.pcf 8x16.pcf out.expected fonts.conf.in EXTRA_DIST=$(check_SCRIPTS) $(TESTDATA) + +CLEANFILES= diff --git a/test/run-test.sh b/test/run-test.sh index ae5af1e..428503b 100644 --- a/test/run-test.sh +++ b/test/run-test.sh @@ -1,4 +1,6 @@ #!/bin/sh +TESTDIR=${srcdir-`pwd`} + FONTDIR=`pwd`/fonts CACHEFILE=`pwd`/fonts.cache @@ -7,6 +9,9 @@ ECHO=true FCLIST=../fc-list/fc-list FCCACHE=../fc-cache/fc-cache +FONT1=$TESTDIR/4x6.pcf +FONT2=$TESTDIR/8x16.pcf + check () { $FCLIST - family pixelsize | sort > out echo "=" >> out @@ -14,11 +19,12 @@ check () { echo "=" >> out $FCLIST - family pixelsize | sort >> out tr -d '\015' <out >out.tmp; mv out.tmp out - if cmp out out.expected > /dev/null ; then : ; else + if cmp out $TESTDIR/out.expected > /dev/null ; then : ; else echo "*** Test failed: $TEST" echo "*** output is in 'out', expected output in 'out.expected'" - exit + exit 1 fi + rm out } prep() { @@ -33,26 +39,26 @@ dotest () { } sed "s!@FONTDIR@!$FONTDIR! -s!@CACHEFILE@!$CACHEFILE!" < fonts.conf.in > fonts.conf +s!@CACHEFILE@!$CACHEFILE!" < $TESTDIR/fonts.conf.in > fonts.conf FONTCONFIG_FILE=`pwd`/fonts.conf export FONTCONFIG_FILE dotest "Basic check" prep -cp 4x6.pcf 8x16.pcf $FONTDIR +cp $FONT1 $FONT2 $FONTDIR check dotest "With a subdir" prep -cp 4x6.pcf 8x16.pcf $FONTDIR +cp $FONT1 $FONT2 $FONTDIR $FCCACHE $FONTDIR check dotest "Subdir with a cache file" prep mkdir $FONTDIR/a -cp 4x6.pcf 8x16.pcf $FONTDIR/a +cp $FONT1 $FONT2 $FONTDIR/a $FCCACHE $FONTDIR/a check @@ -62,8 +68,8 @@ mkdir $FONTDIR/a mkdir $FONTDIR/a/a mkdir $FONTDIR/b mkdir $FONTDIR/b/a -cp 4x6.pcf $FONTDIR/a -cp 8x16.pcf $FONTDIR/b/a +cp $FONT1 $FONTDIR/a +cp $FONT2 $FONTDIR/b/a check dotest "Subdir with an out-of-date cache file" @@ -71,16 +77,16 @@ prep mkdir $FONTDIR/a $FCCACHE $FONTDIR/a sleep 1 -cp 4x6.pcf 8x16.pcf $FONTDIR/a +cp $FONT1 $FONT2 $FONTDIR/a check dotest "Dir with an out-of-date cache file" prep -cp 4x6.pcf $FONTDIR +cp $FONT1 $FONTDIR $FCCACHE $FONTDIR sleep 1 mkdir $FONTDIR/a -cp 8x16.pcf $FONTDIR/a +cp $FONT2 $FONTDIR/a check rm -rf $FONTDIR $CACHEFILE $FONTCONFIG_FILE out |