Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ dist-hook:
fi; \
done

RELEASENOTES.html: html
cp -p $(builddir)/doc/release-notes/release-$(SQUID_RELEASE).html $@

DISTCLEANFILES += RELEASENOTES.html

EXTRA_DIST = \
ChangeLog \
CONTRIBUTORS \
Expand All @@ -48,6 +53,7 @@ EXTRA_DIST = \
INSTALL \
QUICKSTART \
README \
RELEASENOTES.html \
SPONSORS \
bootstrap.sh \
po4a.conf
Expand Down
3 changes: 1 addition & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,7 @@ AC_PATH_PROG(AR, ar, $FALSE)
AR_R="$AR r"
AC_SUBST(AR_R)

AC_PATH_PROG(LINUXDOC, linuxdoc, $FALSE)
AM_CONDITIONAL(ENABLE_RELEASE_DOCS, test "x${ac_cv_path_LINUXDOC}" != "x$FALSE")
AC_PATH_PROG(LINUXDOC, linuxdoc, /usr/bin/linuxdoc)

SQUID_RELEASE=`echo $VERSION | cut -d. -f1`
AC_SUBST(SQUID_RELEASE)
Expand Down
44 changes: 17 additions & 27 deletions doc/release-notes/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,46 +5,36 @@
## Please see the COPYING and CONTRIBUTORS files for details.
##

# requires the linuxdoc tools
if ENABLE_RELEASE_DOCS
DOC = release-$(SQUID_RELEASE)

DOC= release-$(SQUID_RELEASE)

SUFFIXES= .sgml.in .sgml
SUFFIXES = .sgml.in .sgml

.sgml.in.sgml:
sed \
-e "s%[@]SQUID_VERSION[@]%$(VERSION)%g" \
-e "s%[@]SQUID_RELEASE[@]%$(SQUID_RELEASE)%g" \
-e "s%[@]SQUID_RELEASE_OLD[@]%$$(( $(SQUID_RELEASE) - 1 ))%g" \
< $< >$@
$(SED) \
-e "s%[@]SQUID_VERSION[@]%$(VERSION)%g" \
-e "s%[@]SQUID_RELEASE[@]%$(SQUID_RELEASE)%g" \
Comment thread
yadij marked this conversation as resolved.
-e "s%[@]SQUID_RELEASE_OLD[@]%$$(( $(SQUID_RELEASE) - 1 ))%g" \
< $< >$@
test `grep -c "@SQUID" $@` -eq 0
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, this target and/or this particular test is broken: This target should fail when $@ does not exist but it actually succeeds. Since this PR removes ENABLE_RELEASE_DOCS protections -- exposing this code to more build cases/environments, it may be a good idea to fix this in this PR, but I do not insist on that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Works for me". Dropping a rm $@ command after the sed to replicate a failure to produce output I get this:

/usr/bin/sed \
  -e "s%[@]SQUID_VERSION[@]%8.0.0-VCS%g" \
  -e "s%[@]SQUID_RELEASE[@]%8%g" \
  -e "s%[@]SQUID_RELEASE_OLD[@]%$(( 8 - 1 ))%g" \
  < ../../../doc/release-notes/release-8.sgml.in >release-8.sgml ; rm -f release-8.sgml
test `grep -c "@SQUID" release-8.sgml` -eq 0
grep: release-8.sgml: No such file or directory
/bin/bash: line 1: test: -eq: unary operator expected


.sgml.txt:
linuxdoc -B txt --filter $<
$(LINUXDOC) -B txt --filter $<

.sgml.html:
linuxdoc -B html -T 2 --split=0 $<
perl -i -p -e "s%$@%%" $@
cp -p $@ $(top_builddir)/RELEASENOTES.html
$(LINUXDOC) -B html -T 2 --split=0 $< && \
$(PERL) -i -p -e "s%$@%%" $@

.sgml.man:
linuxdoc -B txt --manpage $<
$(LINUXDOC) -B txt --manpage $<

.sgml.info:
linuxdoc -B info $<
$(LINUXDOC) -B info $<

dist-hook: $(DOC).html
@if test -f $(builddir)/$(DOC).html; then \
cp -p $(builddir)/$(DOC).html $(top_distdir)/RELEASENOTES.html; \
fi
html: $(DOC).html

EXTRA_DIST= $(DOC).html
EXTRA_DIST = $(DOC).sgml.in

CLEANFILES= \
*.html \
CLEANFILES = \
*.html *.sgml \
*.tex *.ps *.dvi *.aux *.log *.toc \
*.txt *.man \
$(top_builddir)/RELEASENOTES.html

endif
*.txt *.man
2 changes: 1 addition & 1 deletion doc/release-notes/release-7.sgml.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<toc>

<sect>Notice
<p>The Squid Team are pleased to announce the release of Squid-@PACKAGE_VERSION@ for testing.
<p>The Squid Team are pleased to announce the release of Squid-@SQUID_VERSION@ for testing.

This new release is available for download from <url url="http://www.squid-cache.org/Versions/v@SQUID_RELEASE@/"> or the
<url url="http://www.squid-cache.org/Download/http-mirrors.html" name="mirrors">.
Expand Down
2 changes: 1 addition & 1 deletion doc/release-notes/release-8.sgml.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<toc>

<sect>Notice
<p>The Squid Team are pleased to announce the release of Squid-@PACKAGE_VERSION@ for testing.
<p>The Squid Team are pleased to announce the release of Squid-@SQUID_VERSION@ for testing.

This new release is available for download from <url url="http://www.squid-cache.org/Versions/v@SQUID_RELEASE@/"> or the
<url url="http://www.squid-cache.org/Download/http-mirrors.html" name="mirrors">.
Expand Down
Loading