From e102e411e4c9a70823b10b25e748f9c1e829b956 Mon Sep 17 00:00:00 2001 From: Achim Gratz Date: Mon, 16 Apr 2012 19:35:55 +0200 Subject: [PATCH] doc/Makefile: rename/add auto-generated files to be compatible with Emacs * doc/Makefile: rename auto-generated file "git-describe.texi" to "org-version.inc" to allow for easier inclusion into Emacs. * doc/org.texi: include "org-version.inc" instead of "git-describe.texi". * lisp/Makefile: new auto-generated file org-version.el with autoload cookies. The version strings will be pulled during autoload extraction into org-install.el (standalone org-mode) or ../loaddefs.el (Emacs). --- .gitignore | 6 ++---- doc/Makefile | 12 ++++++------ doc/org.texi | 2 +- lisp/Makefile | 31 +++++++++++++++++++++++-------- 4 files changed, 32 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index 609c2240b..1470b8707 100644 --- a/.gitignore +++ b/.gitignore @@ -31,13 +31,13 @@ orgcard_letter.tex orgcard.txt org org-install.el +org-version.* org-*.tar.gz org-*.zip manual org_dual_license.texi ORGWEBPAGE/Changes.txt local*.mk -doc/git-describe.texi .gitattributes # texi2pdf --tidy @@ -63,10 +63,8 @@ TODO .DS_Store *# .#* +/UTILITIES/x11idle # # Local variables: -# fill-column: 72 -# mode: conf # End: -/UTILITIES/x11idle diff --git a/doc/Makefile b/doc/Makefile index bb3e80762..7672664af 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -23,10 +23,10 @@ guide:: orgguide.texi $(TEXI2HTML) -o $@ $< ../UTILITIES/guidesplit.pl $@/* -git-describe.texi: org.texi - @echo "@c automatically generated, do not edit" > git-describe.texi - @echo "@set VERSION $(ORGVERSION) ($(GITVERSION))" >> git-describe.texi - @echo "@set DATE $(DATE)" >> git-describe.texi +org-version.inc: + @echo "@c automatically generated, do not edit" > org-version.inc + @echo "@set VERSION $(ORGVERSION) ($(GITVERSION))" >> org-version.inc + @echo "@set DATE $(DATE)" >> org-version.inc install: org @@ -37,7 +37,7 @@ install: org clean: $(RM) org *.pdf *.html *_letter.tex \ *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs \ - *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps git-describe.texi + *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps org-version.inc cleanall: clean $(RMR) guide manual @@ -48,7 +48,7 @@ clean-install: .SUFFIXES: .texi .tex .txt %: %.texi - $(MAKE) git-describe.texi + $(MAKE) org-version.inc $(MAKEINFO) --no-split $< -o $@ %.pdf: LC_ALL=C # work around a bug in texi2dvi diff --git a/doc/org.texi b/doc/org.texi index 467293e72..1a0dbb95c 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -4,7 +4,7 @@ @setfilename ../../info/org @settitle The Org Manual -@include git-describe.texi +@include org-version.inc @c Use proper quote and backtick for code sections in PDF output @c Cf. Texinfo manual 14.2 diff --git a/lisp/Makefile b/lisp/Makefile index 4957ce941..7e140d756 100644 --- a/lisp/Makefile +++ b/lisp/Makefile @@ -1,21 +1,33 @@ ORG-INSTALL = $(BATCH) \ --eval '(require '"'"'autoload)' \ - --eval '(find-file "$(LISPO)")' \ + --eval '(find-file "org-install.el")' \ --eval '(erase-buffer)' \ - --eval '(insert ";;; org-install.el --- automatically extracted autoloads\n;;\n;;; Code:\n")' \ - --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x))) (quote ($(LISPF))))' \ + --eval '(insert ";;; org-install.el --- autogenerated file, do not edit\n;;\n;;; Code:\n")' \ + --eval '(mapc (lambda (x) (generate-file-autoloads (symbol-name x)))\ + (quote ($(LISPF) org-version.el)))' \ --eval '(insert "\f\n(provide '"'"'org-install)\n")' \ + --eval '(insert ";; Local Variables:\n;; version-control: never\n")' \ + --eval '(insert ";; no-byte-compile: t\n;; no-update-autoloads: t\n")' \ + --eval '(insert ";; coding: utf-8\n;; End:\n;;; org-install.el ends here\n")' \ + --eval '(save-buffer)' +ORG-VERSION = $(BATCH) \ + --eval '(find-file "org-version.el")' \ + --eval '(erase-buffer)' \ + --eval '(insert ";;; org-version.el --- autogenerated file, do not edit\n;;\n;;; Code:\n")' \ + --eval '(insert ";;;\#\#\#autoload\n")' \ --eval '(insert "(defconst org-release \"$(ORGVERSION)\"\n")' \ --eval '(insert " \"The release version of org-mode.\n")' \ --eval '(insert " Inserted by installing org-mode or when a release is made.\")\n")' \ + --eval '(insert ";;;\#\#\#autoload\n")' \ --eval '(insert "(defconst org-git-version \"$(GITVERSION)\"\n")' \ --eval '(insert " \"The Git version of org-mode.\n")' \ --eval '(insert " Inserted by installing org-mode or when a release is made.\")\n")' \ + --eval '(insert ";;;\#\#\#autoload\n")' \ --eval '(insert "(defconst org-odt-data-dir \"$(datadir)\"\n")' \ --eval '(insert " \"The location of ODT styles.\")\n")' \ --eval '(insert ";; Local Variables:\n;; version-control: never\n")' \ - --eval '(insert ";; no-byte-compile: t\n;; no-update-autoloads: t\n")' \ - --eval '(insert ";; coding: utf-8\n;; End:\n;;; org-install.el ends here\n")' \ + --eval '(insert ";; no-byte-compile: t\n")' \ + --eval '(insert ";; coding: utf-8\n;; End:\n;;; org-version.el ends here\n")' \ --eval '(save-buffer)' -include local.mk # optional local customization @@ -25,8 +37,8 @@ ifeq ($(MAKELEVEL), 0) $(error This make needs to be started as a sub-make from the toplevel directory.) endif -LISPO = org-install.el -LISPF = $(subst $(LISPO),,$(wildcard *.el)) +LISPO = org-install.el org-version.el # autogenerated files +LISPF = $(filter-out $(LISPO),$(wildcard *.el)) LISPC = $(LISPF:%el=%elc) .PHONY: all compile compile-dirty \ @@ -40,7 +52,10 @@ compile-dirty: cleanauto autoloads: $(LISPO) -org-install.el: $(LISPF) +org-version.el: $(LISPF) + $(ORG-VERSION) + +org-install.el: org-version.el $(ORG-INSTALL) install: $(LISPF) compile autoloads -- 2.11.4.GIT