aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorXiretza <xiretza@xiretza.xyz>2020-01-29 18:07:13 +0100
committerXiretza <xiretza@xiretza.xyz>2020-01-29 19:10:54 +0100
commit2a746234fec2f6d14e9bfa40fd7f3478cdd539ea (patch)
tree3e195c7a9db87bb05cbbbdbcfa08182ef1b1b06b /Makefile
parent1679682fa3ae18282b49452891282901a3548ecc (diff)
downloadyosys-2a746234fec2f6d14e9bfa40fd7f3478cdd539ea.tar.gz
yosys-2a746234fec2f6d14e9bfa40fd7f3478cdd539ea.tar.bz2
yosys-2a746234fec2f6d14e9bfa40fd7f3478cdd539ea.zip
Clean up 'install' Makefile target
- libyosys.so is now only installed to LIBDIR instead of LIBDIR, BINDIR and PYTHON_DESTDIR - replace mkdir/cp for single files with `install`
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 4 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 43c4d0890..f147a4f47 100644
--- a/Makefile
+++ b/Makefile
@@ -763,8 +763,7 @@ clean-unit-test:
@$(MAKE) -C $(UNITESTPATH) clean
install: $(TARGETS) $(EXTRA_TARGETS)
- $(INSTALL_SUDO) mkdir -p $(DESTDIR)$(BINDIR)
- $(INSTALL_SUDO) cp $(TARGETS) $(DESTDIR)$(BINDIR)
+ $(INSTALL_SUDO) install -D -t $(DESTDIR)$(BINDIR) $(filter-out libyosys.so,$(TARGETS))
ifneq ($(filter yosys,$(TARGETS)),)
$(INSTALL_SUDO) $(STRIP) -S $(DESTDIR)$(BINDIR)/yosys
endif
@@ -777,13 +776,11 @@ endif
$(INSTALL_SUDO) mkdir -p $(DESTDIR)$(DATDIR)
$(INSTALL_SUDO) cp -r share/. $(DESTDIR)$(DATDIR)/.
ifeq ($(ENABLE_LIBYOSYS),1)
- $(INSTALL_SUDO) mkdir -p $(DESTDIR)$(LIBDIR)
- $(INSTALL_SUDO) cp libyosys.so $(DESTDIR)$(LIBDIR)/
+ $(INSTALL_SUDO) install -D -t $(DESTDIR)$(LIBDIR) libyosys.so
$(INSTALL_SUDO) $(STRIP) -S $(DESTDIR)$(LIBDIR)/libyosys.so
ifeq ($(ENABLE_PYOSYS),1)
- $(INSTALL_SUDO) mkdir -p $(PYTHON_DESTDIR)/pyosys
- $(INSTALL_SUDO) cp libyosys.so $(PYTHON_DESTDIR)/pyosys/
- $(INSTALL_SUDO) cp misc/__init__.py $(PYTHON_DESTDIR)/pyosys/
+ $(INSTALL_SUDO) install -Dm644 -t $(PYTHON_DESTDIR)/pyosys/ misc/__init__.py
+ $(INSTALL_SUDO) ln -s $(LIBDIR)/libyosys.so $(PYTHON_DESTDIR)/pyosys/
endif
endif