]> git.wh0rd.org - fontconfig.git/commitdiff
Attempts to fix 'make distcheck' work. Things are progressing pretty well,
authorKeith Packard <keithp@keithp.com>
Mon, 27 Oct 2003 06:30:29 +0000 (06:30 +0000)
committerKeith Packard <keithp@keithp.com>
Mon, 27 Oct 2003 06:30:29 +0000 (06:30 +0000)
    but there are still failures long into the process dealing with docs
    (as always).
The big changes here are mostly to make $(srcdir) != "." work correctly,
    fixing the docbook related sections and fc-lang were particularily
    tricky. Docbook refuses to load system entities from anywhere other
    than where the original .sgml file was located, so no luck looking in
    "." for the configure-generated version.sgml and confdir.sgml files.
fc-lang needed help finding .orth files; added a -d option to set the
    directory as the least evil of many options.
Now to go use a faster machine and try and wring out the last issues.

ChangeLog
configure.in
doc/Makefile.am
fc-cache/Makefile.am
fc-glyphname/Makefile.am
fc-lang/Makefile.am
fc-lang/fc-lang.c
fc-list/Makefile.am
fc-match/Makefile.am

index 2a0d902ef3ffebc93ed6834c0b553f5835e9e449..5b0b2467427b3e113ed3f539a905ad491a81597d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,30 @@
+2003-10-26  Keith Packard  <keithp@keithp.com>
+
+       * configure.in:
+       * doc/Makefile.am:
+       * fc-cache/Makefile.am:
+       * fc-glyphname/Makefile.am:
+       * fc-lang/Makefile.am:
+       * fc-lang/fc-lang.c: (scanopen), (scan), (main):
+       * fc-list/Makefile.am:
+       * fc-match/Makefile.am:
+       Attempts to fix 'make distcheck' work.  Things are
+       progressing pretty well, but there are still failures
+       long into the process dealing with docs (as always).
+       
+       The big changes here are mostly to make $(srcdir) != "."
+       work correctly, fixing the docbook related sections and
+       fc-lang were particularily tricky.  Docbook refuses to load
+       system entities from anywhere other than where the original .sgml
+       file was located, so no luck looking in "." for the
+       configure-generated version.sgml and confdir.sgml files.
+
+       fc-lang needed help finding .orth files; added a -d option
+       to set the directory as the least evil of many options.
+
+       Now to go use a faster machine and try and wring out the last
+       issues.
+
 2003-10-26  Keith Packard  <keithp@keithp.com>
 
        Tag version 2.2.91
index be2e3cbd1eed63b56a1a7c9165f11221c4080d86..f87a7a55724d6294960273083afe948f7cec3752 100644 (file)
@@ -330,7 +330,7 @@ AC_SUBST(CONFDIR)
 # Find out what language orthographies are included
 #
 
-ORTH_FILES=`cd fc-lang && echo *.orth`
+ORTH_FILES=`cd ${srcdir}/fc-lang && echo *.orth`
 AC_SUBST(ORTH_FILES)
 
 #
index b4bd051ae9b95f6a61435dc378836fa113923311..6c83d7ed10c2b9835063002b5aebb6d8716ea2ce 100644 (file)
@@ -1,3 +1,28 @@
+#
+# $Id$
+#
+# Copyright © 2003 Keith Packard
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of Keith Packard not be used in
+# advertising or publicity pertaining to distribution of the software without
+# specific, written prior permission.  Keith Packard makes no
+# representations about the suitability of this software for any purpose.  It
+# is provided "as is" without express or implied warranty.
+#
+# KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+# EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+# 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_MODULE = fontconfig
 DOC2HTML = docbook2html
 DOC2TXT = docbook2txt
@@ -6,8 +31,8 @@ DOC2MAN = docbook2man
 TXT = fontconfig-user.txt fontconfig-devel.txt
 HTML_FILES = fontconfig-user.html
 HTML_DIRS = fontconfig-devel
-SGML = fontconfig-user.sgml fontconfig-devel.sgml
-FNCS_TMPL = func.sgml
+SGML = ${DOC_SRC}/fontconfig-user.sgml ${DOC_SRC}/fontconfig-devel.sgml
+FNCS_TMPL = ${DOC_SRC}/func.sgml
 
 DOC_FUNCS_FNCS=\
        fcatomic.fncs \
@@ -97,11 +122,12 @@ if USEDOCBOOK
 
 .fncs.sgml:
        $(RM) $@
-       ./edit-sgml $(FNCS_TMPL) < $*.fncs > $*.sgml
+       ./edit-sgml $(FNCS_TMPL) < `test -f '$<' || echo '$(srcdir)/'`$< > $*.sgml
 
 .sgml.txt:
        $(RM) $@
-       $(DOC2TXT) $*.sgml
+       test -f '$<' || ln -s '$(srcdir)/'$< $<
+       $(DOC2TXT) $<
 
 $(man_MANS): func.refs
 
@@ -124,20 +150,31 @@ 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
+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-devel.txt: ./fontconfig-devel.sgml version.sgml confdir.sgml
 
-fontconfig-user.html: fontconfig-user.sgml version.sgml confdir.sgml
+fontconfig-user.html: ./fontconfig-user.sgml version.sgml confdir.sgml
        $(DOC2HTML) -u fontconfig-user.sgml
 
-fontconfig-user.txt:  fontconfig-user.sgml version.sgml confdir.sgml
+fontconfig-user.txt:  ./fontconfig-user.sgml version.sgml confdir.sgml
+
+./fontconfig-user.sgml: ALWAYS
+       test -f fontconfig-user.sgml || $(LN_S) ${srcdir}/fontconfig-user.sgml fontconfig-user.sgml
+
+./fontconfig-devel.sgml: ALWAYS
+       test -f fontconfig-devel.sgml || $(LN_S) ${srcdir}/fontconfig-devel.sgml fontconfig-devel.sgml
+
+ALWAYS:
 
 STRIPNL=awk '{ if (NR > 1) printf ("\n"); printf ("%s", $$0); }'
-confdir.sgml: confdir.sgml.in
-       sed "s,@CONFDIR\@,${CONFDIR}," < confdir.sgml.in | $(STRIPNL) > confdir.sgml
+confdir.sgml: ${DOC_SRC}/confdir.sgml.in
+       sed "s,@CONFDIR\@,${CONFDIR}," < ${DOC_SRC}/confdir.sgml.in | $(STRIPNL) > confdir.sgml
+
+clean::
+       $(RM) confdir.sgml
 
 else
 all-local:
@@ -157,3 +194,14 @@ install-data-local:
            $(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)
index eede777e9ac969d59501f90810c353caf5b99df8..3d584bc2c6ea8121ce1a1d87bfcdb73c5bfee4b1 100644 (file)
 #  PERFORMANCE OF THIS SOFTWARE.
 
 DOC2MAN = docbook2man
-SGML = fc-cache.sgml
+
+FC_CACHE_SRC=${top_srcdir}/fc-cache
+
+SGML = ${FC_CACHE_SRC}/fc-cache.sgml
 
 INCLUDES=$(FREETYPE_CFLAGS)
 
@@ -33,14 +35,13 @@ bin_PROGRAMS=fc-cache
 
 EXTRA_DIST=$(SGML)
 
-fc_cache_LDADD = ../src/libfontconfig.la
-
+fc_cache_LDADD = ${top_builddir}/src/libfontconfig.la
 
 if USEDOCBOOK
                                                                                 
-.sgml.1:
+${man_MANS}: ${SGML}                                                                           
        $(RM) $@
-       $(DOC2MAN) $*.sgml
+       $(DOC2MAN) ${SGML}
        $(RM) manpage.refs manpage.links
                                                                                 
 all-local: $(man_MANS)
index 8063a38ce3bb198c94c0b720ac23570b197317ca..b379e389f5950d559d02d70b65899d8fb37199a2 100644 (file)
 # PERFORMANCE OF THIS SOFTWARE.
 #
 
-INCLUDES=-I../src $(FREETYPE_CFLAGS)
+INCLUDES=-I${top_srcdir}/src $(FREETYPE_CFLAGS)
 
 TMPL=fcglyphname.tmpl.h
+STMPL=${top_srcdir}/fc-glyphname/${TMPL}
 TARG=fcglyphname.h
 
 noinst_PROGRAMS=fc-glyphname
@@ -34,9 +35,13 @@ noinst_HEADERS=$(TARG)
 noinst_MANS=fc-glyphname.man
 
 GLYPHNAME=zapfdingbats.txt
+SGLYPHNAME=${top_srcdir}/fc-glyphname/zapfdingbats.txt
 
 EXTRA_DIST=$(TMPL) $(GLYPHNAME)
 
-$(TARG): $(TMPL) fc-glyphname $(GLYPHNAME)
+$(TARG): $(STMPL) fc-glyphname $(SGLYPHNAME)
        rm -f $(TARG)
-       ./fc-glyphname $(GLYPHNAME) < $(TMPL) > $(TARG)
+       ./fc-glyphname $(SGLYPHNAME) < $(STMPL) > $(TARG)
+
+clean::
+       $(RM) $(TARG)
index fd4ba0e9767c30e2a856dbb8f1200bfddb7cd6c4..4fd0b3e40cb3ebd2e6229d9645d1f03f74e79f40 100644 (file)
 # PERFORMANCE OF THIS SOFTWARE.
 #
 
-INCLUDES=-I../src $(FREETYPE_CFLAGS)
+INCLUDES=-I${top_srcdir}/src $(FREETYPE_CFLAGS)
 
 TMPL=fclang.tmpl.h
+STMPL=${top_srcdir}/fc-lang/fclang.tmpl.h
 TARG=fclang.h
 
 noinst_PROGRAMS=fc-lang
@@ -37,6 +38,9 @@ ORTH=@ORTH_FILES@
 
 EXTRA_DIST=$(TMPL) $(ORTH)
 
-$(TARG): $(TMPL) fc-lang $(ORTH)
+$(TARG):$(ORTH) fc-lang $(STMPL)
        rm -f $(TARG)
-       ./fc-lang $(ORTH) < $(TMPL) > $(TARG)
+       ./fc-lang -d ${srcdir} $(ORTH) < $(STMPL) > $(TARG)
+
+clean::
+       $(RM) $(TARG)
index ef259bc54684b66754fe88f27859dba16fe86d82..edfad3bfe2fd859ba80ec7e16b7c72ec5e5d1cb7 100644 (file)
@@ -75,6 +75,26 @@ get_line (FILE *f, char *line, int *lineno)
     return line;
 }
 
+char   *dir = 0;
+
+FILE *
+scanopen (char *file)
+{
+    FILE    *f;
+
+    f = fopen (file, "r");
+    if (!f && dir)
+    {
+       char    path[1024];
+       
+       strcpy (path, dir);
+       strcat (path, "/");
+       strcat (path, file);
+       f = fopen (path, "r");
+    }
+    return f;
+}
+
 /*
  * build a single charset from a source file
  *
@@ -103,7 +123,7 @@ scan (FILE *f, char *file)
            end = strlen (file);
            if (file[end-1] == '\n')
                file[end-1] = '\0';
-           f = fopen (file, "r");
+           f = scanopen (file);
            if (!f)
                fatal (file, 0, "can't open");
            c = scan (f, file);
@@ -213,6 +233,11 @@ main (int argc, char **argv)
     
     while (*++argv)
     {
+       if (!strcmp (*argv, "-d"))
+       {
+           dir = *++argv;
+           continue;
+       }
        if (i == MAX_LANG)
            fatal (*argv, 0, "Too many languages");
        files[i++] = *argv;
@@ -222,7 +247,7 @@ main (int argc, char **argv)
     i = 0;
     while (files[i])
     {
-       f = fopen (files[i], "r");
+       f = scanopen (files[i]);
        if (!f)
            fatal (files[i], 0, strerror (errno));
        sets[i] = scan (f, files[i]);
index 6975361db609a71b756566e91f4e9562f3236f11..356c9f10f148114cd7edbcde436f082fa3ff195a 100644 (file)
@@ -23,7 +23,9 @@
 
 DOC2MAN = docbook2man
 
-SGML = fc-list.sgml
+FC_LIST_SRC=${top_srcdir}/fc-list
+
+SGML = ${FC_LIST_SRC}/fc-list.sgml
 
 bin_PROGRAMS=fc-list
 
@@ -33,14 +35,14 @@ INCLUDES=$(FREETYPE_CFLAGS)
 
 EXTRA_DIST=$(SGML)
 
-fc_list_LDADD = ../src/libfontconfig.la
+fc_list_LDADD = ${top_builddir}/src/libfontconfig.la
 
 
 if USEDOCBOOK
 
-.sgml.1:
+${man_MANS}: ${SGML}
        $(RM) $@
-       $(DOC2MAN) $*.sgml
+       $(DOC2MAN) ${SGML}
        $(RM) manpage.refs manpage.links
 
 all-local: $(man_MANS)
index 8c8b11951225f3a73145aac8fc1c578e1bb52e9d..229ac60f5e402fce2992da9936b74ab09a792440 100644 (file)
@@ -29,4 +29,4 @@ INCLUDES=$(FREETYPE_CFLAGS)
 
 EXTRA_DIST=$(man_MANS)
 
-fc_match_LDADD = ../src/libfontconfig.la
+fc_match_LDADD = ${top_builddir}/src/libfontconfig.la