Browse Source

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).
Achim Gratz 13 years ago
parent
commit
e102e411e4
4 changed files with 32 additions and 19 deletions
  1. 2 4
      .gitignore
  2. 6 6
      doc/Makefile
  3. 1 1
      doc/org.texi
  4. 23 8
      lisp/Makefile

+ 2 - 4
.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

+ 6 - 6
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

+ 1 - 1
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

+ 23 - 8
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