mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Move the make dist
target into a shell script.
With the side effect of making `sudo make install` from the source root work again (the $(PWD) in the Makefile didn't propagate w/ sudo)
This commit is contained in:
parent
9c0fc5fe48
commit
78512569e9
2 changed files with 25 additions and 20 deletions
22
Makefile
22
Makefile
|
@ -5,12 +5,7 @@
|
||||||
# to offer. For more, execute that one directly.
|
# to offer. For more, execute that one directly.
|
||||||
#
|
#
|
||||||
|
|
||||||
SOURCE=$(PWD)
|
BUILD=build
|
||||||
BUILD=$(SOURCE)/build
|
|
||||||
TMP=/tmp/bro-dist.$(UID)
|
|
||||||
BRO_V=`cat $(SOURCE)/VERSION`
|
|
||||||
BROCCOLI_V=`cat $(SOURCE)/aux/broccoli/VERSION`
|
|
||||||
BROCTL_V=`cat $(SOURCE)/aux/broctl/VERSION`
|
|
||||||
|
|
||||||
all: configured
|
all: configured
|
||||||
( cd $(BUILD) && make )
|
( cd $(BUILD) && make )
|
||||||
|
@ -29,20 +24,7 @@ docclean: configured
|
||||||
( cd $(BUILD) && make docclean && make restclean )
|
( cd $(BUILD) && make docclean && make restclean )
|
||||||
|
|
||||||
dist:
|
dist:
|
||||||
@( mkdir -p $(BUILD) && rm -rf $(TMP) && mkdir $(TMP) )
|
@./pkg/make-src-packages
|
||||||
@cp -R $(SOURCE) $(TMP)/Bro-$(BRO_V)
|
|
||||||
@( cd $(TMP) && find . -name .git\* | xargs rm -rf )
|
|
||||||
@( cd $(TMP) && find . -name \*.swp | xargs rm -rf )
|
|
||||||
@( cd $(TMP) && find . -type d -name build | xargs rm -rf )
|
|
||||||
@( cd $(TMP) && tar -czf $(BUILD)/Bro-all-$(BRO_V).tar.gz Bro-$(BRO_V) )
|
|
||||||
@( cd $(TMP)/Bro-$(BRO_V)/aux && mv broccoli Broccoli-$(BROCCOLI_V) && \
|
|
||||||
tar -czf $(BUILD)/Broccoli-$(BROCCOLI_V).tar.gz Broccoli-$(BROCCOLI_V) )
|
|
||||||
@( cd $(TMP)/Bro-$(BRO_V)/aux && mv broctl Broctl-$(BROCTL_V) && \
|
|
||||||
tar -czf $(BUILD)/Broctl-$(BROCTL_V).tar.gz Broctl-$(BROCTL_V) )
|
|
||||||
@( cd $(TMP)/Bro-$(BRO_V)/aux && rm -rf Broctl* Broccoli* )
|
|
||||||
@( cd $(TMP) && tar -czf $(BUILD)/Bro-$(BRO_V).tar.gz Bro-$(BRO_V) )
|
|
||||||
@rm -rf $(TMP)
|
|
||||||
@echo "Distribution source tarballs have been compiled in $(BUILD)"
|
|
||||||
|
|
||||||
bindist:
|
bindist:
|
||||||
@( cd pkg && ( ./make-deb-packages || ./make-mac-packages || \
|
@( cd pkg && ( ./make-deb-packages || ./make-mac-packages || \
|
||||||
|
|
23
pkg/make-src-packages
Executable file
23
pkg/make-src-packages
Executable file
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SOURCE="$( cd "$( dirname "$0" )" && cd .. && pwd )"
|
||||||
|
BUILD=${SOURCE}/build
|
||||||
|
TMP=/tmp/bro-dist.${UID}
|
||||||
|
BRO_V=`cat ${SOURCE}/VERSION`
|
||||||
|
BROCCOLI_V=`cat ${SOURCE}/aux/broccoli/VERSION`
|
||||||
|
BROCTL_V=`cat ${SOURCE}/aux/broctl/VERSION`
|
||||||
|
|
||||||
|
( mkdir -p ${BUILD} && rm -rf ${TMP} && mkdir ${TMP} )
|
||||||
|
cp -R ${SOURCE} ${TMP}/Bro-${BRO_V}
|
||||||
|
( cd ${TMP} && find . -name .git\* | xargs rm -rf )
|
||||||
|
( cd ${TMP} && find . -name \*.swp | xargs rm -rf )
|
||||||
|
( cd ${TMP} && find . -type d -name build | xargs rm -rf )
|
||||||
|
( cd ${TMP} && tar -czf ${BUILD}/Bro-all-${BRO_V}.tar.gz Bro-${BRO_V} )
|
||||||
|
( cd ${TMP}/Bro-${BRO_V}/aux && mv broccoli Broccoli-${BROCCOLI_V} && \
|
||||||
|
tar -czf ${BUILD}/Broccoli-${BROCCOLI_V}.tar.gz Broccoli-${BROCCOLI_V} )
|
||||||
|
( cd ${TMP}/Bro-${BRO_V}/aux && mv broctl Broctl-${BROCTL_V} && \
|
||||||
|
tar -czf ${BUILD}/Broctl-${BROCTL_V}.tar.gz Broctl-${BROCTL_V} )
|
||||||
|
( cd ${TMP}/Bro-${BRO_V}/aux && rm -rf Broctl* Broccoli* )
|
||||||
|
( cd ${TMP} && tar -czf ${BUILD}/Bro-${BRO_V}.tar.gz Bro-${BRO_V} )
|
||||||
|
rm -rf ${TMP}
|
||||||
|
echo "Distribution source tarballs have been compiled in ${BUILD}"
|
Loading…
Add table
Add a link
Reference in a new issue