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 $@

CLEANFILES = RELEASENOTES.html
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.

If make dist generates RELEASENOTES.html and make does not, should not that file be cleaned by make distclean instead of make clean?


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, [:])
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.

Please do not set $LINUXDOC binary name to : (when linuxdoc is not found). Doing so is conceptually wrong and creates confusing make dist results.

test `grep -c "@SQUID" release-8.sgml` -eq 0
: -B html -T 2 --split=0 release-8.sgml && \
  /usr/bin/perl -i -p -e "s%release-8.html%%" release-8.html
Can't open release-8.html: No such file or directory.


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" \
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, RELEASENOTES.html still contains an unresolved @PACKAGE_VERSION macro AFAICT. 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.

-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.


.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
Loading