Skip to content

Commit

Permalink
Makefile: add BUILD env "IS_BUILDBOT"
Browse files Browse the repository at this point in the history
when this is set some special actions will applied
- clean the build-dir of OpenWrt / LEDE after all is built. This helps
  to save some disc-space on the buildslaves.
  (the buildslave of WG1337 is building using a RAM-disk, but this is
  not as huge as a real drive.
  • Loading branch information
SvenRoederer committed Sep 16, 2017
1 parent ffd79b0 commit 1709023
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ FW_TARGET_DIR=$(FW_DIR)/firmwares/$(MAINTARGET)-$(SUBTARGET)
VERSION_FILE=$(FW_TARGET_DIR)/VERSION.txt
UMASK=umask 022

ifdef IS_BUILDBOT
$(info running on buildslave, maybe special actions will apply ...)
endif

# test for existing $TARGET-config or abort
ifeq ($(wildcard $(FW_DIR)/configs/$(TARGET).config),)
$(error config for $(TARGET) not defined)
Expand Down Expand Up @@ -125,6 +129,10 @@ compile: stamp-clean-compiled .stamp-compiled
.stamp-compiled: .stamp-prepared lede-clean-bin
$(UMASK); \
$(MAKE) -C $(LEDE_DIR) $(MAKE_ARGS)
# check if running via buildbot and remove the build_dir folder to save some space
ifdef IS_BUILDBOT
rm -rf $(LEDE_DIR)/build_dir
endif
touch $@

# fill firmwares-directory with:
Expand Down

0 comments on commit 1709023

Please sign in to comment.