!10 Fix Makefile regression wrt bin/lfeexec

From: @lb1107039128 
Reviewed-by: @Charlie_li 
Signed-off-by: @Charlie_li
This commit is contained in:
openeuler-ci-bot 2023-12-25 07:42:02 +00:00 committed by Gitee
commit 35854f19d0
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 65 additions and 1 deletions

View File

@ -0,0 +1,59 @@
From 095afbeda6c28a39ee3bdfc200f4fda1f5297506 Mon Sep 17 00:00:00 2001
From: Eric Bailey <eric@ericb.me>
Date: Mon, 5 Jun 2017 16:34:52 -0500
Subject: [PATCH] Fix Makefile regression wrt bin/lfeexec
- Separate install target into install-{beam,bin}
- Use install's -t flag in install-{beam,bin}
- Add install-{beam,bin,man} to .PHONY
---
Makefile | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/Makefile b/Makefile
index 59f2c06..01a364a 100644
--- a/Makefile
+++ b/Makefile
@@ -89,7 +89,7 @@ $(EBINDIR)/%.beam: $(LSRCDIR)/%.lfe
all: compile
-.PHONY: compile erlc-compile lfec-compile erlc-lfec emacs install docs clean docker-build docker-push docker update-mandb
+.PHONY: compile erlc-compile lfec-compile erlc-lfec emacs install install-beam install-bin install-man docs clean docker-build docker-push docker update-mandb
compile: comp_opts.mk
$(MAKE) $(MFLAGS) erlc-lfec
@@ -117,17 +117,23 @@ comp_opts.mk:
-include comp_opts.mk
-$(BINDIR)/lfe%:
- $(INSTALL_BIN) $@ $(DESTBINDIR)
+install: compile install-beam install-bin install-man
-install: compile install-man
+install-beam:
rm -Rf $(DESTEBINDIR)
$(INSTALL_DIR) $(DESTEBINDIR)
- $(INSTALL_DATA) $(EBINDIR)/$(APP_DEF) $(DESTEBINDIR)
- $(INSTALL_DATA) $(addprefix $(EBINDIR)/, $(EBINS)) $(DESTEBINDIR)
- $(INSTALL_DATA) $(addprefix $(EBINDIR)/, $(LBINS)) $(DESTEBINDIR)
+ $(INSTALL_DATA) -t $(DESTEBINDIR) \
+ $(EBINDIR)/$(APP_DEF) \
+ $(addprefix $(EBINDIR)/, $(EBINS)) \
+ $(addprefix $(EBINDIR)/, $(LBINS))
+
+install-bin:
$(INSTALL_DIR) $(DESTBINDIR)
- $(MAKE) $(BINDIR)/lfe $(BINDIR)/lfec $(BINDIR)/lfedoc $(BINDIR)/lfescript
+ $(INSTALL_BIN) -t $(DESTBINDIR) \
+ $(BINDIR)/lfe \
+ $(BINDIR)/lfec \
+ $(BINDIR)/lfedoc \
+ $(BINDIR)/lfescript
ln -sf $(DESTBINDIR)/* $(PREFIX)/bin/
clean:
--
2.42.0.windows.2

View File

@ -7,7 +7,7 @@
%endif
Name: erlang-%{realname}
Version: 1.3
Release: 1
Release: 2
Summary: Lisp Flavoured Erlang
License: BSD
URL: https://github.com/%{upstream}/%{realname}
@ -15,6 +15,7 @@ VCS: scm:git:https://github.com/%{upstream}/%{realname}.git
Source0: https://github.com/%{upstream}/%{realname}/archive/%{version}/%{realname}-%{version}.tar.gz
Patch1: erlang-lfe-0001-Remove-support-for-erlang-packages.patch
Patch2: erlang-lfe-0002-Convert-to-proper-UTF-8.patch
Patch3: 0001-Fix-Makefile-regression-wrt-bin-lfeexec.patch
%if 0%{?need_bootstrap}
BuildRequires: erlang-erts erlang-rpm-macros
%else
@ -34,6 +35,7 @@ code. An LFE evaluator and shell is also included.
%setup -q -n %{realname}-%{version}
%patch1 -p1 -b .no_erl_packages
%patch2 -p1 -b .proper_utf8
%patch3 -p1
%build
%if 0%{?need_bootstrap}
@ -88,5 +90,8 @@ echo "No tests during bootstrapping"
%{_emacs_sitestartdir}/lfe-start.el
%changelog
* Wed Dec 13 2023 liubo <liubo1@xfusion.com> - 1.3-2
- Fix Makefile regression wrt bin/lfeexec
* Sat Aug 29 2020 wangyue <wangyue92@huawei.com> - 1.3-1
- package init