Ralf Wildenhues wrote: > > No, that would require the VPATH build to write those files into the > > source directory, which defeats the purpose of a VPATH build. > > It is no problem if a git tree updates files in the source tree. > ... > The GNU Coding Standards are pretty clear about this too.
Thanks for the pointer: "Since these files normally appear in the source directory, they should always appear in the source directory, not in the build directory. So Makefile rules to update them should put the updated files in the source directory. However, if a file does not appear in the distribution, then the Makefile should not put it in the source directory, because building a program in ordinary circumstances should not modify the source directory in any way." I see. I wasn't aware that this depends whether a file is distributed or not. In our case, the files are generated by gperf, hence they must appear in a released tarball. I'm reverting the patch from two days ago and applying the appended one instead. > How come you changed the $(MKDIR_P) into @MKDIR_P@ In order to avoid the complexity behind MKDIR_P, mkdir_p, the macro from autoconf, the macro from automake, etc. I wanted the situation to be as straight as possible. > some BSD > users would like to be able to override MKDIR_P to not use install-sh -d > here We tell the users to modify the config.status file or preset some cache variable during the configure run. > Also, I think it's nice style to use --author for other people's > patches. I had thought that your patch was incomplete, because I had missed your second mail. Sorry about that. 2009-05-03 Bruno Haible <br...@clisp.org> Create gperf-generated files in the source dir, not in the build dir. * modules/iconv_open (iconv_open-aix.h, iconv_open-hpux.h, iconv_open-irix.h, iconv_open-osf.h): Create file in the source tree. * modules/unicase/locale-language (unicase/locale-languages.h): Likewise. * modules/unicase/special-casing (unicase/special-casing-table.h): Likewise. * modules/unictype/property-byname (unictype/pr_byname.h): Likewise. * modules/unictype/scripts (unictype/scripts_byname.h): Likewise. * modules/uninorm/composition (uninorm/composition-table.h): Likewise. Reported by Ralf Wildenhues. --- modules/iconv_open.orig 2009-05-04 01:57:50.000000000 +0200 +++ modules/iconv_open 2009-05-04 01:51:06.000000000 +0200 @@ -43,17 +43,17 @@ MOSTLYCLEANFILES += iconv.h iconv.h-t iconv_open-aix.h: iconv_open-aix.gperf - $(GPERF) -m 10 $(srcdir)/iconv_open-aix.gperf > $...@-t - mv $...@-t $@ + $(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 - $(GPERF) -m 10 $(srcdir)/iconv_open-hpux.gperf > $...@-t - mv $...@-t $@ + $(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 - $(GPERF) -m 10 $(srcdir)/iconv_open-irix.gperf > $...@-t - mv $...@-t $@ + $(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 - $(GPERF) -m 10 $(srcdir)/iconv_open-osf.gperf > $...@-t - mv $...@-t $@ + $(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 BUILT_SOURCES += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h iconv_open-osf.h MOSTLYCLEANFILES += iconv_open-aix.h-t iconv_open-hpux.h-t iconv_open-irix.h-t iconv_open-osf.h-t MAINTAINERCLEANFILES += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h iconv_open-osf.h --- modules/unicase/locale-language.orig 2009-05-04 01:57:50.000000000 +0200 +++ modules/unicase/locale-language 2009-05-04 01:54:01.000000000 +0200 @@ -16,8 +16,8 @@ lib_SOURCES += unicase/locale-language.c unicase/locale-languages.h: $(srcdir)/unicase/locale-languages.gperf - $(GPERF) -m 10 $(srcdir)/unicase/locale-languages.gperf > $...@-t - mv $...@-t $@ + $(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 MOSTLYCLEANFILES += unicase/locale-languages.h-t MAINTAINERCLEANFILES += unicase/locale-languages.h --- modules/unicase/special-casing.orig 2009-05-04 01:57:50.000000000 +0200 +++ modules/unicase/special-casing 2009-05-04 01:53:22.000000000 +0200 @@ -15,8 +15,8 @@ lib_SOURCES += unicase/special-casing.c unicase/special-casing-table.h: $(srcdir)/unicase/special-casing-table.gperf - $(GPERF) -m 10 $(srcdir)/unicase/special-casing-table.gperf > $...@-t - mv $...@-t $@ + $(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 MOSTLYCLEANFILES += unicase/special-casing-table.h-t MAINTAINERCLEANFILES += unicase/special-casing-table.h --- modules/unictype/property-byname.orig 2009-05-04 01:57:50.000000000 +0200 +++ modules/unictype/property-byname 2009-05-04 01:52:02.000000000 +0200 @@ -94,8 +94,8 @@ lib_SOURCES += unictype/pr_byname.c unictype/pr_byname.h: unictype/pr_byname.gperf - $(GPERF) -m 10 $(srcdir)/unictype/pr_byname.gperf > $...@-t - mv $...@-t $@ + $(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 MOSTLYCLEANFILES += unictype/pr_byname.h-t MAINTAINERCLEANFILES += unictype/pr_byname.h --- modules/unictype/scripts.orig 2009-05-04 01:57:50.000000000 +0200 +++ modules/unictype/scripts 2009-05-04 01:51:38.000000000 +0200 @@ -16,8 +16,8 @@ lib_SOURCES += unictype/scripts.c unictype/scripts_byname.h: unictype/scripts_byname.gperf - $(GPERF) -m 10 $(srcdir)/unictype/scripts_byname.gperf > $...@-t - mv $...@-t $@ + $(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 MOSTLYCLEANFILES += unictype/scripts_byname.h-t MAINTAINERCLEANFILES += unictype/scripts_byname.h --- modules/uninorm/composition.orig 2009-05-04 01:57:50.000000000 +0200 +++ modules/uninorm/composition 2009-05-04 01:52:28.000000000 +0200 @@ -15,8 +15,8 @@ lib_SOURCES += uninorm/composition.c uninorm/composition-table.h: $(srcdir)/uninorm/composition-table.gperf - $(GPERF) -m 1 $(srcdir)/uninorm/composition-table.gperf > $...@-t - mv $...@-t $@ + $(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 MOSTLYCLEANFILES += uninorm/composition-table.h-t MAINTAINERCLEANFILES += uninorm/composition-table.h