"Fossies" - the Fresh Open Source Software Archive

Member "gogs-0.12.4/Makefile" (17 Jan 2022, 1624 Bytes) of package /linux/misc/gogs-0.12.4.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "Makefile": 0.12.3_vs_0.12.4.

    1 LDFLAGS += -X "gogs.io/gogs/internal/conf.BuildTime=$(shell date -u '+%Y-%m-%d %I:%M:%S %Z')"
    2 LDFLAGS += -X "gogs.io/gogs/internal/conf.BuildCommit=$(shell git rev-parse HEAD)"
    3 
    4 CONF_FILES := $(shell find conf | sed 's/ /\\ /g')
    5 TEMPLATES_FILES := $(shell find templates | sed 's/ /\\ /g')
    6 PUBLIC_FILES := $(shell find public | sed 's/ /\\ /g')
    7 LESS_FILES := $(wildcard public/less/*.less)
    8 
    9 TAGS = ""
   10 BUILD_FLAGS = "-v"
   11 
   12 RELEASE_ROOT = "release"
   13 RELEASE_GOGS = "release/gogs"
   14 NOW = $(shell date -u '+%Y%m%d%I%M%S')
   15 
   16 .PHONY: check dist build build-no-gen pack release generate less clean test fixme todo legacy
   17 
   18 .IGNORE: public/css/gogs.css
   19 
   20 all: build
   21 
   22 check: test
   23 
   24 dist: release
   25 
   26 web: build
   27 	./gogs web
   28 
   29 build:
   30 	go build $(BUILD_FLAGS) -ldflags '$(LDFLAGS)' -tags '$(TAGS)' -trimpath -o gogs
   31 
   32 pack:
   33 	rm -rf $(RELEASE_GOGS)
   34 	mkdir -p $(RELEASE_GOGS)
   35 	cp -r gogs LICENSE README.md README_ZH.md scripts $(RELEASE_GOGS)
   36 	cd $(RELEASE_ROOT) && zip -r gogs.$(NOW).zip "gogs"
   37 
   38 release: build pack
   39 
   40 generate: clean
   41 	go generate internal/assets/conf/conf.go
   42 	go generate internal/assets/templates/templates.go
   43 	go generate internal/assets/public/public.go
   44 
   45 less: clean public/css/gogs.min.css
   46 
   47 public/css/gogs.min.css: $(LESS_FILES)
   48 	@type lessc >/dev/null 2>&1 && lessc --clean-css --source-map "public/less/gogs.less" $@ || echo "lessc command not found or failed"
   49 
   50 clean:
   51 	find . -name "*.DS_Store" -type f -delete
   52 
   53 test:
   54 	go test -cover -race ./...
   55 
   56 fixme:
   57 	grep -rnw "FIXME" internal
   58 
   59 todo:
   60 	grep -rnw "TODO" internal
   61 
   62 # Legacy code should be removed by the time of release
   63 legacy:
   64 	grep -rnw "\(LEGACY\|Deprecated\)" internal