mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
OP-1694 make package rule non-nested: moved install target to Linux.mk
This commit is contained in:
parent
81d39562a8
commit
2db0724598
39
Makefile
39
Makefile
@ -897,45 +897,6 @@ dist: $(DIST_DIR) $(DIST_VER_INFO)
|
||||
$(V1) gzip -f "$(DIST_NAME)"
|
||||
|
||||
|
||||
##############################
|
||||
#
|
||||
# Install OpenPilot
|
||||
#
|
||||
##############################
|
||||
prefix := /usr/local
|
||||
bindir := $(prefix)/bin
|
||||
libdir := $(prefix)/lib
|
||||
datadir := $(prefix)/share
|
||||
|
||||
INSTALL = cp -a --no-preserve=ownership
|
||||
LN = ln
|
||||
LN_S = ln -s
|
||||
|
||||
ifeq ($(MAKECMDGOALS), install)
|
||||
ifneq ($(UNAME), Linux)
|
||||
$(error install only supported for Linux)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
.PHONY: install
|
||||
install:
|
||||
@$(ECHO) " INSTALLING GCS TO $(DESTDIR)/)"
|
||||
$(V1) $(MKDIR) -p $(DESTDIR)$(bindir)
|
||||
$(V1) $(MKDIR) -p $(DESTDIR)$(libdir)
|
||||
$(V1) $(MKDIR) -p $(DESTDIR)$(datadir)
|
||||
$(V1) $(MKDIR) -p $(DESTDIR)$(datadir)/applications
|
||||
$(V1) $(MKDIR) -p $(DESTDIR)$(datadir)/pixmaps
|
||||
$(V1) $(MKDIR) -p $(DESTDIR)$(udevdir)
|
||||
$(V1) $(INSTALL) $(BUILD_DIR)/openpilotgcs_$(GCS_BUILD_CONF)/bin/openpilotgcs $(DESTDIR)$(bindir)
|
||||
$(V1) $(INSTALL) $(BUILD_DIR)/openpilotgcs_$(GCS_BUILD_CONF)/bin/udp_test $(DESTDIR)$(bindir)
|
||||
$(V1) $(INSTALL) $(BUILD_DIR)/openpilotgcs_$(GCS_BUILD_CONF)/lib/openpilotgcs $(DESTDIR)$(libdir)
|
||||
$(V1) $(INSTALL) $(BUILD_DIR)/openpilotgcs_$(GCS_BUILD_CONF)/share/openpilotgcs $(DESTDIR)$(datadir)
|
||||
$(V1) $(INSTALL) $(ROOT_DIR)/package/linux/openpilot.desktop $(DESTDIR)$(datadir)/applications
|
||||
$(V1) $(INSTALL) $(ROOT_DIR)/package/linux/openpilot.png $(DESTDIR)$(datadir)/pixmaps
|
||||
$(V1) rm $(DESTDIR)/$(datadir)/openpilotgcs/translations/Makefile
|
||||
|
||||
|
||||
##############################
|
||||
#
|
||||
# Help message, the default Makefile goal
|
||||
|
@ -25,3 +25,36 @@ package:
|
||||
$(V1) mv $(ROOT_DIR)/../$(DEB_PACKAGE_NAME).deb $(BUILD_DIR)/$(DEB_PACKAGE_NAME).deb
|
||||
$(V1) mv $(ROOT_DIR)/../$(DEB_PACKAGE_NAME).changes $(BUILD_DIR)/$(DEB_PACKAGE_NAME).changes
|
||||
$(V1) rm -rf $(DEB_BUILD_DIR)
|
||||
|
||||
##############################
|
||||
#
|
||||
# Install OpenPilot
|
||||
#
|
||||
##############################
|
||||
prefix := /usr/local
|
||||
bindir := $(prefix)/bin
|
||||
libdir := $(prefix)/lib
|
||||
datadir := $(prefix)/share
|
||||
|
||||
INSTALL = cp -a --no-preserve=ownership
|
||||
LN = ln
|
||||
LN_S = ln -s
|
||||
|
||||
.PHONY: install
|
||||
install:
|
||||
@$(ECHO) " INSTALLING GCS TO $(DESTDIR)/)"
|
||||
$(V1) $(MKDIR) -p $(DESTDIR)$(bindir)
|
||||
$(V1) $(MKDIR) -p $(DESTDIR)$(libdir)
|
||||
$(V1) $(MKDIR) -p $(DESTDIR)$(datadir)
|
||||
$(V1) $(MKDIR) -p $(DESTDIR)$(datadir)/applications
|
||||
$(V1) $(MKDIR) -p $(DESTDIR)$(datadir)/pixmaps
|
||||
$(V1) $(MKDIR) -p $(DESTDIR)$(udevdir)
|
||||
$(V1) $(INSTALL) $(BUILD_DIR)/openpilotgcs_$(GCS_BUILD_CONF)/bin/openpilotgcs $(DESTDIR)$(bindir)
|
||||
$(V1) $(INSTALL) $(BUILD_DIR)/openpilotgcs_$(GCS_BUILD_CONF)/bin/udp_test $(DESTDIR)$(bindir)
|
||||
$(V1) $(INSTALL) $(BUILD_DIR)/openpilotgcs_$(GCS_BUILD_CONF)/lib/openpilotgcs $(DESTDIR)$(libdir)
|
||||
$(V1) $(INSTALL) $(BUILD_DIR)/openpilotgcs_$(GCS_BUILD_CONF)/share/openpilotgcs $(DESTDIR)$(datadir)
|
||||
$(V1) $(INSTALL) $(ROOT_DIR)/package/linux/openpilot.desktop $(DESTDIR)$(datadir)/applications
|
||||
$(V1) $(INSTALL) $(ROOT_DIR)/package/linux/openpilot.png $(DESTDIR)$(datadir)/pixmaps
|
||||
$(V1) rm $(DESTDIR)/$(datadir)/openpilotgcs/translations/Makefile
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user