diff --git a/app/doc/Makefile b/app/doc/Makefile deleted file mode 100644 index f2300ed..0000000 --- a/app/doc/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -main: utt.info utt.pdf utt.html utt.ps - -utt.info: utt.texinfo - makeinfo utt.texinfo - -utt.pdf: utt.texinfo - texi2pdf utt.texinfo - rm utt.{aux,cp,fn,ky,log,pg,toc,tp,vr} - -utt.html: utt.texinfo - makeinfo --html --no-split utt.texinfo - -utt.dvi: utt.texinfo - texi2dvi utt.texinfo - -utt.ps: utt.dvi - dvips -o utt.ps utt.dvi - - -copy: -ifdef UTT_SHARE_DIR - # tworzymy archiwa (wymagane przez programy) - gzip --best utt.info - mv utt.info.gz ${UTT_SHARE_DIR}/info/ - - # tworzymy archiwa (wymagane przez programy) - #gzip --best utt.man - #mv utt.man.gz ${UTT_SHARE_DIR}/man/man3/utt.gz.1 - - #pozostale dokumenty - mv utt.{ps,pdf,html} ${UTT_SHARE_DIR}/doc/utt/ -endif - -clean: - rm -f utt.{aux,cp,dvi,fn,fns,html,info,ky,log,pdf,pg,ps,toc,tp,vr} - rm -f *~ diff --git a/auto/defaults b/auto/defaults index 512e594..741298e 100755 --- a/auto/defaults +++ b/auto/defaults @@ -21,6 +21,10 @@ DEFAULT_SORT='/usr/bin/sort' DEFAULT_PR='/usr/bin/pr' DEFAULT_CP='/bin/cp' DEFAULT_CHMOD='/bin/chmod' +DEFAULT_MAKEINFO='/usr/bin/makeinfo' +DEFAULT_TEXI2DVI='/usr/bin/texi2dvi' +DEFAULT_TEXI2PDF='/usr/bin/texi2pdf' +DEFAULT_DVIPS='/usr/bin/dvips' DEFAULT_CFLAGS='-g -O2 -Wall' DEFAULT_LDFLAGS='' diff --git a/auto/options b/auto/options index 2e29423..949f6b7 100755 --- a/auto/options +++ b/auto/options @@ -24,6 +24,10 @@ if [ -z "$SORT" ]; then SORT=$DEFAULT_SORT; if [ -z "$PR" ]; then PR=$DEFAULT_PR; fi if [ -z "$CP" ]; then CP=$DEFAULT_CP; fi if [ -z "$CHMOD" ]; then CHMOD=$DEFAULT_CHMOD; fi +if [ -z "$MAKEINFO" ]; then MAKEINFO=$DEFAULT_MAKEINFO; fi +if [ -z "$TEXI2DVI" ]; then TEXI2DVI=$DEFAULT_TEXI2DVI; fi +if [ -z "$TEXI2PDF" ]; then TEXI2PDF=$DEFAULT_TEXI2PDF; fi +if [ -z "$DVIPS" ]; then DVIPS=$DEFAULT_DVIPS; fi if [ -z "$CFLAGS" ]; then CFLAGS=$DEFAULT_CFLAGS; fi if [ -z "$LDFLAGS" ]; then LDFLAGS=$DEFAULT_LDFLAGS; fi @@ -79,6 +83,11 @@ do PR=*) PR="$value" ;; CP=*) CP="$value" ;; CHMOD=*) CHMOD="$value" ;; + MAKEINFO=*) MAKEINFO="$value" ;; + TEXI2DVI=*) TEXI2DVI="$value" ;; + TEXI2PDF=*) TEXI2PDF="$value" ;; + DVIPS=*) DVIPS="$value" ;; + CFLAGS=*) CFLAGS="$value" ;; LDFLAGS=*) LDFLAGS="$value" ;; @@ -135,6 +144,11 @@ Some influential environment variables: PR pr command CP cp command CHMOD chmod command + MAKEINFO makeinfo command + TEXI2DVI texi2dvi command + TEXI2PDF texi2pdf command + DVIPS dvips command + CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have diff --git a/auto/output/Makefile b/auto/output/Makefile index c0ef933..1b61ee4 100755 --- a/auto/output/Makefile +++ b/auto/output/Makefile @@ -18,6 +18,10 @@ SORT = $SORT PR = $PR CP = $CP CHMOD = $CHMOD +MAKEINFO = $MAKEINFO +TEXI2DVI = $TEXI2DVI +TEXI2PDF = $TEXI2PDF +DVIPS = $DVIPS CFLAGS = $CFLAGS LDFLAGS = $LDFLAGS @@ -43,9 +47,15 @@ ALL_LDLIBS = \$(LDLIBS) ALL_BFLAGS = \$(BFLAGS) ALL_FFLAGS = -t \$(FFLAGS) -VPATH = ./src +vpath %.c ./src +vpath %.l ./src +vpath %.pl ./src +vpath %.sed ./src +vpath %.sh ./src +vpath %.texinfo ./doc PROGRAMS = tok sen fla gph kot unfla grp mar ser kon rm12 rs12 +DOC_FILES = utt.info utt.dvi utt.html utt.pdf utt.ps TOK_OBJ_FILES = tok.o tok_cmdline.o TOK_FLEX_FILES = tok.l @@ -101,15 +111,6 @@ CONFIG_FILES = src/config.h Makefile .SUFFIXES: .SUFFIXES: .l .y .h .c .pl .o -#.INTERMEDIATE: \$(patsubst %.l,%.c,\$(TOK_FLEX_FILES)) -#.INTERMEDIATE: \$(patsubst %.ggo,%.c,\$(TOK_GGO_FILES)) -#.INTERMEDIATE: \$(patsubst %.ggo,%.h,\$(TOK_GGO_FILES)) -#.INTERMEDIATE: \$(patsubst %.l,%.c,\$(SEN_FLEX_FILES)) - -.PHONY: all -all: \$(PROGRAMS) - - .PHONY: help help: @\$(MAKE) --print-data-base --question | \\ @@ -119,6 +120,47 @@ help: \$(SORT) | \\ \$(PR) --omit-pagination --width=80 --columns=4 +.PHONY: all +all: \$(PROGRAMS) + +.PHONY: install +install: all + +.PHONY: install-strip +install: + +.PHONY: info +info: utt.info + +.PHONY: install-info +install-info: + +.PHONY: dvi +dvi: utt.dvi + +.PHONY: install-dvi +install-dvi: + +.PHONY: html +html: utt.html + +.PHONY: install-html +install-html: + +.PHONY: pdf +pdf: utt.pdf + +.PHONY: install-pdf +install-pdf: + +.PHONY: ps +ps: utt.ps + +.PHONY: install-ps +install-ps: + +.PHONY: uninstall +uninstall: .PHONY: clean clean: @@ -131,19 +173,12 @@ clean: \$(RM) \$(patsubst %.l,%.c,\$(SEN_FLEX_FILES)) \$(RM) \$(FLA_OBJ_FILES) \$(RM) \$(RS12_OBJ_FILES) + \$(RM) \$(DOC_FILES) .PHONY: distclean distclean: clean \$(RM) \$(CONFIG_FILES) -.PHONY: install -install: all - echo TODO: make install - -.PHONY: uninstall -uninstall: - echo TODO: make uninstall - %.o: %.c \$(CC) -c \$< -o \$@ \$(ALL_CFLAGS) @@ -171,5 +206,20 @@ uninstall: \$(CP) \$< \$@ \$(CHMOD) a+x \$@ +%.info: %.texinfo + \$(MAKEINFO) \$< -o \$@ + +%.dvi: %.texinfo + \$(TEXI2DVI) --build=clean \$< -o \$@ + +%.html: %.texinfo + \$(MAKEINFO) --html --no-split \$< -o \$@ + +%.pdf: %.texinfo + \$(TEXI2PDF) --build=clean \$< -o \$@ + +%.ps: %.dvi + \$(DVIPS) \$< -o \$@ + EOF diff --git a/auto/summary b/auto/summary index 519bb70..397a71a 100755 --- a/auto/summary +++ b/auto/summary @@ -39,6 +39,10 @@ Configuration summary PR : $PR CP : $CP CHMOD : $CHMOD + MAKEINFO : $MAKEINFO + TEXI2DVI : $TEXI2DVI + TEXI2PDF : $TEXI2PDF + DVIPS : $DVIPS CFLAGS : $CFLAGS LDFLAGS : $LDFLAGS diff --git a/app/doc/utt.texinfo b/doc/utt.texinfo similarity index 100% rename from app/doc/utt.texinfo rename to doc/utt.texinfo