Move project related info from main Makefile to project dir
This commit is contained in:
parent
74cda1e49b
commit
f958d89724
26
Makefile
26
Makefile
@ -162,14 +162,7 @@ BASE_TARGETS:=uclibc
|
|||||||
endif
|
endif
|
||||||
TARGETS:=
|
TARGETS:=
|
||||||
|
|
||||||
|
include project/Makefile.in
|
||||||
PROJECT:=$(strip $(subst ",,$(BR2_PROJECT)))
|
|
||||||
#"))
|
|
||||||
TARGET_HOSTNAME:=$(strip $(subst ",,$(BR2_HOSTNAME)))
|
|
||||||
#"))
|
|
||||||
BANNER:=$(strip $(subst ",,$(BR2_BANNER)))
|
|
||||||
#"))
|
|
||||||
|
|
||||||
include toolchain/Makefile.in
|
include toolchain/Makefile.in
|
||||||
include package/Makefile.in
|
include package/Makefile.in
|
||||||
|
|
||||||
@ -185,6 +178,8 @@ all: world
|
|||||||
# In this section, we need .config
|
# In this section, we need .config
|
||||||
include .config.cmd
|
include .config.cmd
|
||||||
|
|
||||||
|
include project/*.mk
|
||||||
|
|
||||||
# We also need the various per-package makefiles, which also add
|
# We also need the various per-package makefiles, which also add
|
||||||
# each selected package to TARGETS if that package was selected
|
# each selected package to TARGETS if that package was selected
|
||||||
# in the .config file.
|
# in the .config file.
|
||||||
@ -213,11 +208,13 @@ $(TARGETS): $(BASE_TARGETS)
|
|||||||
|
|
||||||
dirs: $(DL_DIR) $(TOOL_BUILD_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
|
dirs: $(DL_DIR) $(TOOL_BUILD_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
|
||||||
$(BINARIES_DIR) $(PROJECT_BUILD_DIR)
|
$(BINARIES_DIR) $(PROJECT_BUILD_DIR)
|
||||||
|
|
||||||
$(BASE_TARGETS): dirs
|
$(BASE_TARGETS): dirs
|
||||||
|
|
||||||
world: dependencies dirs target-host-info $(BASE_TARGETS) $(TARGETS)
|
world: dependencies dirs target-host-info $(BASE_TARGETS) $(TARGETS)
|
||||||
|
|
||||||
|
|
||||||
.PHONY: all world dirs clean dirclean distclean source target-host-info \
|
.PHONY: all world dirs clean dirclean distclean source \
|
||||||
$(BASE_TARGETS) $(TARGETS) \
|
$(BASE_TARGETS) $(TARGETS) \
|
||||||
$(TARGETS_CLEAN) $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) \
|
$(TARGETS_CLEAN) $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) \
|
||||||
$(DL_DIR) $(TOOL_BUILD_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
|
$(DL_DIR) $(TOOL_BUILD_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
|
||||||
@ -258,17 +255,6 @@ $(PROJECT_BUILD_DIR)/.root: $(TARGET_DIR)
|
|||||||
fi;
|
fi;
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
target-host-info: $(TARGET_DIR)/etc/issue $(TARGET_DIR)/etc/hostname
|
|
||||||
|
|
||||||
$(TARGET_DIR)/etc/issue: .config
|
|
||||||
mkdir -p $(TARGET_DIR)/etc
|
|
||||||
echo "" > $(TARGET_DIR)/etc/issue
|
|
||||||
echo "" >> $(TARGET_DIR)/etc/issue
|
|
||||||
echo "$(BANNER)" >> $(TARGET_DIR)/etc/issue
|
|
||||||
|
|
||||||
$(TARGET_DIR)/etc/hostname: .config
|
|
||||||
mkdir -p $(TARGET_DIR)/etc
|
|
||||||
echo "$(TARGET_HOSTNAME)" > $(TARGET_DIR)/etc/hostname
|
|
||||||
|
|
||||||
source: $(TARGETS_SOURCE) $(HOST_SOURCE)
|
source: $(TARGETS_SOURCE) $(HOST_SOURCE)
|
||||||
|
|
||||||
|
6
project/Makefile.in
Normal file
6
project/Makefile.in
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
PROJECT:=$(strip $(subst ",,$(BR2_PROJECT)))
|
||||||
|
#"))
|
||||||
|
TARGET_HOSTNAME:=$(strip $(subst ",,$(BR2_HOSTNAME)))
|
||||||
|
#"))
|
||||||
|
BANNER:=$(strip $(subst ",,$(BR2_BANNER)))
|
||||||
|
#"))
|
14
project/project.mk
Normal file
14
project/project.mk
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
.PHONY: target-host-info
|
||||||
|
|
||||||
|
target-host-info: $(TARGET_DIR)/etc/issue $(TARGET_DIR)/etc/hostname
|
||||||
|
|
||||||
|
$(TARGET_DIR)/etc/issue: .config
|
||||||
|
mkdir -p $(TARGET_DIR)/etc
|
||||||
|
echo "" > $(TARGET_DIR)/etc/issue
|
||||||
|
echo "" >> $(TARGET_DIR)/etc/issue
|
||||||
|
echo "$(BANNER)" >> $(TARGET_DIR)/etc/issue
|
||||||
|
|
||||||
|
$(TARGET_DIR)/etc/hostname: .config
|
||||||
|
mkdir -p $(TARGET_DIR)/etc
|
||||||
|
echo "$(TARGET_HOSTNAME)" > $(TARGET_DIR)/etc/hostname
|
Loading…
Reference in New Issue
Block a user