Browse Source

- move helper scripts to support folder

master
vanhofen 4 years ago
parent
commit
d937aba51b
  1. 34
      Makefile
  2. 8
      make/buildsystem-helpers.mk
  3. 3
      make/environment-build.mk
  4. 2
      make/target-scripts.mk
  5. 0
      support/misc/utils.mk
  6. 0
      support/scripts/get-git-archive.sh
  7. 0
      support/scripts/get-git-source.sh
  8. 0
      support/scripts/get-svn-source.sh
  9. 0
      support/scripts/update-rc.d

34
Makefile

@ -3,13 +3,42 @@
# #
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
MAINTAINER := $(shell whoami)
UID := $(shell id -u) UID := $(shell id -u)
ifeq ($(UID),0) ifeq ($(UID),0)
warn: warn:
@echo "You are running as root. Don't do this, it's dangerous." @echo "You are running as root. Do not do this, it is dangerous."
@echo "Refusing to build. Good bye." @echo "Aborting the build. Log in as a regular user and retry."
else else
# Delete default rules. We don't use them. This saves a bit of time.
.SUFFIXES:
# we want bash as shell
SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
else if [ -x /bin/bash ]; then echo /bin/bash; \
else echo sh; fi; fi)
# Include some helper macros and variables
include support/misc/utils.mk
# bash prints the name of the directory on 'cd <dir>' if CDPATH is
# set, so unset it here to not cause problems. Notice that the export
# line doesn't affect the environment of $(shell ..) calls.
export CDPATH :=
# Disable top-level parallel build if per-package directories is not
# used. Indeed, per-package directories is necessary to guarantee
# determinism and reproducibility with top-level parallel build.
.NOTPARALLEL:
# kconfig uses CONFIG_SHELL
CONFIG_SHELL := $(SHELL)
export SHELL CONFIG_SHELL
# -----------------------------------------------------------------------------
# first target is default ... # first target is default ...
default: all default: all
@ -81,7 +110,6 @@ Makefile.local:
@cp Makefile.example $@ @cp Makefile.example $@
-include config.local -include config.local
include make/buildsystem-utils.mk
include make/environment-box.mk include make/environment-box.mk
include make/environment-linux.mk include make/environment-linux.mk
include make/environment-build.mk include make/environment-build.mk

8
make/buildsystem-helpers.mk

@ -34,10 +34,10 @@ define INSTALL_EXIST # (source, dest)
fi fi
endef endef
GET-GIT-ARCHIVE = $(HELPERS_DIR)/get-git-archive.sh GET-GIT-ARCHIVE = support/scripts/get-git-archive.sh
GET-GIT-SOURCE = $(HELPERS_DIR)/get-git-source.sh GET-GIT-SOURCE = support/scripts/get-git-source.sh
GET-SVN-SOURCE = $(HELPERS_DIR)/get-svn-source.sh GET-SVN-SOURCE = support/scripts/get-svn-source.sh
UPDATE-RC.D = $(HELPERS_DIR)/update-rc.d -r $(TARGET_DIR) UPDATE-RC.D = support/scripts/update-rc.d -r $(TARGET_DIR)
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# execute local scripts # execute local scripts

3
make/environment-build.mk

@ -6,8 +6,6 @@
LD_LIBRARY_PATH = LD_LIBRARY_PATH =
export LD_LIBRARY_PATH export LD_LIBRARY_PATH
SHELL := /bin/bash
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
ifndef MAKE ifndef MAKE
@ -116,7 +114,6 @@ LOCAL_DIR = $(BASE_DIR)/local
STAGING_DIR = $(BASE_DIR)/staging STAGING_DIR = $(BASE_DIR)/staging
IMAGE_DIR = $(STAGING_DIR)/images IMAGE_DIR = $(STAGING_DIR)/images
UPDATE_DIR = $(STAGING_DIR)/updates UPDATE_DIR = $(STAGING_DIR)/updates
HELPERS_DIR = $(BASE_DIR)/helpers
CROSS_BASE = $(BASE_DIR)/cross CROSS_BASE = $(BASE_DIR)/cross
CROSS_DIR ?= $(CROSS_BASE)/$(TARGET_ARCH)-linux-$(KERNEL_VER) CROSS_DIR ?= $(CROSS_BASE)/$(TARGET_ARCH)-linux-$(KERNEL_VER)
STATIC_BASE = $(BASE_DIR)/static STATIC_BASE = $(BASE_DIR)/static

2
make/target-scripts.mk

@ -178,7 +178,7 @@ $(TARGET_sbindir)/service:
$(INSTALL_EXEC) -D $(TARGET_FILES)/scripts/service $(@) $(INSTALL_EXEC) -D $(TARGET_FILES)/scripts/service $(@)
$(TARGET_sbindir)/update-rc.d: $(TARGET_sbindir)/update-rc.d:
$(INSTALL_EXEC) -D $(HELPERS_DIR)/update-rc.d $(@) $(INSTALL_EXEC) -D support/scripts/update-rc.d $(@)
$(TARGET_datadir)/udhcpc/default.script: $(TARGET_datadir)/udhcpc/default.script:
$(INSTALL_EXEC) -D $(TARGET_FILES)/scripts/udhcpc-default.script $(@) $(INSTALL_EXEC) -D $(TARGET_FILES)/scripts/udhcpc-default.script $(@)

0
make/buildsystem-utils.mk → support/misc/utils.mk

0
helpers/get-git-archive.sh → support/scripts/get-git-archive.sh

0
helpers/get-git-source.sh → support/scripts/get-git-source.sh

0
helpers/get-svn-source.sh → support/scripts/get-svn-source.sh

0
helpers/update-rc.d → support/scripts/update-rc.d

Loading…
Cancel
Save