Commit 05cd2de5 authored by Per Cederqvist's avatar Per Cederqvist

MacOS X compat: Don't process vars.el.in with sed.

At least on MacOS X, sed fails with "sed: RE error: illegal byte
sequence" if LC_CTYPE is set to an UTF-8 encoding, probably due
to the Latin-1 characters in the definition of
lyskom-mule-compiled.  Since the substitution of the version
number was the only reason to process vars.el.in, stop doing so
to avoid this problem.

Thanks to Calle Dybedahl for reporting this problem.
parent 425b45a3
...@@ -2,5 +2,4 @@ ...@@ -2,5 +2,4 @@
/lyskom.el /lyskom.el
/lyskom.elc /lyskom.elc
/swedish-help.el /swedish-help.el
/vars.el
/version.el /version.el
2013-05-06 Per Cederqvist <ceder@lysator.liu.se> 2013-05-06 Per Cederqvist <ceder@lysator.liu.se>
Don't process vars.el.in with sed. At least on MacOS X, sed fails
with "sed: RE error: illegal byte sequence" if LC_CTYPE is set to
an UTF-8 encoding, probably due to the Latin-1 characters in the
definition of lyskom-mule-compiled. Since the substitution of the
version number was the only reason to process vars.el.in, stop
doing so to avoid this problem. Thanks to Calle Dybedahl for
reporting this problem.
* vars.el.in: Renamed to vars.el.
* .gitignore: Don't ignore vars.el.
* Makefile (HEADER): Include vars.el instead of $(VARS-EL). Don't
set $(VARS-EL).
(vars.el): Target removed. This is a regular file now.
(vars.el-release): Target removed. This file is no longer used.
($(TARGET-EL) lyskom-all-$(CLIENTVERSION).el): Don't handle
$(VARS-EL).
(release): Don't depend on $(VARS-EL).
(clean): Don't remove vars.el or vars.el-release.
Move the version number from vars.el.in to a separate file. Move the version number from vars.el.in to a separate file.
* version.el.in: New file. * version.el.in: New file.
(lyskom-clientversion): Moved from vars.el.in. (lyskom-clientversion): Moved from vars.el.in.
......
...@@ -58,7 +58,7 @@ HEADER = header.el \ ...@@ -58,7 +58,7 @@ HEADER = header.el \
defvar.el \ defvar.el \
feature.el \ feature.el \
$(VERSION-EL) \ $(VERSION-EL) \
$(VARS-EL) \ vars.el \
macros.el \ macros.el \
compatibility.el \ compatibility.el \
language.el \ language.el \
...@@ -135,12 +135,6 @@ PACKAGENAME = lyskom-elisp-client ...@@ -135,12 +135,6 @@ PACKAGENAME = lyskom-elisp-client
DEFAULTLISPDIR = /usr/local/share/emacs/site-lisp DEFAULTLISPDIR = /usr/local/share/emacs/site-lisp
DEFAULTPREFIX = /usr/local DEFAULTPREFIX = /usr/local
ifeq ($(MAKECMDGOALS),release)
VARS-EL = vars.el-release
else
VARS-EL = vars.el
endif
ifeq ($(MAKECMDGOALS),release) ifeq ($(MAKECMDGOALS),release)
VERSION-EL = version.el-release VERSION-EL = version.el-release
else else
...@@ -151,14 +145,6 @@ EMACS-BATCH := $(EMACS) -batch ...@@ -151,14 +145,6 @@ EMACS-BATCH := $(EMACS) -batch
all: $(TARGET) all: $(TARGET)
vars.el: vars.el.in Makefile
rm -f $@
sed "s/@@CLIENTVERSION@@/$(CLIENTVERSION) (`date +%Y-%m-%d`; Git)/g" <$< >$@
chmod 444 $@
vars.el-release: vars.el.in Makefile
sed 's/@@CLIENTVERSION@@/$(CLIENTVERSION)/g' <$< >$@
version.el: version.el.in Makefile version.el: version.el.in Makefile
rm -f $@ rm -f $@
sed "s/@@CLIENTVERSION@@/$(CLIENTVERSION) (`date +%Y-%m-%d`; Git)/g" <$< >$@ sed "s/@@CLIENTVERSION@@/$(CLIENTVERSION) (`date +%Y-%m-%d`; Git)/g" <$< >$@
...@@ -169,8 +155,8 @@ version.el-release: version.el.in Makefile ...@@ -169,8 +155,8 @@ version.el-release: version.el.in Makefile
$(TARGET-EL) lyskom-all-$(CLIENTVERSION).el: \ $(TARGET-EL) lyskom-all-$(CLIENTVERSION).el: \
$(HEADER) $(LANGUAGE-EL) $(SOURCES) $(HEADER) $(LANGUAGE-EL) $(SOURCES)
rm -f $(VARS-EL) $(VERSION-EL) rm -f $(VERSION-EL)
$(MAKE) $(VARS-EL) $(VERSION-EL) $(MAKE) $(VERSION-EL)
echo ";;;;; -*-coding: x-ctext;-*-" >$@ echo ";;;;; -*-coding: x-ctext;-*-" >$@
cat $^ >>$@ cat $^ >>$@
...@@ -242,7 +228,7 @@ RELEASE-DIST-ARCHIVES := \ ...@@ -242,7 +228,7 @@ RELEASE-DIST-ARCHIVES := \
$(patsubst %,$(PACKAGENAME)-%-$(CLIENTVERSION).tar.gz,$(RELEASE-DIST-FLAVOURS)) \ $(patsubst %,$(PACKAGENAME)-%-$(CLIENTVERSION).tar.gz,$(RELEASE-DIST-FLAVOURS)) \
$(patsubst %,$(PACKAGENAME)-%-$(CLIENTVERSION).zip,$(RELEASE-DIST-FLAVOURS)) $(patsubst %,$(PACKAGENAME)-%-$(CLIENTVERSION).zip,$(RELEASE-DIST-FLAVOURS))
release: $(VARS-EL) $(VERSION-EL) $(RELEASE-DIST-ARCHIVES) release: $(VERSION-EL) $(RELEASE-DIST-ARCHIVES)
@echo @echo
@echo @echo
@echo "Release archives created:" @echo "Release archives created:"
...@@ -355,7 +341,6 @@ debian-packages: $(RELEASE-BASE-SRC).buildstamp ...@@ -355,7 +341,6 @@ debian-packages: $(RELEASE-BASE-SRC).buildstamp
clean: clean:
rm -f *~ *.gz *.zip *.buildstamp *.elc* _header.el $(TARGET-EL) rm -f *~ *.gz *.zip *.buildstamp *.elc* _header.el $(TARGET-EL)
rm -rf $(PACKAGENAME)-*-$(CLIENTVERSION)* lyskom-*-$(CLIENTVERSION).el rm -rf $(PACKAGENAME)-*-$(CLIENTVERSION)* lyskom-*-$(CLIENTVERSION).el
rm -f vars.el vars.el-release
rm -f version.el version.el-release rm -f version.el version.el-release
rm -f distribution-README-src distribution-README-nonsrc rm -f distribution-README-src distribution-README-nonsrc
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment