mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-27 10:29:18 +08:00
remove leading/tailing "/" from installation RELPATHs
This commit is contained in:
parent
1ca235e58f
commit
9cf2cd7ca9
8 changed files with 45 additions and 47 deletions
38
Makefile
38
Makefile
|
@ -27,24 +27,24 @@ install: all common/install
|
|||
common/install:
|
||||
$(info [@] Installing common resources to $(MYDESTDIR)$(PREFIX)...)
|
||||
ifneq (,$(INSTALLSCRIPTS))
|
||||
$(Q)$(MKDIR) $(DESTDIR)$(PREFIX)$(INSTALLBINRELPATH)
|
||||
$(Q)$(CP) $(INSTALLSCRIPTS) $(DESTDIR)$(PREFIX)$(INSTALLBINRELPATH)
|
||||
$(Q)$(MKDIR) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLBINRELPATH)
|
||||
$(Q)$(CP) $(INSTALLSCRIPTS) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLBINRELPATH)
|
||||
endif
|
||||
ifneq (,$(INSTALLSHARES))
|
||||
$(Q)$(MKDIR) $(DESTDIR)$(PREFIX)$(INSTALLSHARERELPATH)
|
||||
$(Q)$(CP) $(INSTALLSHARES) $(DESTDIR)$(PREFIX)$(INSTALLSHARERELPATH)
|
||||
$(Q)$(MKDIR) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLSHARERELPATH)
|
||||
$(Q)$(CP) $(INSTALLSHARES) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLSHARERELPATH)
|
||||
endif
|
||||
ifneq (,$(INSTALLDOCS))
|
||||
$(Q)$(MKDIR) $(DESTDIR)$(PREFIX)$(INSTALLDOCSRELPATH)
|
||||
$(Q)$(CP) $(INSTALLDOCS) $(DESTDIR)$(PREFIX)$(INSTALLDOCSRELPATH)
|
||||
$(Q)$(MKDIR) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLDOCSRELPATH)
|
||||
$(Q)$(CP) $(INSTALLDOCS) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLDOCSRELPATH)
|
||||
endif
|
||||
ifneq (,$(INSTALLTOOLS))
|
||||
$(Q)$(MKDIR) $(DESTDIR)$(PREFIX)$(INSTALLTOOLSRELPATH)
|
||||
$(Q)$(CP) $(foreach tool,$(INSTALLTOOLS),tools/$(tool)) $(DESTDIR)$(PREFIX)$(INSTALLTOOLSRELPATH)
|
||||
$(Q)$(MKDIR) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLTOOLSRELPATH)
|
||||
$(Q)$(CP) $(foreach tool,$(INSTALLTOOLS),tools/$(tool)) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLTOOLSRELPATH)
|
||||
endif
|
||||
ifneq (,$(INSTALLSIMFW))
|
||||
$(Q)$(MKDIR) $(DESTDIR)$(PREFIX)$(INSTALLFWRELPATH)
|
||||
$(Q)$(CP) $(foreach fw,$(INSTALLSIMFW),tools/simmodule/$(fw)) $(DESTDIR)$(PREFIX)$(INSTALLFWRELPATH)
|
||||
$(Q)$(MKDIR) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLFWRELPATH)
|
||||
$(Q)$(CP) $(foreach fw,$(INSTALLSIMFW),tools/simmodule/$(fw)) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLFWRELPATH)
|
||||
endif
|
||||
ifeq ($(platform),Linux)
|
||||
$(Q)$(MKDIR) $(DESTDIR)$(UDEV_PREFIX)
|
||||
|
@ -56,27 +56,27 @@ uninstall: common/uninstall
|
|||
common/uninstall:
|
||||
$(info [@] Uninstalling common resources from $(MYDESTDIR)$(PREFIX)...)
|
||||
ifneq (,$(INSTALLSCRIPTS))
|
||||
$(Q)$(RM) $(foreach script,$(INSTALLSCRIPTS),$(DESTDIR)$(PREFIX)$(INSTALLBINRELPATH)$(notdir $(script)))
|
||||
$(Q)$(RM) $(foreach script,$(INSTALLSCRIPTS),$(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLBINRELPATH)$(PATHSEP)$(notdir $(script)))
|
||||
endif
|
||||
ifneq (,$(INSTALLSHARES))
|
||||
$(Q)$(RMDIR) $(foreach share,$(INSTALLSHARES),$(DESTDIR)$(PREFIX)$(INSTALLSHARERELPATH)$(notdir $(share)))
|
||||
$(Q)$(RMDIR) $(foreach share,$(INSTALLSHARES),$(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLSHARERELPATH)$(PATHSEP)$(notdir $(share)))
|
||||
endif
|
||||
ifneq (,$(INSTALLDOCS))
|
||||
$(Q)$(RMDIR) $(foreach doc,$(INSTALLDOCS),$(DESTDIR)$(PREFIX)$(INSTALLDOCSRELPATH)$(notdir $(doc)))
|
||||
$(Q)$(RMDIR_SOFT) $(DESTDIR)$(PREFIX)$(INSTALLDOCSRELPATH)
|
||||
$(Q)$(RMDIR) $(foreach doc,$(INSTALLDOCS),$(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLDOCSRELPATH)$(PATHSEP)$(notdir $(doc)))
|
||||
$(Q)$(RMDIR_SOFT) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLDOCSRELPATH)
|
||||
endif
|
||||
ifneq (,$(INSTALLTOOLS))
|
||||
$(Q)$(RM) $(foreach tool,$(INSTALLTOOLS),$(DESTDIR)$(PREFIX)$(INSTALLTOOLSRELPATH)$(notdir $(tool)))
|
||||
$(Q)$(RM) $(foreach tool,$(INSTALLTOOLS),$(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLTOOLSRELPATH)$(PATHSEP)$(notdir $(tool)))
|
||||
endif
|
||||
$(Q)$(RMDIR_SOFT) $(DESTDIR)$(PREFIX)$(INSTALLTOOLSRELPATH)
|
||||
$(Q)$(RMDIR_SOFT) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLTOOLSRELPATH)
|
||||
ifneq (,$(INSTALLSIMFW))
|
||||
$(Q)$(RM) $(foreach fw,$(INSTALLSIMFW),$(DESTDIR)$(PREFIX)$(INSTALLFWRELPATH)$(notdir $(fw)))
|
||||
$(Q)$(RM) $(foreach fw,$(INSTALLSIMFW),$(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLFWRELPATH)$(PATHSEP)$(notdir $(fw)))
|
||||
endif
|
||||
$(Q)$(RMDIR_SOFT) $(DESTDIR)$(PREFIX)$(INSTALLFWRELPATH)
|
||||
$(Q)$(RMDIR_SOFT) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLFWRELPATH)
|
||||
ifeq ($(platform),Linux)
|
||||
$(Q)$(RM) $(DESTDIR)$(UDEV_PREFIX)/77-pm3-usb-device-blacklist.rules
|
||||
endif
|
||||
$(Q)$(RMDIR_SOFT) $(DESTDIR)$(PREFIX)$(INSTALLSHARERELPATH)
|
||||
$(Q)$(RMDIR_SOFT) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLSHARERELPATH)
|
||||
|
||||
mfkey/%: FORCE
|
||||
$(info [*] MAKE $@)
|
||||
|
|
|
@ -26,13 +26,13 @@ CXX = g++
|
|||
LD = g++
|
||||
|
||||
PATHSEP=/
|
||||
PREFIX ?= /usr/local
|
||||
UDEV_PREFIX ?= /etc/udev/rules.d
|
||||
INSTALLBINRELPATH ?= /bin/
|
||||
INSTALLSHARERELPATH ?= /share/proxmark3/
|
||||
INSTALLFWRELPATH ?= /share/proxmark3/firmware/
|
||||
INSTALLTOOLSRELPATH ?= /share/proxmark3/tools/
|
||||
INSTALLDOCSRELPATH ?= /share/doc/proxmark3/
|
||||
PREFIX ?= /usr/local
|
||||
UDEV_PREFIX ?= /etc/udev/rules.d
|
||||
INSTALLBINRELPATH ?= bin
|
||||
INSTALLSHARERELPATH ?= share/proxmark3
|
||||
INSTALLFWRELPATH ?= share/proxmark3/firmware
|
||||
INSTALLTOOLSRELPATH ?= share/proxmark3/tools
|
||||
INSTALLDOCSRELPATH ?= share/doc/proxmark3
|
||||
|
||||
platform = $(shell uname)
|
||||
DETECTED_OS=$(platform)
|
||||
|
|
|
@ -37,15 +37,15 @@ clean:
|
|||
install: all
|
||||
ifneq (,$(INSTALLTOOLS))
|
||||
$(info [@] Installing $(BINS) to $(DESTDIR)$(PREFIX)...)
|
||||
$(Q)$(MKDIR) $(DESTDIR)$(PREFIX)$(INSTALLTOOLSRELPATH)
|
||||
$(Q)$(CP) $(INSTALLTOOLS) $(DESTDIR)$(PREFIX)$(INSTALLTOOLSRELPATH)
|
||||
$(Q)$(MKDIR) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLTOOLSRELPATH)
|
||||
$(Q)$(CP) $(INSTALLTOOLS) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLTOOLSRELPATH)
|
||||
endif
|
||||
@true
|
||||
|
||||
uninstall:
|
||||
ifneq (,$(INSTALLTOOLS))
|
||||
$(info [@] Uninstalling $(BINS) from $(DESTDIR)$(PREFIX)...)
|
||||
$(Q)$(RM) $(foreach tool,$(INSTALLTOOLS),$(DESTDIR)$(PREFIX)$(INSTALLTOOLSRELPATH)$(notdir $(tool)))
|
||||
$(Q)$(RM) $(foreach tool,$(INSTALLTOOLS),$(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLTOOLSRELPATH)$(PATHSEP)$(notdir $(tool)))
|
||||
endif
|
||||
@true
|
||||
|
||||
|
|
|
@ -222,12 +222,12 @@ clean:
|
|||
|
||||
install: all
|
||||
$(info [@] Installing fullimage to $(DESTDIR)$(PREFIX)...)
|
||||
$(Q)$(MKDIR) $(DESTDIR)$(PREFIX)$(INSTALLFWRELPATH)
|
||||
$(Q)$(CP) $(INSTALLFW) $(DESTDIR)$(PREFIX)$(INSTALLFWRELPATH)$(INSTALLFWTAG)
|
||||
$(Q)$(MKDIR) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLFWRELPATH)
|
||||
$(Q)$(CP) $(INSTALLFW) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLFWRELPATH)$(PATHSEP)$(INSTALLFWTAG)
|
||||
|
||||
uninstall:
|
||||
$(info [@] Uninstalling fullimage from $(DESTDIR)$(PREFIX)...)
|
||||
$(Q)$(RM) $(DESTDIR)$(PREFIX)$(INSTALLFWRELPATH)$(INSTALLFWTAG)
|
||||
$(Q)$(RM) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLFWRELPATH)$(PATHSEP)$(INSTALLFWTAG)
|
||||
|
||||
.PHONY: all clean help install uninstall
|
||||
help:
|
||||
|
|
|
@ -60,12 +60,12 @@ clean:
|
|||
|
||||
install: all
|
||||
$(info [@] Installing bootrom to $(DESTDIR)$(PREFIX)...)
|
||||
$(Q)$(MKDIR) $(DESTDIR)$(PREFIX)$(INSTALLFWRELPATH)
|
||||
$(Q)$(CP) $(INSTALLFW) $(DESTDIR)$(PREFIX)$(INSTALLFWRELPATH)
|
||||
$(Q)$(MKDIR) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLFWRELPATH)
|
||||
$(Q)$(CP) $(INSTALLFW) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLFWRELPATH)
|
||||
|
||||
uninstall:
|
||||
$(info [@] Uninstalling bootrom from $(DESTDIR)$(PREFIX)...)
|
||||
$(Q)$(RM) $(foreach fw,$(INSTALLFW),$(DESTDIR)$(PREFIX)$(INSTALLFWRELPATH)$(notdir $(fw)))
|
||||
$(Q)$(RM) $(foreach fw,$(INSTALLFW),$(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLFWRELPATH)$(PATHSEP)$(notdir $(fw)))
|
||||
|
||||
.PHONY: all clean help install
|
||||
help:
|
||||
|
|
|
@ -328,22 +328,22 @@ clean:
|
|||
install: all
|
||||
$(info [@] Installing client to $(DESTDIR)$(PREFIX)...)
|
||||
ifneq (,$(INSTALLBIN))
|
||||
$(Q)$(MKDIR) $(DESTDIR)$(PREFIX)$(INSTALLBINRELPATH)
|
||||
$(Q)$(CP) $(INSTALLBIN) $(DESTDIR)$(PREFIX)$(INSTALLBINRELPATH)
|
||||
$(Q)$(MKDIR) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLBINRELPATH)
|
||||
$(Q)$(CP) $(INSTALLBIN) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLBINRELPATH)
|
||||
endif
|
||||
ifneq (,$(INSTALLSHARE))
|
||||
$(Q)$(MKDIR) $(DESTDIR)$(PREFIX)$(INSTALLSHARERELPATH)
|
||||
$(Q)$(CP) $(INSTALLSHARE) $(DESTDIR)$(PREFIX)$(INSTALLSHARERELPATH)
|
||||
$(Q)$(MKDIR) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLSHARERELPATH)
|
||||
$(Q)$(CP) $(INSTALLSHARE) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLSHARERELPATH)
|
||||
endif
|
||||
@true
|
||||
|
||||
uninstall:
|
||||
$(info [@] Uninstalling client from $(DESTDIR)$(PREFIX)...)
|
||||
ifneq (,$(INSTALLBIN))
|
||||
$(Q)$(RM) $(foreach tool,$(INSTALLBIN),$(DESTDIR)$(PREFIX)$(INSTALLBINRELPATH)$(notdir $(tool)))
|
||||
$(Q)$(RM) $(foreach tool,$(INSTALLBIN),$(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLBINRELPATH)$(PATHSEP)$(notdir $(tool)))
|
||||
endif
|
||||
ifneq (,$(INSTALLSHARE))
|
||||
$(Q)$(RMDIR) $(foreach tool,$(INSTALLSHARE),$(DESTDIR)$(PREFIX)$(INSTALLSHARERELPATH)$(notdir $(tool)))
|
||||
$(Q)$(RMDIR) $(foreach tool,$(INSTALLSHARE),$(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLSHARERELPATH)$(PATHSEP)$(notdir $(tool)))
|
||||
endif
|
||||
@true
|
||||
|
||||
|
|
|
@ -31,11 +31,9 @@ If you need to tune some more paths, see their definition in `Makefile.defs`.
|
|||
E.g. you might need to move the documentation elsewhere according to your distro policy:
|
||||
|
||||
```
|
||||
make install PREFIX=/usr INSTALLDOCSRELPATH=/share/doc/proxmark3-${version}/
|
||||
make install PREFIX=/usr INSTALLDOCSRELPATH=share/doc/proxmark3-${version}
|
||||
```
|
||||
|
||||
Be careful to respect the same leading/closing `/` schema else you'll mess up your paths!
|
||||
|
||||
It's possible to add other firmwares as well with tagged names (`FWTAG=<mytag>`), e.g. here we're compiling another image for non-RDV4 devices:
|
||||
|
||||
```
|
||||
|
|
|
@ -28,11 +28,11 @@ clean:
|
|||
|
||||
install: all
|
||||
$(info [@] Installing recovery to $(DESTDIR)$(PREFIX)...)
|
||||
$(Q)$(MKDIR) $(DESTDIR)$(PREFIX)$(INSTALLFWRELPATH)
|
||||
$(Q)$(CP) $(INSTALLFW) $(DESTDIR)$(PREFIX)$(INSTALLFWRELPATH)$(INSTALLFWTAG)
|
||||
$(Q)$(MKDIR) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLFWRELPATH)
|
||||
$(Q)$(CP) $(INSTALLFW) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLFWRELPATH)$(PATHSEP)$(INSTALLFWTAG)
|
||||
|
||||
uninstall:
|
||||
$(info [@] Uninstalling recovery from $(DESTDIR)$(PREFIX)...)
|
||||
$(Q)$(RM) $(DESTDIR)$(PREFIX)$(INSTALLFWRELPATH)$(INSTALLFWTAG)
|
||||
$(Q)$(RM) $(DESTDIR)$(PREFIX)$(PATHSEP)$(INSTALLFWRELPATH)$(PATHSEP)$(INSTALLFWTAG)
|
||||
|
||||
.PHONY: all clean install uninstall
|
||||
|
|
Loading…
Reference in a new issue