mirror of
https://gitlab.freedesktop.org/xorg/lib/libx11.git
synced 2026-05-05 07:38:01 +02:00
Fix cross-compilation from macOS
We can't use `LC_CTYPE=C sed` there since /usr/bin/sed is not compatible with the expressions in nls/ (`sed: RE error: illegal byte sequence`). To fix this use $(SED) instead which autotools will set to a GNU version of sed (usually /usr/local/bin/gsed) on macOS. Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
This commit is contained in:
parent
401f58f8ba
commit
1c845834a3
2 changed files with 12 additions and 12 deletions
18
cpprules.in
18
cpprules.in
|
|
@ -2,7 +2,7 @@
|
|||
# Rules for generating files using the C pre-processor
|
||||
# (Replaces CppFileTarget from Imake)
|
||||
|
||||
SED = LC_CTYPE=C sed
|
||||
C_SED = LC_CTYPE=C $(SED)
|
||||
|
||||
SUFFIXES += .pre
|
||||
|
||||
|
|
@ -17,14 +17,14 @@ CPP_FILES_FLAGS = $(WCHAR32_FLAGS)
|
|||
# output lines with trailing backslashes.
|
||||
# Allow XHASH to always be substituted, even in cases where XCOMM isn't.
|
||||
|
||||
CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \
|
||||
-e '/^\#line *[0-9][0-9]* *.*$$/d' \
|
||||
-e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \
|
||||
-e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \
|
||||
-e '/^[ ]*XHASH/s/XHASH/\#/' \
|
||||
-e 's,X11_LOCALEDATADIR,$(X11_LOCALEDATADIR),g' \
|
||||
-e '/\@\@$$/s/\@\@$$/\\/' \
|
||||
-e '/^$$/d'
|
||||
CPP_SED_MAGIC = $(C_SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \
|
||||
-e '/^\#line *[0-9][0-9]* *.*$$/d' \
|
||||
-e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \
|
||||
-e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \
|
||||
-e '/^[ ]*XHASH/s/XHASH/\#/' \
|
||||
-e 's,X11_LOCALEDATADIR,$(X11_LOCALEDATADIR),g' \
|
||||
-e '/\@\@$$/s/\@\@$$/\\/' \
|
||||
-e '/^$$/d'
|
||||
|
||||
.pre:
|
||||
@$(MKDIR_P) $(@D)
|
||||
|
|
|
|||
|
|
@ -20,19 +20,19 @@ include $(top_srcdir)/cpprules.in
|
|||
|
||||
locale.alias: locale.alias.pre
|
||||
$(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $(srcdir)/locale.alias.pre | $(CPP_SED_MAGIC) > locale.alias.l1
|
||||
$(SED) -e '/^[^#][^ ]*:/s/://' -e '/^[^#].*[ ].*:/d' \
|
||||
$(C_SED) -e '/^[^#][^ ]*:/s/://' -e '/^[^#].*[ ].*:/d' \
|
||||
< locale.alias.l1 > locale.alias.l2
|
||||
cat locale.alias.l2 locale.alias.l1 > locale.alias
|
||||
|
||||
compose.dir: compose.dir.pre
|
||||
$(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $(srcdir)/compose.dir.pre | $(CPP_SED_MAGIC) > compose.dir.l1
|
||||
$(SED) -e '/^[^#][^ ]*:/s/://' -e '/^[^#].*[ ].*:/d' \
|
||||
$(C_SED) -e '/^[^#][^ ]*:/s/://' -e '/^[^#].*[ ].*:/d' \
|
||||
< compose.dir.l1 > compose.dir.l2
|
||||
cat compose.dir.l2 compose.dir.l1 > compose.dir
|
||||
|
||||
locale.dir: locale.dir.pre
|
||||
$(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $(srcdir)/locale.dir.pre | $(CPP_SED_MAGIC) > locale.dir.l1
|
||||
$(SED) -e '/^[^#][^ ]*:/s/://' -e '/^[^#].*[ ].*:/d' \
|
||||
$(C_SED) -e '/^[^#][^ ]*:/s/://' -e '/^[^#].*[ ].*:/d' \
|
||||
< locale.dir.l1 > locale.dir.l2
|
||||
cat locale.dir.l2 locale.dir.l1 > locale.dir
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue