bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Make sure gperf-generated files are the same in VPATH builds


From: Bruno Haible
Subject: Make sure gperf-generated files are the same in VPATH builds
Date: Sat, 10 Aug 2024 12:49:52 +0200

Patrice Dumas noticed [1] that gperf-generated files from gnulib modules
contain not only the source file name, but also the directory name of
that source file name. It occurs
  - in the gperf command that is replicated at the top of the file,
  - in the many #line statements.

This is problematic
  - because the contents of a tarball should not depend on whether the
    maintainer has built it from the source dir or from a subdir,
  - because it causes trouble with 'lcov' (at least it did in 2017) [2].

The recipe to check whether a testdir has this problem is:

cd testdir; ./configure; make maintainer-clean; cd ..
cp -a testdir testdir-copy
cd testdir; ./configure; make; make distclean; cd ..
cd testdir-copy; mkdir bb; cd bb; ../configure; make; make distclean; cd ..; rm 
-rf bb; cd ..
diff -r -q testdir testdir-copy

This patch fixes it for gnulib. But I'm sure many GNU packages have
the same problem (look out for MAINTAINERCLEANFILES...).

[1] https://lists.gnu.org/archive/html/bug-texinfo/2024-08/msg00030.html
[2] https://mail.gnu.org/archive/html/bug-gnulib/2017-01/msg00022.html


2024-08-10  Bruno Haible  <bruno@clisp.org>

        Make sure gperf-generated files are the same in VPATH builds.
        Reported by Patrice Dumas <pertusus@free.fr> in
        <https://lists.gnu.org/archive/html/bug-texinfo/2024-08/msg00030.html>.
        * modules/iconv_open (Makefile.am): Eliminate directory names from the
        generated iconv_open-aix.h, iconv_open-hpux.h, iconv_open-irix.h,
        iconv_open-osf.h, iconv_open-solaris.h, iconv_open-zos.h.
        * modules/unicase/locale-language (Makefile.am): Eliminate directory
        names from the generated unicase/locale-languages.h.
        * modules/unicase/special-casing (Makefile.am): Eliminate directory
        names from the generated unicase/special-casing-table.h.
        * modules/unictype/bidiclass-byname (Makefile.am): Eliminate directory
        names from the generated unictype/bidi_byname.h.
        * modules/unictype/category-byname (Makefile.am): Eliminate directory
        names from the generated unictype/categ_byname.h.
        * modules/unictype/combining-class-byname (Makefile.am): Eliminate
        directory names from the generated unictype/combiningclass_byname.h.
        * modules/unictype/incb-byname (Makefile.am): Eliminate directory names
        from the generated unictype/incb_byname.h.
        * modules/unictype/joininggroup-byname (Makefile.am): Eliminate
        directory names from the generated unictype/joininggroup_byname.h.
        * modules/unictype/joiningtype-byname (Makefile.am): Eliminate directory
        names from the generated unictype/joiningtype_byname.h.
        * modules/unictype/property-byname (Makefile.am): Eliminate directory
        names from the generated unictype/pr_byname.h.
        * modules/unictype/scripts (Makefile.am): Eliminate directory names from
        the generated unictype/scripts_byname.h.
        * modules/uninorm/composition (Makefile.am): Eliminate directory names
        from the generated uninorm/composition-table.h.

diff --git a/modules/iconv_open b/modules/iconv_open
index 8aada83ef1..95aaa47db7 100644
--- a/modules/iconv_open
+++ b/modules/iconv_open
@@ -39,25 +39,48 @@ lib_SOURCES += iconv.c iconv_close.c
 endif
 
 $(srcdir)/iconv_open-aix.h: $(srcdir)/iconv_open-aix.gperf
-       $(V_GPERF)$(GPERF) -m 10 $(srcdir)/iconv_open-aix.gperf > 
$(srcdir)/iconv_open-aix.h-t && \
-       mv $(srcdir)/iconv_open-aix.h-t $(srcdir)/iconv_open-aix.h
+       $(V_GPERF)$(GPERF) -m 10 $(srcdir)/iconv_open-aix.gperf > 
$(srcdir)/iconv_open-aix.h-t1 \
+       && sed -e 's|\([ "]\)[^ "]*/iconv_open-aix\.gperf\([ 
"]\)|\1iconv_open-aix.gperf\2|' \
+              < $(srcdir)/iconv_open-aix.h-t1 > $(srcdir)/iconv_open-aix.h-t2 \
+       && rm -f $(srcdir)/iconv_open-aix.h-t1 \
+       && mv $(srcdir)/iconv_open-aix.h-t2 $(srcdir)/iconv_open-aix.h
 $(srcdir)/iconv_open-hpux.h: $(srcdir)/iconv_open-hpux.gperf
-       $(V_GPERF)$(GPERF) -m 10 $(srcdir)/iconv_open-hpux.gperf > 
$(srcdir)/iconv_open-hpux.h-t && \
-       mv $(srcdir)/iconv_open-hpux.h-t $(srcdir)/iconv_open-hpux.h
+       $(V_GPERF)$(GPERF) -m 10 $(srcdir)/iconv_open-hpux.gperf > 
$(srcdir)/iconv_open-hpux.h-t1 \
+       && sed -e 's|\([ "]\)[^ "]*/iconv_open-hpux\.gperf\([ 
"]\)|\1iconv_open-hpux.gperf\2|' \
+              < $(srcdir)/iconv_open-hpux.h-t1 > 
$(srcdir)/iconv_open-hpux.h-t2 \
+       && rm -f $(srcdir)/iconv_open-hpux.h-t1 \
+       && mv $(srcdir)/iconv_open-hpux.h-t2 $(srcdir)/iconv_open-hpux.h
 $(srcdir)/iconv_open-irix.h: $(srcdir)/iconv_open-irix.gperf
-       $(V_GPERF)$(GPERF) -m 10 $(srcdir)/iconv_open-irix.gperf > 
$(srcdir)/iconv_open-irix.h-t && \
-       mv $(srcdir)/iconv_open-irix.h-t $(srcdir)/iconv_open-irix.h
+       $(V_GPERF)$(GPERF) -m 10 $(srcdir)/iconv_open-irix.gperf > 
$(srcdir)/iconv_open-irix.h-t1 \
+       && sed -e 's|\([ "]\)[^ "]*/iconv_open-irix\.gperf\([ 
"]\)|\1iconv_open-irix.gperf\2|' \
+              < $(srcdir)/iconv_open-irix.h-t1 > 
$(srcdir)/iconv_open-irix.h-t2 \
+       && rm -f $(srcdir)/iconv_open-irix.h-t1 \
+       && mv $(srcdir)/iconv_open-irix.h-t2 $(srcdir)/iconv_open-irix.h
 $(srcdir)/iconv_open-osf.h: $(srcdir)/iconv_open-osf.gperf
-       $(V_GPERF)$(GPERF) -m 10 $(srcdir)/iconv_open-osf.gperf > 
$(srcdir)/iconv_open-osf.h-t && \
-       mv $(srcdir)/iconv_open-osf.h-t $(srcdir)/iconv_open-osf.h
+       $(V_GPERF)$(GPERF) -m 10 $(srcdir)/iconv_open-osf.gperf > 
$(srcdir)/iconv_open-osf.h-t1 \
+       && sed -e 's|\([ "]\)[^ "]*/iconv_open-osf\.gperf\([ 
"]\)|\1iconv_open-osf.gperf\2|' \
+              < $(srcdir)/iconv_open-osf.h-t1 > $(srcdir)/iconv_open-osf.h-t2 \
+       && rm -f $(srcdir)/iconv_open-osf.h-t1 \
+       && mv $(srcdir)/iconv_open-osf.h-t2 $(srcdir)/iconv_open-osf.h
 $(srcdir)/iconv_open-solaris.h: $(srcdir)/iconv_open-solaris.gperf
-       $(V_GPERF)$(GPERF) -m 10 $(srcdir)/iconv_open-solaris.gperf > 
$(srcdir)/iconv_open-solaris.h-t && \
-       mv $(srcdir)/iconv_open-solaris.h-t $(srcdir)/iconv_open-solaris.h
+       $(V_GPERF)$(GPERF) -m 10 $(srcdir)/iconv_open-solaris.gperf > 
$(srcdir)/iconv_open-solaris.h-t1 \
+       && sed -e 's|\([ "]\)[^ "]*/iconv_open-solaris\.gperf\([ 
"]\)|\1iconv_open-solaris.gperf\2|' \
+              < $(srcdir)/iconv_open-solaris.h-t1 > 
$(srcdir)/iconv_open-solaris.h-t2 \
+       && rm -f $(srcdir)/iconv_open-solaris.h-t1 \
+       && mv $(srcdir)/iconv_open-solaris.h-t2 $(srcdir)/iconv_open-solaris.h
 $(srcdir)/iconv_open-zos.h: $(srcdir)/iconv_open-zos.gperf
-       $(V_GPERF)$(GPERF) -m 10 $(srcdir)/iconv_open-zos.gperf > 
$(srcdir)/iconv_open-zos.h-t && \
-       mv $(srcdir)/iconv_open-zos.h-t $(srcdir)/iconv_open-zos.h
+       $(V_GPERF)$(GPERF) -m 10 $(srcdir)/iconv_open-zos.gperf > 
$(srcdir)/iconv_open-zos.h-t1 \
+       && sed -e 's|\([ "]\)[^ "]*/iconv_open-zos\.gperf\([ 
"]\)|\1iconv_open-zos.gperf\2|' \
+              < $(srcdir)/iconv_open-zos.h-t1 > $(srcdir)/iconv_open-zos.h-t2 \
+       && rm -f $(srcdir)/iconv_open-zos.h-t1 \
+       && mv $(srcdir)/iconv_open-zos.h-t2 $(srcdir)/iconv_open-zos.h
 BUILT_SOURCES        += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h 
iconv_open-osf.h iconv_open-solaris.h iconv_open-zos.h
-MOSTLYCLEANFILES     += iconv_open-aix.h-t iconv_open-hpux.h-t 
iconv_open-irix.h-t iconv_open-osf.h-t iconv_open-solaris.h-t iconv_open-zos.h-t
+MOSTLYCLEANFILES     += iconv_open-aix.h-t1 iconv_open-aix.h-t2 \
+                        iconv_open-hpux.h-t1 iconv_open-hpux.h-t2 \
+                        iconv_open-irix.h-t1 iconv_open-irix.h-t2 \
+                        iconv_open-osf.h-t1 iconv_open-osf.h-t2 \
+                        iconv_open-solaris.h-t1 iconv_open-solaris.h-t2 \
+                        iconv_open-zos.h-t1 iconv_open-zos.h-t2
 MAINTAINERCLEANFILES += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h 
iconv_open-osf.h iconv_open-solaris.h iconv_open-zos.h
 EXTRA_DIST           += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h 
iconv_open-osf.h iconv_open-solaris.h iconv_open-zos.h
 
diff --git a/modules/unicase/locale-language b/modules/unicase/locale-language
index 0fc3594143..6255b96346 100644
--- a/modules/unicase/locale-language
+++ b/modules/unicase/locale-language
@@ -20,7 +20,10 @@ endif
 
 $(srcdir)/unicase/locale-languages.h: $(srcdir)/unicase/locale-languages.gperf
        $(V_GPERF)$(GPERF) -m 10 $(srcdir)/unicase/locale-languages.gperf > 
$(srcdir)/unicase/locale-languages.h-t1 \
-       && sed -e 's/^const/static const/' < 
$(srcdir)/unicase/locale-languages.h-t1 > 
$(srcdir)/unicase/locale-languages.h-t2 \
+       && sed -e 's/^const/static const/' \
+              -e 's|\([ "]\)[^ "]*/unicase/locale-languages\.gperf\([ 
"]\)|\1unicase/locale-languages.gperf\2|' \
+              < $(srcdir)/unicase/locale-languages.h-t1 > 
$(srcdir)/unicase/locale-languages.h-t2 \
+       && rm -f $(srcdir)/unicase/locale-languages.h-t1 \
        && mv $(srcdir)/unicase/locale-languages.h-t2 
$(srcdir)/unicase/locale-languages.h
 BUILT_SOURCES        += unicase/locale-languages.h
 MOSTLYCLEANFILES     += unicase/locale-languages.h-t1 
unicase/locale-languages.h-t2
diff --git a/modules/unicase/special-casing b/modules/unicase/special-casing
index 0a2bdbd239..1e491fd7e0 100644
--- a/modules/unicase/special-casing
+++ b/modules/unicase/special-casing
@@ -17,10 +17,13 @@ Makefile.am:
 lib_SOURCES += unicase/special-casing.c
 
 $(srcdir)/unicase/special-casing-table.h: 
$(srcdir)/unicase/special-casing-table.gperf
-       $(V_GPERF)$(GPERF) -m 10 $(srcdir)/unicase/special-casing-table.gperf > 
$(srcdir)/unicase/special-casing-table.h-t && \
-       mv $(srcdir)/unicase/special-casing-table.h-t 
$(srcdir)/unicase/special-casing-table.h
+       $(V_GPERF)$(GPERF) -m 10 $(srcdir)/unicase/special-casing-table.gperf > 
$(srcdir)/unicase/special-casing-table.h-t1 \
+       && sed -e 's|\([ "]\)[^ "]*/unicase/special-casing-table\.gperf\([ 
"]\)|\1unicase/special-casing-table.gperf\2|' \
+              < $(srcdir)/unicase/special-casing-table.h-t1 > 
$(srcdir)/unicase/special-casing-table.h-t2 \
+       && rm -f $(srcdir)/unicase/special-casing-table.h-t1 \
+       && mv $(srcdir)/unicase/special-casing-table.h-t2 
$(srcdir)/unicase/special-casing-table.h
 BUILT_SOURCES        += unicase/special-casing-table.h
-MOSTLYCLEANFILES     += unicase/special-casing-table.h-t
+MOSTLYCLEANFILES     += unicase/special-casing-table.h-t1 
unicase/special-casing-table.h-t2
 MAINTAINERCLEANFILES += unicase/special-casing-table.h
 EXTRA_DIST           += unicase/special-casing-table.h
 
diff --git a/modules/unictype/bidiclass-byname 
b/modules/unictype/bidiclass-byname
index 8726128060..ded6ad4a21 100644
--- a/modules/unictype/bidiclass-byname
+++ b/modules/unictype/bidiclass-byname
@@ -19,7 +19,10 @@ endif
 
 $(srcdir)/unictype/bidi_byname.h: $(srcdir)/unictype/bidi_byname.gperf
        $(V_GPERF)$(GPERF) -m 10 $(srcdir)/unictype/bidi_byname.gperf > 
$(srcdir)/unictype/bidi_byname.h-t1 \
-       && sed -e 's/^const/static const/' < 
$(srcdir)/unictype/bidi_byname.h-t1 > $(srcdir)/unictype/bidi_byname.h-t2 \
+       && sed -e 's/^const/static const/' \
+              -e 's|\([ "]\)[^ "]*/unictype/bidi_byname\.gperf\([ 
"]\)|\1unictype/bidi_byname.gperf\2|' \
+              < $(srcdir)/unictype/bidi_byname.h-t1 > 
$(srcdir)/unictype/bidi_byname.h-t2 \
+       && rm -f $(srcdir)/unictype/bidi_byname.h-t1 \
        && mv $(srcdir)/unictype/bidi_byname.h-t2 
$(srcdir)/unictype/bidi_byname.h
 BUILT_SOURCES        += unictype/bidi_byname.h
 MOSTLYCLEANFILES     += unictype/bidi_byname.h-t1 unictype/bidi_byname.h-t2
diff --git a/modules/unictype/category-byname b/modules/unictype/category-byname
index 04564d608e..8fae61231e 100644
--- a/modules/unictype/category-byname
+++ b/modules/unictype/category-byname
@@ -58,7 +58,10 @@ endif
 
 $(srcdir)/unictype/categ_byname.h: $(srcdir)/unictype/categ_byname.gperf
        $(V_GPERF)$(GPERF) -m 10 $(srcdir)/unictype/categ_byname.gperf > 
$(srcdir)/unictype/categ_byname.h-t1 \
-       && sed -e 's/^const/static const/' < 
$(srcdir)/unictype/categ_byname.h-t1 > $(srcdir)/unictype/categ_byname.h-t2 \
+       && sed -e 's/^const/static const/' \
+              -e 's|\([ "]\)[^ "]*/unictype/categ_byname\.gperf\([ 
"]\)|\1unictype/categ_byname.gperf\2|' \
+              < $(srcdir)/unictype/categ_byname.h-t1 > 
$(srcdir)/unictype/categ_byname.h-t2 \
+       && rm -f $(srcdir)/unictype/categ_byname.h-t1 \
        && mv $(srcdir)/unictype/categ_byname.h-t2 
$(srcdir)/unictype/categ_byname.h
 BUILT_SOURCES        += unictype/categ_byname.h
 MOSTLYCLEANFILES     += unictype/categ_byname.h-t1 unictype/categ_byname.h-t2
diff --git a/modules/unictype/combining-class-byname 
b/modules/unictype/combining-class-byname
index b15b231d50..d4af881892 100644
--- a/modules/unictype/combining-class-byname
+++ b/modules/unictype/combining-class-byname
@@ -19,7 +19,10 @@ endif
 
 $(srcdir)/unictype/combiningclass_byname.h: 
$(srcdir)/unictype/combiningclass_byname.gperf
        $(V_GPERF)$(GPERF) -m 10 $(srcdir)/unictype/combiningclass_byname.gperf 
> $(srcdir)/unictype/combiningclass_byname.h-t1 \
-       && sed -e 's/^const/static const/' < 
$(srcdir)/unictype/combiningclass_byname.h-t1 > 
$(srcdir)/unictype/combiningclass_byname.h-t2 \
+       && sed -e 's/^const/static const/' \
+              -e 's|\([ "]\)[^ "]*/unictype/combiningclass_byname\.gperf\([ 
"]\)|\1unictype/combiningclass_byname.gperf\2|' \
+              < $(srcdir)/unictype/combiningclass_byname.h-t1 > 
$(srcdir)/unictype/combiningclass_byname.h-t2 \
+       && rm -f $(srcdir)/unictype/combiningclass_byname.h-t1 \
        && mv $(srcdir)/unictype/combiningclass_byname.h-t2 
$(srcdir)/unictype/combiningclass_byname.h
 BUILT_SOURCES        += unictype/combiningclass_byname.h
 MOSTLYCLEANFILES     += unictype/combiningclass_byname.h-t1 
unictype/combiningclass_byname.h-t2
diff --git a/modules/unictype/incb-byname b/modules/unictype/incb-byname
index 29e732e1c8..718f26ef47 100644
--- a/modules/unictype/incb-byname
+++ b/modules/unictype/incb-byname
@@ -19,7 +19,10 @@ endif
 
 $(srcdir)/unictype/incb_byname.h: $(srcdir)/unictype/incb_byname.gperf
        $(V_GPERF)$(GPERF) -m 10 $(srcdir)/unictype/incb_byname.gperf > 
$(srcdir)/unictype/incb_byname.h-t1 \
-       && sed -e 's/^const/static const/' < 
$(srcdir)/unictype/incb_byname.h-t1 > $(srcdir)/unictype/incb_byname.h-t2 \
+       && sed -e 's/^const/static const/' \
+              -e 's|\([ "]\)[^ "]*/unictype/incb_byname\.gperf\([ 
"]\)|\1unictype/incb_byname.gperf\2|' \
+              < $(srcdir)/unictype/incb_byname.h-t1 > 
$(srcdir)/unictype/incb_byname.h-t2 \
+       && rm -f $(srcdir)/unictype/incb_byname.h-t1 \
        && mv $(srcdir)/unictype/incb_byname.h-t2 
$(srcdir)/unictype/incb_byname.h
 BUILT_SOURCES        += unictype/incb_byname.h
 MOSTLYCLEANFILES     += unictype/incb_byname.h-t1 unictype/incb_byname.h-t2
diff --git a/modules/unictype/joininggroup-byname 
b/modules/unictype/joininggroup-byname
index 9c01f1adda..bf8aeeec66 100644
--- a/modules/unictype/joininggroup-byname
+++ b/modules/unictype/joininggroup-byname
@@ -19,7 +19,10 @@ endif
 
 $(srcdir)/unictype/joininggroup_byname.h: 
$(srcdir)/unictype/joininggroup_byname.gperf
        $(V_GPERF)$(GPERF) -m 10 $(srcdir)/unictype/joininggroup_byname.gperf > 
$(srcdir)/unictype/joininggroup_byname.h-t1 \
-       && sed -e 's/^const/static const/' < 
$(srcdir)/unictype/joininggroup_byname.h-t1 > 
$(srcdir)/unictype/joininggroup_byname.h-t2 \
+       && sed -e 's/^const/static const/' \
+              -e 's|\([ "]\)[^ "]*/unictype/joininggroup_byname\.gperf\([ 
"]\)|\1unictype/joininggroup_byname.gperf\2|' \
+              < $(srcdir)/unictype/joininggroup_byname.h-t1 > 
$(srcdir)/unictype/joininggroup_byname.h-t2 \
+       && rm -f $(srcdir)/unictype/joininggroup_byname.h-t1 \
        && mv $(srcdir)/unictype/joininggroup_byname.h-t2 
$(srcdir)/unictype/joininggroup_byname.h
 BUILT_SOURCES        += unictype/joininggroup_byname.h
 MOSTLYCLEANFILES     += unictype/joininggroup_byname.h-t1 
unictype/joininggroup_byname.h-t2
diff --git a/modules/unictype/joiningtype-byname 
b/modules/unictype/joiningtype-byname
index e6341777f1..8708006d41 100644
--- a/modules/unictype/joiningtype-byname
+++ b/modules/unictype/joiningtype-byname
@@ -19,7 +19,10 @@ endif
 
 $(srcdir)/unictype/joiningtype_byname.h: 
$(srcdir)/unictype/joiningtype_byname.gperf
        $(V_GPERF)$(GPERF) -m 10 $(srcdir)/unictype/joiningtype_byname.gperf > 
$(srcdir)/unictype/joiningtype_byname.h-t1 \
-       && sed -e 's/^const/static const/' < 
$(srcdir)/unictype/joiningtype_byname.h-t1 > 
$(srcdir)/unictype/joiningtype_byname.h-t2 \
+       && sed -e 's/^const/static const/' \
+              -e 's|\([ "]\)[^ "]*/unictype/joiningtype_byname\.gperf\([ 
"]\)|\1unictype/joiningtype_byname.gperf\2|' \
+              < $(srcdir)/unictype/joiningtype_byname.h-t1 > 
$(srcdir)/unictype/joiningtype_byname.h-t2 \
+       && rm -f $(srcdir)/unictype/joiningtype_byname.h-t1 \
        && mv $(srcdir)/unictype/joiningtype_byname.h-t2 
$(srcdir)/unictype/joiningtype_byname.h
 BUILT_SOURCES        += unictype/joiningtype_byname.h
 MOSTLYCLEANFILES     += unictype/joiningtype_byname.h-t1 
unictype/joiningtype_byname.h-t2
diff --git a/modules/unictype/property-byname b/modules/unictype/property-byname
index 418cd1b730..e9b6fe3d4e 100644
--- a/modules/unictype/property-byname
+++ b/modules/unictype/property-byname
@@ -110,7 +110,10 @@ endif
 
 $(srcdir)/unictype/pr_byname.h: $(srcdir)/unictype/pr_byname.gperf
        $(V_GPERF)$(GPERF) -m 10 $(srcdir)/unictype/pr_byname.gperf > 
$(srcdir)/unictype/pr_byname.h-t1 \
-       && sed -e 's/^const/static const/' < $(srcdir)/unictype/pr_byname.h-t1 
> $(srcdir)/unictype/pr_byname.h-t2 \
+       && sed -e 's/^const/static const/' \
+              -e 's|\([ "]\)[^ "]*/unictype/pr_byname\.gperf\([ 
"]\)|\1unictype/pr_byname.gperf\2|' \
+              < $(srcdir)/unictype/pr_byname.h-t1 > 
$(srcdir)/unictype/pr_byname.h-t2 \
+       && rm -f $(srcdir)/unictype/pr_byname.h-t1 \
        && mv $(srcdir)/unictype/pr_byname.h-t2 $(srcdir)/unictype/pr_byname.h
 BUILT_SOURCES        += unictype/pr_byname.h
 MOSTLYCLEANFILES     += unictype/pr_byname.h-t1 unictype/pr_byname.h-t2
diff --git a/modules/unictype/scripts b/modules/unictype/scripts
index f8869beb6b..5071dfda50 100644
--- a/modules/unictype/scripts
+++ b/modules/unictype/scripts
@@ -20,7 +20,10 @@ endif
 
 $(srcdir)/unictype/scripts_byname.h: $(srcdir)/unictype/scripts_byname.gperf
        $(V_GPERF)$(GPERF) -m 10 $(srcdir)/unictype/scripts_byname.gperf > 
$(srcdir)/unictype/scripts_byname.h-t1 \
-       && sed -e 's/^const/static const/' < 
$(srcdir)/unictype/scripts_byname.h-t1 > $(srcdir)/unictype/scripts_byname.h-t2 
\
+       && sed -e 's/^const/static const/' \
+              -e 's|\([ "]\)[^ "]*/unictype/scripts_byname\.gperf\([ 
"]\)|\1unictype/scripts_byname.gperf\2|' \
+              < $(srcdir)/unictype/scripts_byname.h-t1 > 
$(srcdir)/unictype/scripts_byname.h-t2 \
+       && rm -f $(srcdir)/unictype/scripts_byname.h-t1 \
        && mv $(srcdir)/unictype/scripts_byname.h-t2 
$(srcdir)/unictype/scripts_byname.h
 BUILT_SOURCES        += unictype/scripts_byname.h
 MOSTLYCLEANFILES     += unictype/scripts_byname.h-t1 
unictype/scripts_byname.h-t2
diff --git a/modules/uninorm/composition b/modules/uninorm/composition
index d17b7d70d5..44efa4feae 100644
--- a/modules/uninorm/composition
+++ b/modules/uninorm/composition
@@ -19,7 +19,10 @@ endif
 
 $(srcdir)/uninorm/composition-table.h: 
$(srcdir)/uninorm/composition-table.gperf
        $(V_GPERF)$(GPERF) -m 1 $(srcdir)/uninorm/composition-table.gperf > 
$(srcdir)/uninorm/composition-table.h-t1 \
-       && sed -e 's/^const/static const/' < 
$(srcdir)/uninorm/composition-table.h-t1 > 
$(srcdir)/uninorm/composition-table.h-t2 \
+       && sed -e 's/^const/static const/' \
+              -e 's|\([ "]\)[^ "]*/uninorm/composition-table\.gperf\([ 
"]\)|\1uninorm/composition-table.gperf\2|' \
+              < $(srcdir)/uninorm/composition-table.h-t1 > 
$(srcdir)/uninorm/composition-table.h-t2 \
+       && rm -f $(srcdir)/uninorm/composition-table.h-t1 \
        && mv $(srcdir)/uninorm/composition-table.h-t2 
$(srcdir)/uninorm/composition-table.h
 BUILT_SOURCES        += uninorm/composition-table.h
 MOSTLYCLEANFILES     += uninorm/composition-table.h-t1 
uninorm/composition-table.h-t2






reply via email to

[Prev in Thread] Current Thread [Next in Thread]