diff options
author | Jim Meyering <jim@meyering.net> | 2001-07-04 21:16:03 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2001-07-04 21:16:03 +0000 |
commit | 6683b38ce16df88b35e8f3cc8b401ac0d4d5e7f7 (patch) | |
tree | 12cc37c7742896be5451c92a2cd5d8e02d4ba7fb /m4 | |
parent | ae0e62acabdbde8e47c3d69e687d7175a5677346 (diff) | |
download | coreutils-6683b38ce16df88b35e8f3cc8b401ac0d4d5e7f7.tar.xz |
(glibc-io.struct): New target. Rework the code
that generates jm-glibc-io.m4 so that it doesn't trigger any make
distcheck failure.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/Makefile.am.in | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/m4/Makefile.am.in b/m4/Makefile.am.in index 36a4da4e6..241abdabc 100644 --- a/m4/Makefile.am.in +++ b/m4/Makefile.am.in @@ -6,13 +6,15 @@ Makefile.am: Makefile.am.in rm -f $@ $@t sed -n '1,/^##m4-files-begin/p' $< > $@t - ((echo EXTRA_DIST = README jm-glibc-io.m4n Makefile.am.in|tr '\012' @);\ + (((echo EXTRA_DIST =; \ + echo " README jm-glibc-io.m4 jm-glibc-io.m4n Makefile.am.in" \ + ) | tr '\012' @); \ (echo *.m4|tr ' ' @) ) \ |sed 's/@$$/%/;s/@/ \\@/g' |tr @% '\012\012' \ >> $@t sed -n '/^##m4-files-end/,$$p' $< >> $@t echo >> $@t - echo all-local: jm-glibc-io.m4 >> $@t + echo all-local: glibc-io.stamp >> $@t chmod a-w $@t mv $@t $@ @@ -24,14 +26,27 @@ unlocked_functions = \ comma_separated = $(shell echo $(unlocked_functions)|tr -s ' ' ,) base_functions = $(patsubst %_unlocked,%,$(unlocked_functions)) -jm-glibc-io.m4: jm-glibc-io.m4n Makefile - echo 'dnl This file is automatically generated from $<' > $@t - echo '' >> $@t - sed \ - -e 's/@space_separated@/$(unlocked_functions)/g' \ - -e 's/@comma_separated@/$(comma_separated)/g' \ - $< >> $@t - move-if-change $@t $@ + +# Don't depend directly on jm-glibc-io.m4, because that would cause it +# to be created in non-srcdir==. builds, and that leads to problems with +# distcheck. Note also that we can't add it to DISTCLEANFILES for similar +# reasons. +glibc-io.stamp: jm-glibc-io.m4n Makefile + if test `pwd` = `cd $(srcdir); pwd`; then \ + t=jm-glibc-io.m4; \ + src=$(srcdir)/jm-glibc-io.m4n; \ + echo "dnl This file is automatically generated from $${t}n." \ + > $${t}t; \ + echo '' >> $${t}t; \ + sed \ + -e 's/@space_separated@/$(unlocked_functions)/g' \ + -e 's/@comma_separated@/$(comma_separated)/g' \ + $$src >> $${t}t; \ + move-if-change $${t}t $$t; \ + fi + touch $@ + +DISTCLEANFILES = glibc-io.stamp unlocked-io.h: unlocked-io.hin Makefile.am.in tmp=t$$$$; \ |