[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnulib-bug
Subject:    iconv_open, uni*: add support for VPATH builds with OpenBSD 'make'
From:       Bruno Haible <bruno () clisp ! org>
Date:       2017-08-16 9:28:22
Message-ID: 1920164.YQHtHW8agc () omega
[Download RAW message or body]

In VPATH builds with OpenBSD 'make', 'make' would attempt to rebuild
the gperf-generated files, which fails if gperf is not installed.
This fixes it: it is necessary to prefix the target files with $(srcdir)/.
Prefixing the dependency files with $(srcdir)/ as well is optional,
so let me do that as well for consistency.


2017-08-16  Bruno Haible  <bruno@clisp.org>

	iconv_open, uni*: Add support for VPATH builds with OpenBSD 'make'.
	* modules/iconv_open (Makefile.am): In the rules that use gperf, prefix
	the target file names with '$(srcdir)/'.
	* modules/unicase/locale-language (Makefile.am): Likewise.
	* modules/unicase/special-casing (Makefile.am): Likewise.
	* modules/unictype/bidiclass-byname (Makefile.am): Likewise.
	* modules/unictype/category-byname (Makefile.am): Likewise.
	* modules/unictype/combining-class-byname (Makefile.am): Likewise.
	* modules/unictype/joininggroup-byname (Makefile.am): Likewise.
	* modules/unictype/joiningtype-byname (Makefile.am): Likewise.
	* modules/unictype/property-byname (Makefile.am): Likewise.
	* modules/unictype/scripts (Makefile.am): Likewise.
	* modules/uninorm/composition (Makefile.am): Likewise.

diff --git a/modules/iconv_open b/modules/iconv_open
index e49c650..7032dca 100644
--- a/modules/iconv_open
+++ b/modules/iconv_open
@@ -33,19 +33,19 @@ if test $REPLACE_ICONV = 1; then
 fi
 
 Makefile.am:
-iconv_open-aix.h: iconv_open-aix.gperf
+$(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
-iconv_open-hpux.h: iconv_open-hpux.gperf
+$(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
-iconv_open-irix.h: iconv_open-irix.gperf
+$(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
-iconv_open-osf.h: iconv_open-osf.gperf
+$(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
-iconv_open-solaris.h: iconv_open-solaris.gperf
+$(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  BUILT_SOURCES        += iconv_open-aix.h \
                iconv_open-hpux.h iconv_open-irix.h iconv_open-osf.h \
                iconv_open-solaris.h
diff --git a/modules/unicase/locale-language b/modules/unicase/locale-language
index 706f94d..d2e06f2 100644
--- a/modules/unicase/locale-language
+++ b/modules/unicase/locale-language
@@ -18,7 +18,7 @@ if LIBUNISTRING_COMPILE_UNICASE_LOCALE_LANGUAGE
 lib_SOURCES += unicase/locale-language.c
 endif
 
-unicase/locale-languages.h: $(srcdir)/unicase/locale-languages.gperf
+$(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-t && \  mv \
$(srcdir)/unicase/locale-languages.h-t $(srcdir)/unicase/locale-languages.h  \
                BUILT_SOURCES        += unicase/locale-languages.h
diff --git a/modules/unicase/special-casing b/modules/unicase/special-casing
index a4a7fcf..362f6a1 100644
--- a/modules/unicase/special-casing
+++ b/modules/unicase/special-casing
@@ -14,7 +14,7 @@ configure.ac:
 Makefile.am:
 lib_SOURCES += unicase/special-casing.c
 
-unicase/special-casing-table.h: $(srcdir)/unicase/special-casing-table.gperf
+$(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  \
                BUILT_SOURCES        += unicase/special-casing-table.h
diff --git a/modules/unictype/bidiclass-byname b/modules/unictype/bidiclass-byname
index f903ca2..0803c06 100644
--- a/modules/unictype/bidiclass-byname
+++ b/modules/unictype/bidiclass-byname
@@ -17,7 +17,7 @@ if LIBUNISTRING_COMPILE_UNICTYPE_BIDICLASS_BYNAME
 lib_SOURCES += unictype/bidi_byname.c
 endif
 
-unictype/bidi_byname.h: unictype/bidi_byname.gperf
+$(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-t && \  mv $(srcdir)/unictype/bidi_byname.h-t \
$(srcdir)/unictype/bidi_byname.h  BUILT_SOURCES        += unictype/bidi_byname.h
diff --git a/modules/unictype/category-byname b/modules/unictype/category-byname
index 4a8bb2b..29a754f 100644
--- a/modules/unictype/category-byname
+++ b/modules/unictype/category-byname
@@ -56,7 +56,7 @@ if LIBUNISTRING_COMPILE_UNICTYPE_CATEGORY_BYNAME
 lib_SOURCES += unictype/categ_byname.c
 endif
 
-unictype/categ_byname.h: unictype/categ_byname.gperf
+$(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-t && \  mv $(srcdir)/unictype/categ_byname.h-t \
$(srcdir)/unictype/categ_byname.h  BUILT_SOURCES        += unictype/categ_byname.h
diff --git a/modules/unictype/combining-class-byname \
b/modules/unictype/combining-class-byname index f0ef659..c80b873 100644
--- a/modules/unictype/combining-class-byname
+++ b/modules/unictype/combining-class-byname
@@ -17,7 +17,7 @@ if LIBUNISTRING_COMPILE_UNICTYPE_COMBINING_CLASS_BYNAME
 lib_SOURCES += unictype/combiningclass_byname.c
 endif
 
-unictype/combiningclass_byname.h: unictype/combiningclass_byname.gperf
+$(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-t && \  mv \
$(srcdir)/unictype/combiningclass_byname.h-t \
$(srcdir)/unictype/combiningclass_byname.h  BUILT_SOURCES        += \
                unictype/combiningclass_byname.h
diff --git a/modules/unictype/joininggroup-byname \
b/modules/unictype/joininggroup-byname index 2d47821..3e076b6 100644
--- a/modules/unictype/joininggroup-byname
+++ b/modules/unictype/joininggroup-byname
@@ -17,7 +17,7 @@ if LIBUNISTRING_COMPILE_UNICTYPE_JOININGGROUP_BYNAME
 lib_SOURCES += unictype/joininggroup_byname.c
 endif
 
-unictype/joininggroup_byname.h: unictype/joininggroup_byname.gperf
+$(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-t && \  mv \
$(srcdir)/unictype/joininggroup_byname.h-t $(srcdir)/unictype/joininggroup_byname.h  \
                BUILT_SOURCES        += unictype/joininggroup_byname.h
diff --git a/modules/unictype/joiningtype-byname \
b/modules/unictype/joiningtype-byname index 516ce3c..8054514 100644
--- a/modules/unictype/joiningtype-byname
+++ b/modules/unictype/joiningtype-byname
@@ -17,7 +17,7 @@ if LIBUNISTRING_COMPILE_UNICTYPE_JOININGTYPE_BYNAME
 lib_SOURCES += unictype/joiningtype_byname.c
 endif
 
-unictype/joiningtype_byname.h: unictype/joiningtype_byname.gperf
+$(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-t && \  mv \
$(srcdir)/unictype/joiningtype_byname.h-t $(srcdir)/unictype/joiningtype_byname.h  \
                BUILT_SOURCES        += unictype/joiningtype_byname.h
diff --git a/modules/unictype/property-byname b/modules/unictype/property-byname
index 0bb8799..2d160f0 100644
--- a/modules/unictype/property-byname
+++ b/modules/unictype/property-byname
@@ -103,7 +103,7 @@ if LIBUNISTRING_COMPILE_UNICTYPE_PROPERTY_BYNAME
 lib_SOURCES += unictype/pr_byname.c
 endif
 
-unictype/pr_byname.h: unictype/pr_byname.gperf
+$(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-t && \  mv $(srcdir)/unictype/pr_byname.h-t \
$(srcdir)/unictype/pr_byname.h  BUILT_SOURCES        += unictype/pr_byname.h
diff --git a/modules/unictype/scripts b/modules/unictype/scripts
index f2fab3a..f60e4e8 100644
--- a/modules/unictype/scripts
+++ b/modules/unictype/scripts
@@ -18,7 +18,7 @@ if LIBUNISTRING_COMPILE_UNICTYPE_SCRIPTS
 lib_SOURCES += unictype/scripts.c
 endif
 
-unictype/scripts_byname.h: unictype/scripts_byname.gperf
+$(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-t && \  mv $(srcdir)/unictype/scripts_byname.h-t \
$(srcdir)/unictype/scripts_byname.h  BUILT_SOURCES        += \
                unictype/scripts_byname.h
diff --git a/modules/uninorm/composition b/modules/uninorm/composition
index fcef307..90b0740 100644
--- a/modules/uninorm/composition
+++ b/modules/uninorm/composition
@@ -17,7 +17,7 @@ if LIBUNISTRING_COMPILE_UNINORM_COMPOSITION
 lib_SOURCES += uninorm/composition.c
 endif
 
-uninorm/composition-table.h: $(srcdir)/uninorm/composition-table.gperf
+$(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-t && \  mv \
$(srcdir)/uninorm/composition-table.h-t $(srcdir)/uninorm/composition-table.h  \
BUILT_SOURCES        += uninorm/composition-table.h


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic