+ @TAG=$(PROG)-`cat VERSION` && \
+ if [ ! -d .git ]; then echo 'Not in a git clone, stop.'; exit 1; fi && \
+ TMPTESTFILE=`mktemp -t tmptestfile_XXXXXXXX` && \
+ rm -f "$$TMPTESTFILE" && \
+ AUTORECONF_DIR=`dirname "$$TMPTESTFILE"`/"$(PROG)"_build_autoreconf_$$$$ && \
+ DIR=`pwd` && \
+ rm -rf "$$AUTORECONF_DIR" && \
+ mkdir "$$AUTORECONF_DIR" && \
+ cd "$$AUTORECONF_DIR" && \
+ if git -C "$$DIR" show-ref --tags --quiet --verify -- "refs/tags/$$TAG"; then \
+ (git -C "$$DIR" archive --format=tar --prefix="$$TAG"/ "$$TAG^{tree}" $(RELEASE_FILES) | \
+ tar xf -) && \
+ echo "Archive build from tag $$TAG."; \
+ else \
+ (git -C "$$DIR" archive --format=tar --prefix="$$TAG"/ "HEAD^{tree}" $(RELEASE_FILES) | \
+ tar xf -) && \
+ echo "No $$TAG tag. Archive build from HEAD."; \
+ fi && \
+ (cd "$$TAG" && "$${AUTORECONF:-autoreconf}" && rm -rf autom4te.cache) && \
+ tar cf "$$DIR/$$TAG".tar "$$TAG" && \
+ rm -f "$$DIR/$$TAG".tar.gz && \
+ gzip --best "$$DIR/$$TAG".tar && \
+ cd "$$DIR" && \
+ rm -rf "$$AUTORECONF_DIR"
+
+releasecheck: releasetar
+ @TAG=$(PROG)-`cat VERSION` && \
+ INSTALL_DIR=/tmp/install_"$$TAG"_$$$$ && \
+ DIR=`pwd` && \
+ cd /tmp && \
+ rm -rf "$$TAG" && \
+ rm -rf "$$INSTALL_DIR" && \
+ tar xf "$$DIR"/"$$TAG".tar.gz && \
+ cd "$$TAG" && \
+ echo "[$@] $$ ./configure --enable-smb --quiet --prefix=$$INSTALL_DIR" && \
+ ./configure --enable-smb --quiet --prefix="$$INSTALL_DIR" && \
+ echo '[$@] $$ make -s all check' && \
+ make -s all check >/dev/null && \
+ echo '[$@] $$ make -s install' && \
+ make -s install && \
+ cd .. && \
+ rm -rf "$$TAG" && \
+ rm -rf "$$INSTALL_DIR" && \
+ tar xf "$$DIR"/"$$TAG".tar.gz && \
+ cd "$$TAG" && \
+ mkdir build && \
+ cd build && \
+ echo '[$@] $$ cmake -DENABLE_SMB=yes [...] ..' && \
+ cmake -DENABLE_SMB=yes \
+ -DCMAKE_INSTALL_PREFIX="$$INSTALL_DIR" \
+ -DCMAKE_MESSAGE_LOG_LEVEL=NOTICE \
+ -DCMAKE_RULE_MESSAGES=OFF \
+ -DCMAKE_INSTALL_MESSAGE=NEVER \
+ .. && \
+ echo '[$@] $$ make -s all check' && \
+ make -s all check >/dev/null && \
+ echo '[$@] $$ make -s install' && \
+ make -s install && \
+ cd ../.. && \
+ rm -rf "$$TAG" && \
+ rm -rf "$$INSTALL_DIR" && \
+ echo '[$@] Done.'
+
+whitespacecheck:
+ @# trailing space(s)?
+ @if git grep -I -n ' $$' $$(git ls-files|grep -v '^tests/'); then \
+ echo 'Error: Trailing space(s).'; \
+ exit 1; \
+ fi
+ @# trailing tab(s)?
+ @# install-sh has a tab at the end of one line
+ @if git grep -I -n ' $$' $$(git ls-files|grep -vE '^(tests/|install-sh$$)'); then \
+ echo 'Error: Trailing tabs(s).'; \
+ exit 1; \
+ fi
+ @# space(s) before tab(s)?
+ @if git grep -I -n '[ ][ ]' $$(git ls-files|grep -v '^tests/'); then \
+ echo 'Error: space(s) before tab(s).'; \
+ exit 1; \
+ fi