@@ -33,6 +33,9 @@ MIN_NODE_VERSION := 010013000
33
33
ifeq ($(HAS_GO ) , GO)
34
34
GOPATH ?= $(shell $(GO) env GOPATH)
35
35
export PATH := $(GOPATH)/bin:$(PATH)
36
+
37
+ CGO_EXTRA_CFLAGS := -DSQLITE_MAX_VARIABLE_NUMBER=32766
38
+ CGO_CFLAGS ?= $(shell $(GO) env CGO_CFLAGS) $(CGO_EXTRA_CFLAGS)
36
39
endif
37
40
38
41
@@ -499,7 +502,7 @@ check: test
499
502
500
503
.PHONY : install $(TAGS_PREREQ )
501
504
install : $(wildcard * .go)
502
- $(GO ) install -v -tags ' $(TAGS)' -ldflags ' -s -w $(LDFLAGS)'
505
+ CGO_CFLAGS= " $( CGO_CFLAGS ) " $(GO ) install -v -tags ' $(TAGS)' -ldflags ' -s -w $(LDFLAGS)'
503
506
504
507
.PHONY : build
505
508
build : frontend backend
@@ -515,7 +518,7 @@ generate: $(TAGS_PREREQ)
515
518
CC= GOOS= GOARCH= $(GO ) generate -mod=vendor -tags ' $(TAGS)' $(GO_PACKAGES )
516
519
517
520
$(EXECUTABLE ) : $(GO_SOURCES ) $(TAGS_PREREQ )
518
- $(GO ) build -mod=vendor $(GOFLAGS ) $(EXTRA_GOFLAGS ) -tags ' $(TAGS)' -ldflags ' -s -w $(LDFLAGS)' -o $@
521
+ CGO_CFLAGS= " $( CGO_CFLAGS ) " $(GO ) build -mod=vendor $(GOFLAGS ) $(EXTRA_GOFLAGS ) -tags ' $(TAGS)' -ldflags ' -s -w $(LDFLAGS)' -o $@
519
522
520
523
.PHONY : release
521
524
release : frontend generate release-windows release-linux release-darwin release-copy release-compress release-sources release-check
@@ -528,7 +531,7 @@ release-windows: | $(DIST_DIRS)
528
531
@hash xgo > /dev/null 2>&1 ; if [ $$ ? -ne 0 ]; then \
529
532
$(GO ) get -u src.techknowlogick.com/xgo; \
530
533
fi
531
- GO111MODULE=off xgo -go $(XGO_VERSION ) -dest $(DIST ) /binaries -tags ' netgo osusergo $(TAGS)' -ldflags ' -linkmode external -extldflags "-static" $(LDFLAGS)' -targets ' windows/*' -out gitea-$(VERSION ) .
534
+ CGO_CFLAGS= " $( CGO_CFLAGS ) " GO111MODULE=off xgo -go $(XGO_VERSION ) -dest $(DIST ) /binaries -tags ' netgo osusergo $(TAGS)' -ldflags ' -linkmode external -extldflags "-static" $(LDFLAGS)' -targets ' windows/*' -out gitea-$(VERSION ) .
532
535
ifeq ($(CI ) ,drone)
533
536
cp /build/* $(DIST)/binaries
534
537
endif
@@ -538,7 +541,7 @@ release-linux: | $(DIST_DIRS)
538
541
@hash xgo > /dev/null 2>&1 ; if [ $$ ? -ne 0 ]; then \
539
542
$(GO ) get -u src.techknowlogick.com/xgo; \
540
543
fi
541
- GO111MODULE=off xgo -go $(XGO_VERSION ) -dest $(DIST ) /binaries -tags ' netgo osusergo $(TAGS)' -ldflags ' -linkmode external -extldflags "-static" $(LDFLAGS)' -targets ' linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64,linux/mips64le,linux/mips,linux/mipsle' -out gitea-$(VERSION ) .
544
+ CGO_CFLAGS= " $( CGO_CFLAGS ) " GO111MODULE=off xgo -go $(XGO_VERSION ) -dest $(DIST ) /binaries -tags ' netgo osusergo $(TAGS)' -ldflags ' -linkmode external -extldflags "-static" $(LDFLAGS)' -targets ' linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64,linux/mips64le,linux/mips,linux/mipsle' -out gitea-$(VERSION ) .
542
545
ifeq ($(CI ) ,drone)
543
546
cp /build/* $(DIST)/binaries
544
547
endif
@@ -548,7 +551,7 @@ release-darwin: | $(DIST_DIRS)
548
551
@hash xgo > /dev/null 2>&1 ; if [ $$ ? -ne 0 ]; then \
549
552
$(GO ) get -u src.techknowlogick.com/xgo; \
550
553
fi
551
- GO111MODULE=off xgo -go $(XGO_VERSION ) -dest $(DIST ) /binaries -tags ' netgo osusergo $(TAGS)' -ldflags ' $(LDFLAGS)' -targets ' darwin/*' -out gitea-$(VERSION ) .
554
+ CGO_CFLAGS= " $( CGO_CFLAGS ) " GO111MODULE=off xgo -go $(XGO_VERSION ) -dest $(DIST ) /binaries -tags ' netgo osusergo $(TAGS)' -ldflags ' $(LDFLAGS)' -targets ' darwin/*' -out gitea-$(VERSION ) .
552
555
ifeq ($(CI ) ,drone)
553
556
cp /build/* $(DIST)/binaries
554
557
endif
0 commit comments