summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-12-05 14:03:57 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2011-12-05 14:04:37 -0800
commitdb38db483699e1be909df68425f4d8739af229be (patch)
treec1e098eb319e9d31d1657662e279c08ef21e9b72 /src
parentd72e8dff0487d804c09edb6a166b4e90dddf6063 (diff)
downloadcoreutils-db38db483699e1be909df68425f4d8739af229be.tar.xz
maint: don't assume GNU make \# syntax (fix previous)
* src/Makefile.am (fs_normalize_perl_subst, fs-magic, fs-kernel-magic): Undo previous patch; it missed a \#. (fs_normalize_perl_subst): Use \043 rather than \#. \043 is portable to all ASCIIish platforms, whereas \# is portable only to platforms that are compatible with GNU make (and are incompatible with POSIX make). Porting this to EBCDIC is left as an exercise for the reader....
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index e25fed407..f36e13803 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -571,10 +571,11 @@ fs_normalize_perl_subst = \
-e 's/(\s+0x)(\X{6})\b/$${1}00$$2/;' \
-e 's/(\s+0x)(\X{7})\b/$${1}0$$2/;' \
-e 's/^\s+//;' \
- -e 's/^\#define\s+//;' \
+ -e 's/^\043define\s+//;' \
-e 's/^_(XIAFS)/$$1/;' \
-e 's/^USBDEVICE/USBDEVFS/;' \
-e 's/NTFS_SB/NTFS/;' \
+ -e 's/^/\043 define S_MAGIC_/;' \
-e 's,\s*/\* .*? \*/,,;'
CLEANFILES += fs-magic
@@ -582,7 +583,7 @@ fs-magic: Makefile
man statfs \
|perl -ne '/File system types:/.../Nobody kno/ and print' \
|grep 0x | perl -p \
- $(fs_normalize_perl_subst) -e 's/^/# define S_MAGIC_/;' \
+ $(fs_normalize_perl_subst) \
| grep -Ev 'S_MAGIC_EXT[34]|STACK_END' \
| LC_ALL=C sort \
> $@-t && mv $@-t $@
@@ -591,7 +592,7 @@ CLEANFILES += fs-kernel-magic
fs-kernel-magic: Makefile
perl -ne '/^#define.*0x/ and print' /usr/include/linux/magic.h \
| perl -p \
- $(fs_normalize_perl_subst) -e 's/^/# define S_MAGIC_/;' \
+ $(fs_normalize_perl_subst) \
| grep -Ev 'S_MAGIC_EXT[34]|STACK_END' \
| LC_ALL=C sort \
> $@-t && mv $@-t $@