Add -W option to %_emacs_bytecompile

The new option -W to %_emacs_bytecompile causes the byte-compilation
to fail on warnings.  Also, the amendment of load-path is simplified
and the macro %bytecompargs that is no longer used is removed.
This commit is contained in:
Tim Landscheidt 2024-01-17 13:46:33 +00:00
parent 6efc21e5fc
commit 3461073c54

View File

@ -106,7 +106,6 @@ Supplements: (libwayland-server and emacs-common)
%define site_lisp %{_datadir}/emacs/site-lisp
%define site_start_d %{site_lisp}/site-start.d
%define bytecompargs -batch --no-init-file --no-site-file -f batch-byte-compile
%define pkgconfig %{_datadir}/pkgconfig
%define emacs_libexecdir %{_libexecdir}/emacs/%{version}/%{_host}
%define native_lisp %{_libdir}/emacs/%{version}/native-lisp
@ -373,7 +372,7 @@ cat > macros.emacs << EOF
%%_emacs_evr %{?epoch:%{epoch}:}%{version}-%{release}
%%_emacs_sitelispdir %{site_lisp}
%%_emacs_sitestartdir %{site_start_d}
%%_emacs_bytecompile /usr/bin/emacs -batch --no-init-file --no-site-file --eval '(progn (setq load-path (cons "." load-path)))' -f batch-byte-compile
%%_emacs_bytecompile(W) /usr/bin/emacs -batch --no-init-file --no-site-file --eval '(push nil load-path)' %%{-W:--eval '(setq byte-compile-error-on-warn t)' }-f batch-byte-compile %%*
EOF
%install