Skip to content

Commit

Permalink
Makefile.am: Added generating html from manpage files.
Browse files Browse the repository at this point in the history
Also reflecting changes by automake.

Signed-off-by: Akira Tsukamoto <akira-t@s9.dion.ne.jp>
  • Loading branch information
mcd500 committed Jan 17, 2018
1 parent 048aace commit d238467
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 19 deletions.
10 changes: 9 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ TAR = gtar
bin_PROGRAMS = rtpdump rtpplay rtpsend rtptrans
dist_bin_SCRIPTS = multidump multiplay
man_MANS = rtpdump.1 rtpplay.1 rtpsend.1 rtptrans.1 multidump.1 multiplay.1
html_DATA = rtpdump.html rtpplay.html rtpsend.html rtptrans.html \
multidump.html multiplay.html

COMMON = \
ansi.h \
Expand All @@ -29,6 +31,9 @@ endif
rtpsend_SOURCES = $(COMMON) rtpsend.c
rtptrans_SOURCES= $(COMMON) rtptrans.c

$(html_DATA): $(man_MANS)
groff -Thtml -mdoc $< > $@

# make rpm_spec
# This will automatically generate rtptools-VERSION.spec file
# which is required for making Linux's RPM/SRPM package.
Expand All @@ -39,7 +44,10 @@ rpm_spec: rtptools.spec
@sed s/VERSION/$(VERSION)/g rtptools.spec >> rtptools-$(VERSION).spec

#rpm: rtptools-$(VERSION).spec $(bin_PROGRAMS)
# rpm -ba
# rpm -ba

clean-local:
rm $(html_DATA)

EXTRA_DIST = ChangeLog.html COPYRIGHT rtptools.html bark.rtp \
nt/*.c nt/include/*.h \
Expand Down
69 changes: 51 additions & 18 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
@SET_MAKE@



VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
Expand Down Expand Up @@ -104,7 +105,7 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" \
"$(DESTDIR)$(man1dir)"
"$(DESTDIR)$(man1dir)" "$(DESTDIR)$(htmldir)"
PROGRAMS = $(bin_PROGRAMS)
am__objects_1 = host2ip.$(OBJEXT) hpt.$(OBJEXT) multimer.$(OBJEXT) \
notify.$(OBJEXT)
Expand Down Expand Up @@ -194,6 +195,7 @@ am__can_run_installinfo = \
man1dir = $(mandir)/man1
NROFF = nroff
MANS = $(man_MANS)
DATA = $(html_DATA)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
Expand Down Expand Up @@ -334,6 +336,9 @@ AUTOMAKE_OPTIONS = foreign
TAR = gtar
dist_bin_SCRIPTS = multidump multiplay
man_MANS = rtpdump.1 rtpplay.1 rtpsend.1 rtptrans.1 multidump.1 multiplay.1
html_DATA = rtpdump.html rtpplay.html rtpsend.html rtptrans.html \
multidump.html multiplay.html

COMMON = \
ansi.h \
host2ip.c \
Expand All @@ -351,9 +356,6 @@ rtpdump_SOURCES = $(COMMON) rd.c rtpdump.h rtpdump.c
@DARWIN_TRUE@rtpplay_SOURCES = $(COMMON) rd.c hsearch.c rtpplay.c
rtpsend_SOURCES = $(COMMON) rtpsend.c
rtptrans_SOURCES = $(COMMON) rtptrans.c

#rpm: rtptools-$(VERSION).spec $(bin_PROGRAMS)
# rpm -ba
EXTRA_DIST = ChangeLog.html COPYRIGHT rtptools.html bark.rtp \
nt/*.c nt/include/*.h \
nt/include/arpa/*.h nt/include/netinet/*.h \
Expand Down Expand Up @@ -568,6 +570,27 @@ uninstall-man1:
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
install-htmlDATA: $(html_DATA)
@$(NORMAL_INSTALL)
@list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \
$(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
done

uninstall-htmlDATA:
@$(NORMAL_UNINSTALL)
@list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(htmldir)'; $(am__uninstall_files_from_dir)

ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
Expand Down Expand Up @@ -793,9 +816,9 @@ distcleancheck: distclean
exit 1; } >&2
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(MANS)
all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA)
installdirs:
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(htmldir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
Expand Down Expand Up @@ -830,7 +853,7 @@ maintainer-clean-generic:
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am

clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
clean-am: clean-binPROGRAMS clean-generic clean-local mostlyclean-am

distclean: distclean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
Expand All @@ -851,7 +874,7 @@ info: info-am

info-am:

install-data-am: install-man
install-data-am: install-htmlDATA install-man

install-dvi: install-dvi-am

Expand Down Expand Up @@ -899,33 +922,37 @@ ps: ps-am
ps-am:

uninstall-am: uninstall-binPROGRAMS uninstall-dist_binSCRIPTS \
uninstall-man
uninstall-htmlDATA uninstall-man

uninstall-man: uninstall-man1

.MAKE: install-am install-strip

.PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-am clean \
clean-binPROGRAMS clean-cscope clean-generic cscope \
cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
clean-binPROGRAMS clean-cscope clean-generic clean-local \
cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \
distcheck distclean distclean-compile distclean-generic \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
install-binPROGRAMS install-data install-data-am \
install-dist_binSCRIPTS install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-man1 \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \
uninstall-dist_binSCRIPTS uninstall-man uninstall-man1
install-htmlDATA install-info install-info-am install-man \
install-man1 install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
ps ps-am tags tags-am uninstall uninstall-am \
uninstall-binPROGRAMS uninstall-dist_binSCRIPTS \
uninstall-htmlDATA uninstall-man uninstall-man1

.PRECIOUS: Makefile


$(html_DATA): $(man_MANS)
groff -Thtml -mdoc $< > $@

# make rpm_spec
# This will automatically generate rtptools-VERSION.spec file
# which is required for making Linux's RPM/SRPM package.
Expand All @@ -935,6 +962,12 @@ rpm_spec: rtptools.spec
@echo "# DO NOT EDIT THIS FILE" >> rtptools-$(VERSION).spec
@sed s/VERSION/$(VERSION)/g rtptools.spec >> rtptools-$(VERSION).spec

#rpm: rtptools-$(VERSION).spec $(bin_PROGRAMS)
# rpm -ba

clean-local:
rm $(html_DATA)

# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

5 comments on commit d238467

@janstary
Copy link
Contributor

Choose a reason for hiding this comment

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

Using $< in a non-suffix rule context is a GNUmake idiom.
Till now, this was a standard make(1). Now it needs the GNU make.

@janstary
Copy link
Contributor

@janstary janstary commented on d238467 Jan 17, 2018

Choose a reason for hiding this comment

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

What exactly is the relation bewteen DATA and html_DATA?
It seems DATA is defined to be $(html_DATA), but is only used once,
everything else still uses html_DATA.

@janstary
Copy link
Contributor

Choose a reason for hiding this comment

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

The generated html manpages (i.e. rtpdump.html etc) should go where rtptools.html goes
(currently nowhere). It's the homepage which can link to the individual manpages now,
see #12

@janstary
Copy link
Contributor

Choose a reason for hiding this comment

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

Or maybe the other way round: rtptools.html should go where the html manpages go,
because it needs to link to them.

@janstary
Copy link
Contributor

Choose a reason for hiding this comment

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

This fixes #9

Please sign in to comment.