Skip to content
Snippets Groups Projects
Select Git revision
  • 35063c20075ef064217c63ec379c4521b3d76c6d
  • master default protected
  • 1.31
  • 4.38.8
  • 4.38.7
  • 4.38.6
  • 4.38.5
  • 4.38.4
  • 4.38.3
  • 4.38.2
  • 4.38.1
  • 4.38.0
  • 4.37.2
  • 4.37.1
  • 4.37.0
  • 4.36.0
  • 4.35.0
  • 4.34.1
  • 4.34.0
  • 4.33.1
  • 4.33.0
  • 4.32.2
  • 4.32.1
23 results

target-bob.mk

Blame
  • target-bob.mk 2.13 KiB
    #############################################################################################
    #############################################################################################
    ##
    ## SERVER BOB 
    ##
    #############################################################################################
    #############################################################################################
    
    ifeq ($(BOB_BIN),)
      $(error $(ERRORMARKER) Bob is not defined, check your Makefile if bob.mk is included)
    endif
    
    ifndef BOB_BUILD_PATH
      $(error $(ERRORMARKER) BOB_BUILD_PATH is not defined, check your Makefile if bob.mk is included)
    endif
    
    ifndef BOB_DIST_PATH
      $(error $(ERRORMARKER) BOB_DIST_PATH is not defined, check your Makefile if bob.mk is included)
    endif
    
    ifndef SOURCE_PATH
      $(error $(ERRORMARKER) SOURCE_PATH is not defined, check your Makefile if bob.mk is included)
    endif
    
    
    $(BOB_BIN):
    	$(QUIET) $(MKDIR) -p $(VENDOR_PATH)
    	$(QUIET) $(WGET) -O $(BOB_BIN) http://download.schukai.com/tools/bob/bob-$(shell uname -s | tr [:upper:] [:lower:])-$(shell echo `uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/`)
    	$(QUIET) $(CHMOD) u+x $(BOB_BIN)
    
    .PHONY: sync-pages
    ## Sync structure of pages
    sync-pages: $(BOB_BIN)
    ifeq ($(BOB_SYNC_CONFIG),)
    	$(ECHOMARKER) "BOB_SYNC_CONFIG is not set, check your Makefile if the variable is set"
    endif
    	$(ECHOMARKER) "Sync structure of pages"
    	$(QUIET) $(BOB_BIN) html sync --specification $(BOB_SYNC_CONFIG)
    
    
    $(BOB_BUILD_PATH): 
    	$(ECHOMARKER) "Create build directory for bob"
    	$(QUIET) $(MKDIR) -p $(BOB_BUILD_PATH)
    
    $(BOB_DIST_PATH): 
    	$(ECHOMARKER) "Create dist directory for bob"
    	$(QUIET) $(MKDIR) -p $(BOB_DIST_PATH)
    
    .PHONY: generate-html
    ## Build the project
    generate-html: $(BOB_BIN) $(BOB_BUILD_PATH) $(BOB_DIST_PATH)
    	$(ECHOMARKER) "Generate html"
    	$(QUIET) $(BOB_BIN) html generate --input $(BOB_BUILD_PATH) --output $(BOB_DIST_PATH) 
    
    .PHONY: prepare-template
    ## Prepare template
    prepare-template: $(BOB_BIN) $(BOB_BUILD_PATH)
    	$(ECHOMARKER) "Generate templates"
    	$(QUIET) find $(SOURCE_PATH) -name "*.yaml" -exec $(BOB_BIN) template prepare --input $(SOURCE_PATH) --output $(BOB_BUILD_PATH) --data-file={} \;