Index: Makefile.in =================================================================== diff -u -r217e6fd1b6b73fd12b487f72a6e1586a3e050494 -r52a0baf40df0884a1568900e719997f2dbc51287 --- Makefile.in (.../Makefile.in) (revision 217e6fd1b6b73fd12b487f72a6e1586a3e050494) +++ Makefile.in (.../Makefile.in) (revision 52a0baf40df0884a1568900e719997f2dbc51287) @@ -323,30 +323,44 @@ -(cd $(src_doc_dir); htmldoc --webpage --format pdf14 \ -f langRef-xotcl.pdf langRef-xotcl.html ) -NX_MAN = \ +NX_MAN3 = \ $(src_doc_dir)/Object.man \ $(src_doc_dir)/Class.man \ $(src_doc_dir)/configure.man \ $(src_doc_dir)/current.man \ $(src_doc_dir)/next.man +NX_MAN1 = \ + $(src_doc_dir)/nxsh.man \ + $(src_doc_dir)/xotclsh.man \ + $(src_doc_dir)/nxwish.man \ + $(src_doc_dir)/xowish.man + man : man-html man-nroff man-pdf -man-html : $(NX_MAN:%.man=%.html) +man-html : $(NX_MAN3:%.man=%.html) $(src_doc_dir)/%.html : $(src_doc_dir)/%.man @for m in $(?F) ; do \ echo " Generating html manpage from $$m" ; \ (cd $(src_doc_dir); dtplite -style man.css -o . html $$m) ; \ done; -man-nroff : $(NX_MAN:%.man=%.1) +man-nroff : man1 man3 +man1 : $(NX_MAN1:%.man=%.1) $(src_doc_dir)/%.1 : $(src_doc_dir)/%.man @for m in $(?F) ; do \ - echo " Generating nroff manpage from $$m" ; \ + echo " Generating nroff manpage (Section 1) from $$m" ; \ (cd $(src_doc_dir); dtplite -ext 1 -o . nroff $$m) ; \ done; -man-pdf: $(NX_MAN:%.man=%.pdf) +man3 : $(NX_MAN3:%.man=%.3) +$(src_doc_dir)/%.3 : $(src_doc_dir)/%.man + @for m in $(?F) ; do \ + echo " Generating nroff manpage (Section 3) from $$m" ; \ + (cd $(src_doc_dir); dtplite -ext 3 -o . nroff $$m) ; \ + done; + +man-pdf: $(NX_MAN3:%.man=%.pdf) $(src_doc_dir)/%.pdf : $(src_doc_dir)/%.html @for m in $(?F) ; do \ echo " Generating pdf manpage for $$m" ; \ @@ -467,15 +481,26 @@ # directory. #======================================================================== -install-doc: $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man3 $(DESTDIR)$(mandir)/mann - @(cd $(src_man_dir)/ ; \ - for i in *.1; do \ +# install-doc: $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man3 $(DESTDIR)$(mandir)/mann +# @(cd $(src_man_dir)/ ; \ +# for i in *.1; do \ +# echo "Installing $$i"; \ +# rm -f $(DESTDIR)$(mandir)/man1/$$i; \ +# sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \ +# $$i > $(DESTDIR)$(mandir)/man1/$$i; \ +# chmod 444 $(DESTDIR)$(mandir)/man1/$$i; \ +# done) + +install-doc: $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man3 + @echo "Installing documentation in $(DESTDIR)$(mandir)" + @list='$(srcdir)/doc/*.1'; for i in $$list; do \ echo "Installing $$i"; \ - rm -f $(DESTDIR)$(mandir)/man1/$$i; \ - sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \ - $$i > $(DESTDIR)$(mandir)/man1/$$i; \ - chmod 444 $(DESTDIR)$(mandir)/man1/$$i; \ - done) + $(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/man1 ; \ + done + @list='$(srcdir)/doc/*.3'; for i in $$list; do \ + echo "Installing $$i"; \ + $(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/man3 ; \ + done shell: binaries libraries @$(TCLSH) $(SCRIPT) Index: doc/nxsh.man =================================================================== diff -u --- doc/nxsh.man (revision 0) +++ doc/nxsh.man (revision 52a0baf40df0884a1568900e719997f2dbc51287) @@ -0,0 +1,35 @@ +[comment {-*- tcl -*- nxsh manpage}] + +[manpage_begin nxsh 1 2.0b6] + +[copyright { 2014 Stefan Sobernig , Gustaf Neumann }] + +[titledesc {Simple shell containing NSF/NX interpreter}] + +[description] + +[list_begin definitions] + +[call [syscmd "nxsh"] [opt [arg fileName]]] + +[syscmd "nxsh"] is a shell-like application that reads NX and Tcl commands from its standard input or from [arg fileName] and evaluates them. If invoked without [arg fileName], then it runs in REPL mode, reading commands from standard input and printing command results and error messages to standard output. It runs until the exit command is invoked or until it reaches end-of-file on its standard input. + +[para] + +[syscmd "nxsh"] can be used like [syscmd "tclsh"] to make NX scripts directly invokable from the shell, by providing the following first line ("shebang") in the respective script: + +[example { + #! /usr/bin/env nxsh +}] + +A (more portable) alternative is: + +[example { + #! /bin/sh + # the next line restarts using nxsh \ + exec nxsh "$0" "$@" +}] + +[list_end] + +[manpage_end] Index: doc/nxwish.man =================================================================== diff -u --- doc/nxwish.man (revision 0) +++ doc/nxwish.man (revision 52a0baf40df0884a1568900e719997f2dbc51287) @@ -0,0 +1,35 @@ +[comment {-*- tcl -*- nxwish manpage}] + +[manpage_begin nxwish 1 2.0b6] + +[copyright { 2014 Stefan Sobernig , Gustaf Neumann }] + +[titledesc {Simple windowing shell containing NSF/NX interpreter}] + +[description] + +[list_begin definitions] + +[call [syscmd "nxwish"] [opt [arg fileName]]] + +[syscmd "nxwish"] is a shell-like application including Tcl and the NX extension as well as the Tk toolkit. [syscmd "nxwish"] creates a main window and, then, reads commands from its standard input or from [arg fileName] and evaluates them. If invoked without [arg fileName], then it runs in REPL mode, reading commands from standard input. [syscmd "nxwish"] will continue processing commands until all windows have been deleted or until end-of-file is reached on standard input. + +[para] + +[syscmd "nxwish"] can be used like [syscmd "wish"] to make NX scripts directly invokable from the shell, by providing the following first line ("shebang") in the respective script: + +[example { + #! /usr/bin/env nxwish +}] + +A (more portable) alternative is: + +[example { + #! /bin/sh + # the next line restarts using nxwish \ + exec nxwish "$0" "$@" +}] + +[list_end] + +[manpage_end] Index: doc/xotclsh.man =================================================================== diff -u --- doc/xotclsh.man (revision 0) +++ doc/xotclsh.man (revision 52a0baf40df0884a1568900e719997f2dbc51287) @@ -0,0 +1,35 @@ +[comment {-*- tcl -*- xotclsh manpage}] + +[manpage_begin xotclsh 1 2.0b6] + +[copyright { 2014 Stefan Sobernig , Gustaf Neumann }] + +[titledesc {Simple shell containing NSF/XOTcl2 interpreter}] + +[description] + +[list_begin definitions] + +[call [syscmd "xotclsh"] [opt [arg fileName]]] + +[syscmd "xotclsh"] is a shell-like application that reads XOTcl2 and Tcl commands from its standard input or from [arg fileName] and evaluates them. If invoked without [arg fileName], then it runs in REPL mode, reading commands from standard input and printing command results and error messages to standard output. It runs until the exit command is invoked or until it reaches end-of-file on its standard input. + +[para] + +[syscmd "xotclsh"] can be used like [syscmd "tclsh"] to make XOTcl2 scripts directly invokable from the shell, by providing the following first line ("shebang") in the respective script: + +[example { + #! /usr/bin/env xotclsh +}] + +A (more portable) alternative is: + +[example { + #! /bin/sh + # the next line restarts using xotclsh \ + exec xotclsh "$0" "$@" +}] + +[list_end] + +[manpage_end] Index: doc/xowish.man =================================================================== diff -u --- doc/xowish.man (revision 0) +++ doc/xowish.man (revision 52a0baf40df0884a1568900e719997f2dbc51287) @@ -0,0 +1,35 @@ +[comment {-*- tcl -*- xowish manpage}] + +[manpage_begin xowish 1 2.0b6] + +[copyright { 2014 Stefan Sobernig , Gustaf Neumann }] + +[titledesc {Simple windowing shell containing NSF/XOTcl2 interpreter}] + +[description] + +[list_begin definitions] + +[call [syscmd "xowish"] [opt [arg fileName]]] + +[syscmd "xowish"] is a shell-like application including Tcl and the XOTcl2 as well as the Tk toolkit. [syscmd "xowish"] creates a main window and, then, reads commands from its standard input or from [arg fileName] and evaluates them. If invoked without [arg fileName], then it runs in REPL mode, reading commands from standard input. [syscmd "xowish"] will continue processing commands until all windows have been deleted or until end-of-file is reached on standard input. + +[para] + +[syscmd "xowish"] can be used like [syscmd "wish"] to make XOTcl2 scripts directly invokable from the shell, by providing the following first line ("shebang") in the respective script: + +[example { + #! /usr/bin/env xowish +}] + +A (more portable) alternative is: + +[example { + #! /bin/sh + # the next line restarts using xowish \ + exec xowish "$0" "$@" +}] + +[list_end] + +[manpage_end]