This makes it so that if the inputs are not available -- namely input/.config and possibly input/files/, the build won't run. This helps inform the user what must be done in order to get things to build.
60 lines
1.5 KiB
Makefile
60 lines
1.5 KiB
Makefile
define INC_NEWOPENWRT =
|
|
1
|
|
endef
|
|
$(info Defined INC_NEWOPENWRT)
|
|
|
|
# Would override other configs.
|
|
# # docker_src = /devel/docker
|
|
include ${docker_src}/docker_vars.sh
|
|
export
|
|
|
|
unexport INC_DOCKER
|
|
ifndef INC_DOCKER
|
|
include ${docker_src}/Makefile
|
|
endif
|
|
|
|
input/:
|
|
rm -rf input; mkdir input; chmod 777 input;
|
|
|
|
.PHONY: prep-output
|
|
prep-output:
|
|
rm -rf output; mkdir output; chmod 777 output;
|
|
|
|
input/.config: diffconfig input/
|
|
cp $< $@
|
|
|
|
BASE_REQS := prep-output input/.config input.sh output.sh input/files/
|
|
|
|
output: ${docker_src}/built/openwrt-builder-master.sentinel $(BASE_REQS)
|
|
docker run \
|
|
-v $$PWD/output:/output \
|
|
-v $$PWD/input:/input \
|
|
-v $$PWD/input.sh:/input.sh \
|
|
-v $$PWD/output.sh:/output.sh \
|
|
--rm -it openwrt-builder-master make V=ssc -j ${build_threads}
|
|
|
|
output-%: ${docker_src}/built/openwrt-builder-%.sentinel $(BASE_REQS)
|
|
docker run \
|
|
-v $$PWD/output:/output \
|
|
-v $$PWD/input:/input \
|
|
-v $$PWD/input.sh:/input.sh \
|
|
-v $$PWD/output.sh:/output.sh \
|
|
--rm -it openwrt-builder-$* make V=ssc -j ${build_threads}
|
|
|
|
debug-%: ${docker_src}/built/openwrt-builder-%.sentinel $(BASE_REQS)
|
|
docker run \
|
|
-v $$PWD/output:/output \
|
|
-v $$PWD/input:/input \
|
|
-v $$PWD/input.sh:/input.sh \
|
|
-v $$PWD/output.sh:/output.sh \
|
|
-it openwrt-builder-$* /bin/bash
|
|
|
|
.PHONY: menuconfig
|
|
menuconfig-%: ${docker_src}/built/openwrt-builder-%.sentinel $(BASE_REQS)
|
|
docker run \
|
|
-v $$PWD/output:/output \
|
|
-v $$PWD/input:/input \
|
|
-v $$PWD/input.sh:/input.sh \
|
|
-v $$PWD/output.sh:/output.sh \
|
|
--rm -it openwrt-builder-$* make menuconfig
|