diff --git a/Makefile b/Makefile index 02ed3c329..225dad3d6 100644 --- a/Makefile +++ b/Makefile @@ -3,10 +3,9 @@ # Maintainer: Carsten Dominik # Version: VERSIONTAG # -# To install org-mode, edit the Makefile, type `make', then `make install'. -# To create the PDF and HTML documentation files, type `make doc'. # Describe valid make targets for org-mode. +.PHONY: targets help targets help: @echo "make - compile Org ELisp files" @echo "make clean - clean Elisp and documentation files" diff --git a/default.mk b/default.mk index 802105af0..f19ac4920 100644 --- a/default.mk +++ b/default.mk @@ -39,6 +39,12 @@ MAKEINFO = makeinfo # How to create the HTML file TEXI2HTML = makeinfo --html --number-sections +# How to find files +FIND = find + +# How to remove files +RM = rm + # How to copy the lisp files and elc files to their destination. # CP = cp -p # try this if there is no install CP = install -p diff --git a/maint-targets.mk b/maint-targets.mk index d22dc53da..3d71d7a18 100644 --- a/maint-targets.mk +++ b/maint-targets.mk @@ -1,6 +1,15 @@ +.PHONY: p g html_manual html_guide \ + testrelease release fixrelease \ + relup makerelease sync_release sync_manual \ + distfile pkg push pushtag pushreleasetag +.NOTPARALLEL: .PHONY # Below here are special targets for maintenance only -html: doc/org.html +p: pdf + open doc/org.pdf + +g: pdf + open doc/orgguide.pdf html_manual: doc/org.texi rm -rf doc/manual @@ -14,12 +23,6 @@ html_guide: doc/orgguide.texi $(TEXI2HTML) -o doc/guide doc/orgguide.texi UTILITIES/guidesplit.pl doc/guide/*.html -info: doc/org - -pdf: doc/org.pdf doc/orgguide.pdf - -card: doc/orgcard.pdf doc/orgcard_letter.pdf doc/orgcard.txt - testrelease: git checkout -b testrelease origin/maint git merge -s recursive -X theirs master @@ -146,37 +149,6 @@ pkg: echo "(define-package \"org\" \"$(PKG_TAG)\" \"$(PKG_DOC)\" $(PKG_REQ))" > org-$(PKG_TAG)/org-pkg.el tar cf org-$(PKG_TAG).tar org-$(PKG_TAG) --remove-files -cleanall: - ${MAKE} clean - rm -f lisp/org-install.el - -clean: - ${MAKE} cleanelc - ${MAKE} cleandoc - ${MAKE} cleanrel - rm -f *~ */*~ */*/*~ - -cleancontrib: - find contrib -name \*~ -exec rm {} \; - -cleanelc: - rm -f $(ELCFILES) -cleandoc: - -(cd doc && rm -f org.pdf org org.html orgcard.pdf orgguide.pdf) - -(cd doc && rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs) - -(cd doc && rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps) - -(cd doc && rm -f orgcard_letter.tex orgcard_letter.pdf) - -(cd doc && rm -rf manual) - -cleanrel: - rm -rf RELEASEDIR - rm -rf org-7.* - rm -rf org-7*zip org-7*tar.gz - -.el.elc: - $(ELC) $< - - push: git push orgmode@orgmode.org:org-mode.git master diff --git a/targets.mk b/targets.mk index 409ee0f78..5ccdf1986 100644 --- a/targets.mk +++ b/targets.mk @@ -1,9 +1,13 @@ +.PHONY: default all up2 update compile \ + install info html pdf card doc install-lisp install-info \ + autoloads cleanall clean cleancontrib cleanelc cleandoc cleanrel +.NOTPARALLEL: .PHONY # Additional distribution files DISTFILES_extra= Makefile request-assign-future.txt contrib etc -default: $(ELCFILES) $(ELCBFILES) +default: $(ELCFILES) -all: $(ELCFILES) $(ELCBFILES) $(INFOFILES) +all: default $(INFOFILES) up2: update sudo ${MAKE} install @@ -13,19 +17,21 @@ update: ${MAKE} clean ${MAKE} all -compile: $(ELCFILES0) $(ELCBFILES) +compile: $(ELCFILES0) install: install-lisp -doc: doc/org.html doc/org.pdf doc/orgcard.pdf doc/orgcard_letter.pdf doc/orgguide.pdf doc/orgcard.txt +info: doc/org -p: - ${MAKE} pdf && open doc/org.pdf +html: doc/org.html -g: - ${MAKE} pdf && open doc/orgguide.pdf +pdf: doc/org.pdf doc/orgguide.pdf -install-lisp: $(LISPFILES) $(ELCFILES) +card: doc/orgcard.pdf doc/orgcard_letter.pdf doc/orgcard.txt + +doc: html pdf card + +install-lisp: $(LISPFILES) default if [ ! -d $(lispdir) ]; then $(MKDIR) $(lispdir); else true; fi ; $(CP) $(LISPFILES) $(lispdir) $(CP) $(ELCFILES) $(lispdir) @@ -37,31 +43,30 @@ install-info: $(INFOFILES) autoloads: lisp/org-install.el -lisp/org-install.el: $(LISPFILES0) Makefile - $(BATCH) --eval "(require 'autoload)" \ - --eval '(find-file "org-install.el")' \ - --eval '(erase-buffer)' \ - --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \ - --eval '(insert "\n(provide (quote org-install))\n")' \ - --eval '(save-buffer)' +lisp/org-install.el: $(LISPFILES0) maint.mk dependencies.mk + $(BATCH) \ + --eval "(require 'autoload)" \ + --eval '(find-file "org-install.el")' \ + --eval '(erase-buffer)' \ + --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPFILES0))))' \ + --eval '(insert "\n(provide (quote org-install))\n")' \ + --eval '(save-buffer)' mv org-install.el lisp doc/org: doc/org.texi (cd doc && $(MAKEINFO) --no-split org.texi -o org) -doc/org.pdf: doc/org.texi - (cd doc && $(TEXI2PDF) org.texi) - -doc/orgguide.pdf: doc/orgguide.texi - (cd doc && $(TEXI2PDF) orgguide.texi) +doc/%.pdf: LC_ALL=C # work around a bug in texi2dvi +doc/%.pdf: LANG=C # work around a bug in texi2dvi +doc/%.pdf: doc/%.texi + (cd doc && $(TEXI2PDF) $( orgcard.txt) @@ -69,6 +74,29 @@ doc/orgcard_letter.tex: doc/orgcard.tex perl -pe 's/\\pdflayout=\(0l\)/\\pdflayout=(1l)/' \ doc/orgcard.tex > doc/orgcard_letter.tex -doc/orgcard_letter.pdf: doc/orgcard_letter.tex - (cd doc && pdftex orgcard_letter.tex) +cleanall: clean + $(RM) lisp/org-install.el +clean: cleanelc cleandoc cleanrel cleancontrib + -$(FIND) . -name \*~ -exec $(RM) {} \; + +cleancontrib: + -$(FIND) contrib -name \*~ -exec $(RM) {} \; + +cleanelc: + rm -f $(ELCFILES) + +cleandoc: + -(cd doc && rm -f org.pdf org org.html orgcard.pdf orgguide.pdf) + -(cd doc && rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs) + -(cd doc && rm -f *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps) + -(cd doc && rm -f orgcard_letter.tex orgcard_letter.pdf) + -(cd doc && rm -rf manual) + +cleanrel: + rm -rf RELEASEDIR + rm -rf org-7.* + rm -rf org-7*zip org-7*tar.gz + +.el.elc: + $(ELC) $<