Skip to content

Commit

Permalink
Cleanup manpage generation
Browse files Browse the repository at this point in the history
* removed version-controlled manpages (thanks to cmdliner, they are generated without external dependencies)
* removed opam-check manpage (opam-check is not even installed, and it was almost empty)
* added opam-installer and missing opam-admin manpages
* updated .gitignore
  • Loading branch information
AltGr committed Jun 13, 2014
1 parent 7990cd6 commit 70ff158
Show file tree
Hide file tree
Showing 29 changed files with 53 additions and 2,666 deletions.
15 changes: 14 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,16 @@ src_ext/*.tar.gz
*.annot
*.tar.gz
*~
.#*
ocp-build.root
ocp-build.root.old
ocp-get
ocp-get-server
ocp-build.root.old.old
# debug files
*.log
*.cudf
*.dot
# Generated files:
*.cmo
*.cmx
Expand All @@ -33,7 +38,6 @@ META
Makefile.config
config.log
config.status
doc/man-ext/opam-check.md
src/core/opamGitVersion.ml
src/core/opamScript.ml
src/core/opamVersion.ml
Expand All @@ -51,3 +55,12 @@ src/opamlfind
._bcdi
aclocal.m4
autom4te.cache
# doc
doc/dev-manual/*aux
doc/dev-manual/*.html
doc/dev-manual/*toc
doc/html
doc/man-html
doc/tutorials/opam.wiki
doc/dev-manual/*.out
doc/man
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ tests-%: opam opam-admin opam-check
$(MAKE) -C tests $*

.PHONY: doc
doc: opam-lib
doc: all
$(MAKE) -C doc

.PHONY: man
man: opam-lib
man: opam opam-admin opam-installer
$(MAKE) -C doc $@

configure: configure.ac m4/*.m4
Expand Down
3 changes: 1 addition & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -4499,7 +4499,7 @@ if test "$prefix" = "NONE"; then
prefix=$ac_default_prefix
fi
ac_config_files="$ac_config_files Makefile.config META src/core/opamVersion.ml doc/man-ext/opam-check.md"
ac_config_files="$ac_config_files Makefile.config META src/core/opamVersion.ml"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
Expand Down Expand Up @@ -5210,7 +5210,6 @@ do
"Makefile.config") CONFIG_FILES="$CONFIG_FILES Makefile.config" ;;
"META") CONFIG_FILES="$CONFIG_FILES META" ;;
"src/core/opamVersion.ml") CONFIG_FILES="$CONFIG_FILES src/core/opamVersion.ml" ;;
"doc/man-ext/opam-check.md") CONFIG_FILES="$CONFIG_FILES doc/man-ext/opam-check.md" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
Expand Down
1 change: 0 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ AC_CONFIG_FILES(
Makefile.config
META
src/core/opamVersion.ml
doc/man-ext/opam-check.md
)
AC_OUTPUT

Expand Down
16 changes: 10 additions & 6 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,26 @@ BINDIR = $(dir $(OPAM))
SRCDIR = $(wildcard ../src/*)

TOPICS = $(shell $(OPAM) help topics)

ifndef OPAM_ADMIN
OPAM_ADMIN = $(BINDIR)/opam-admin
endif
TOPICS_ADMIN = check make
TOPICS_ADMIN = check make depexts libs stats
HELPFMT = --help=groff

ifndef OPAM_INSTALLER
OPAM_INSTALLER = $(BINDIR)/opam-installer
endif

SRCEXTDIR = ../src_ext/lib
INCLUDE = $(patsubst %,-I %,$(SRCDIR) $(SRCEXTDIR))

.PHONY: man html dev-manual tutorials
all: man tutorials dev html

man:
rm -f man/*
rm -rf man
mkdir -p man
$(OPAM) $(HELPFMT) > man/opam.1
for i in $(TOPICS); do\
$(OPAM) $$i $(HELPFMT) > man/opam-$$i.1;\
Expand All @@ -27,9 +33,7 @@ man:
for i in $(TOPICS_ADMIN); do\
$(OPAM_ADMIN) $$i $(HELPFMT) > man/opam-admin-$$i.1;\
done
for i in opam-check; do\
pandoc -s -t man man-ext/$$i.md -o man/$$i.1;\
done
$(OPAM_INSTALLER) $(HELPFMT) > man/opam-installer.1

tutorials:
$(MAKE) -C tutorials
Expand All @@ -39,4 +43,4 @@ dev:

html:
mkdir -p html/
ocamldoc $(INCLUDE) ../src/*/*.mli ../src/*/*.ml -html -d html/
ocamldoc $(INCLUDE) ../src/*/*.mli ../src/*/*.ml -html -d html/ || true
23 changes: 0 additions & 23 deletions doc/man-ext/opam-check.md.in

This file was deleted.

59 changes: 0 additions & 59 deletions doc/man/opam-admin-check.1

This file was deleted.

41 changes: 0 additions & 41 deletions doc/man/opam-admin-make.1

This file was deleted.

32 changes: 0 additions & 32 deletions doc/man/opam-admin.1

This file was deleted.

18 changes: 0 additions & 18 deletions doc/man/opam-check.1

This file was deleted.

Loading

0 comments on commit 70ff158

Please sign in to comment.