"Fossies" - the Fresh Open Source Software Archive

Member "auctex-12.3/Makefile.in" (18 Oct 2020, 26377 Bytes) of package /linux/misc/auctex-12.3.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "Makefile.in": 12.2_vs_12.3.

    1 # Makefile for AUCTeX
    2 
    3 # Maintainer: auctex-devel@gnu.org
    4 
    5 # Copyright (C) 2003-2008, 2010, 2013-2015, 2018-2019 Free Software
    6 #   Foundation, Inc.
    7 
    8 # This file is part of AUCTeX.
    9 
   10 # AUCTeX is free software; you can redistribute it and/or modify it
   11 # under the terms of the GNU General Public License as published by
   12 # the Free Software Foundation; either version 3, or (at your option)
   13 # any later version.
   14 
   15 # AUCTeX is distributed in the hope that it will be useful, but
   16 # WITHOUT ANY WARRANTY; without even the implied warranty of
   17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   18 # General Public License for more details.
   19 
   20 # You should have received a copy of the GNU General Public License
   21 # along with AUCTeX; see the file COPYING.  If not, write to the Free
   22 # Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
   23 # MA 02110-1301, USA.
   24 
   25 @SET_MAKE@
   26 
   27 prefix = @prefix@$(null)
   28 exec_prefix = @exec_prefix@$(null)
   29 libdir = @libdir@$(null)
   30 packagedatadir = @packagedatadir@$(null)
   31 datarootdir = @datarootdir@$(null)
   32 datadir = @datadir@$(null)
   33 localstatedir = @localstatedir@$(null)
   34 infodir = @infodir@$(null)
   35 lispdir = @lispdir@$(null)
   36 auctexstartfile=@auctexstartfile@
   37 previewstartfile = @previewstartfile@
   38 packagelispdir = @packagelispdir@$(null)
   39 packagedatadir = @packagedatadir@$(null)
   40 autodir = @autodir@$(null)
   41 preview_enabled=@preview_enabled@
   42 styledir = $(packagedatadir)/style
   43 AUCTEXDATE = @AUCTEXDATE@
   44 AUCTEXVERSION = @AUCTEXVERSION@
   45 
   46 INSTALL = @INSTALL@
   47 INSTALL_DATA = @INSTALL_DATA@
   48 MKINSTALLDIRS = ./mkinstalldirs
   49 DESTDIR=
   50 
   51 PACKAGE=auctex
   52 PACKAGE_INFO=auctex preview-latex
   53 EMACS=@EMACS@
   54 ELCC=$(EMACS) -batch -q -no-site-file -no-init-file -l lpath.el
   55 AUTOLOAD=--eval '(let ((autoload-file (expand-file-name "$@"))) \
   56   (mapcar (lambda (file) \
   57             (update-file-autoloads file nil autoload-file)) \
   58           command-line-args-left) \
   59   (save-buffers-kill-emacs t))'
   60 
   61 PREVIEW_AUTOLOAD=--eval '(let ((autoload-file (expand-file-name "$@"))) \
   62   (update-file-autoloads "preview.el" nil autoload-file) \
   63   (save-buffers-kill-emacs t))'
   64 
   65 # Files and directories excluded from distributed tar ball.
   66 EXCLUDEDFILES=autogen.sh .gitignore doc/.gitignore doc/tex-ref.log \
   67 	latex/.gitignore README.GIT tests build-aux
   68 
   69 .SUFFIXES: .el .elc .texi
   70 
   71 SHELL = /bin/sh
   72 CP = cp -p
   73 CP_A = $(CP) -R
   74 
   75 DIST_PREFIX=$(PWD)/auctex-dist
   76 FTPDIR = $(DIST_PREFIX)/ftp
   77 WWWDIR = $(DIST_PREFIX)/www
   78 CTANDIR = $(DIST_PREFIX)/ctan
   79 PREVIEW_BUILD_DIR = preview-build
   80 COMMITTER="`git config --get user.name`\ \ \<`git config --get user.email`\>"
   81 RPMROOT = /usr/src/redhat
   82 RPM_SIGN = --sign
   83 
   84 AUCSRC = tex.el tex-buf.el tex-style.el plain-tex.el latex.el tex-info.el \
   85 	texmathp.el multi-prompt.el tex-mik.el font-latex.el tex-font.el \
   86 	context.el context-en.el context-nl.el tex-fold.el tex-jp.el \
   87 	toolbar-x.el tex-bar.el bib-cite.el tex-ispell.el latex-flymake.el
   88 AUCELC = $(AUCSRC:.el=.elc)
   89 
   90 STYLESRC = style/prosper.el \
   91 	   style/slides.el    style/foils.el     style/amstex.el \
   92 	   style/article.el   style/book.el      style/letter.el \
   93 	   style/report.el    style/amsart.el    style/amsbook.el \
   94 	   style/epsf.el      style/psfig.el     style/latexinfo.el \
   95 	   style/dutch.el     style/german.el    style/dk.el \
   96 	   style/j-article.el style/j-book.el    style/j-report.el \
   97 	   style/jarticle.el  style/jbook.el     style/jreport.el \
   98 	   style/tarticle.el  style/tbook.el     style/treport.el \
   99 	   style/jsarticle.el style/jsbook.el    style/jsreport.el \
  100 	   style/dinbrief.el  style/virtex.el    style/plfonts.el \
  101 	   style/plhb.el      style/harvard.el	 style/swedish.el \
  102 	   style/danish.el    style/slovak.el    style/czech.el \
  103 	   style/amsmath.el   style/amstext.el   style/amsbsy.el \
  104 	   style/amsopn.el    style/amsthm.el	 style/natbib.el \
  105 	   style/index.el     style/makeidx.el   style/multind.el \
  106 	   style/varioref.el  style/fancyref.el	 style/mdwlist.el \
  107 	   style/ngerman.el   style/graphicx.el	 style/graphics.el \
  108 	   style/verbatim.el  style/scrbase.el   style/scrartcl.el \
  109 	   style/scrbook.el   style/scrreprt.el	 style/scrlttr2.el \
  110 	   style/scrpage2.el  style/captcont.el  style/subfigure.el \
  111 	   style/paralist.el  style/booktabs.el  style/emp.el \
  112 	   style/jura.el      style/alphanum.el	 style/beamer.el \
  113 	   style/alltt.el     style/italian.el   style/doc.el \
  114 	   style/ltxdoc.el    style/ltx-base.el	 style/units.el \
  115 	   style/nicefrac.el  style/url.el       style/listings.el \
  116 	   style/inputenc.el  style/frenchb.el   style/francais.el \
  117 	   style/MinionPro.el style/pdfsync.el   style/polish.el \
  118 	   style/polski.el    style/icelandic.el style/comment.el \
  119 	   style/flashcards.el style/pstricks.el style/nomencl.el \
  120 	   style/hyperref.el  style/bulgarian.el style/CJK.el \
  121 	   style/ruby.el      style/CJKutf8.el   style/tabularx.el \
  122 	   style/multido.el   style/pst-grad.el  style/pst-node.el \
  123 	   style/pst-plot.el  style/pst-slpe.el  style/shortvrb.el \
  124 	   style/austrian.el  style/naustrian.el style/french.el \
  125 	   style/lettrine.el  style/multicol.el  style/xspace.el \
  126 	   style/setspace.el  style/biblatex.el  style/siunitx.el \
  127 	   style/bm.el        style/footmisc.el  style/ulem.el \
  128 	   style/bigdelim.el  style/bigstrut.el  style/everysel.el \
  129 	   style/mathtools.el style/ragged2e.el  style/amssymb.el \
  130 	   style/lscape.el    style/epigraph.el  style/mflogo.el \
  131 	   style/multirow.el  style/imakeidx.el  style/afterpage.el \
  132 	   style/longtable.el style/lipsum.el    style/kantlipsum.el \
  133 	   style/memoir.el    style/placeins.el  style/nameref.el \
  134 	   style/fancynum.el  style/fancyhdr.el	 style/filecontents.el \
  135 	   style/array.el     style/kpfonts.el   style/acro.el \
  136 	   style/acronym.el   style/xparse.el    style/fancyvrb.el \
  137 	   style/tabulary.el  style/fontspec.el  style/unicode-math.el \
  138 	   style/luacode.el   style/metalogo.el  style/english.el \
  139 	   style/exercise.el  style/plext.el     style/cleveref.el \
  140 	   style/eso-pic.el   style/fontaxes.el  style/AnonymousPro.el \
  141 	   style/mdsymbol.el  style/MyriadPro.el style/textcomp.el \
  142 	   style/XCharter.el  style/zlmtt.el     style/ifluatex.el \
  143 	   style/luatextra.el style/erewhon.el   style/baskervaldx.el \
  144 	   style/fbb.el       style/newtxmath.el style/newtxsf.el \
  145 	   style/newtxtext.el style/newtxttt.el  style/minted.el \
  146 	   style/wrapfig.el   style/relsize.el   style/currvita.el \
  147 	   style/tcolorbox.el style/color.el	 style/expl3.el \
  148 	   style/bidibeamer.el style/enumitem.el style/caption.el \
  149 	   style/geometry.el  style/ltablex.el   style/ltxtable.el \
  150 	   style/mn2e.el      style/colortbl.el  style/attachfile.el \
  151 	   style/newpxtext.el style/newpxmath.el style/pdfpages.el \
  152 	   style/mnras.el     style/environ.el   style/polyglossia.el \
  153 	   style/vwcol.el     style/textpos.el   style/transparent.el \
  154 	   style/fontenc.el   style/Alegreya.el  style/gloss-italian.el \
  155 	   style/newfloat.el  style/subcaption.el style/AlegreyaSans.el \
  156 	   style/hologo.el    style/theorem.el   style/ntheorem.el \
  157 	   style/splitidx.el  style/tikz.el      style/xcolor.el \
  158 	   style/pdflscape.el style/commath.el   style/empheq.el \
  159 	   style/framed.el    style/paracol.el   style/menukeys.el \
  160 	   style/bidi.el      style/FiraMono.el  style/FiraSans.el \
  161 	   style/bicaption.el style/amsfonts.el  style/subfiles.el \
  162 	   style/dcolumn.el   style/mdframed.el  style/tcolorboxlib-raster.el \
  163 	   style/titleps.el   style/titlesec.el  style/titletoc.el \
  164 	   style/exam.el      style/breqn.el     style/sourcecodepro.el \
  165 	   style/preview.el   style/fvextra.el   style/jurabib.el \
  166 	   style/csquotes.el  style/babel.el     style/dk-bib.el \
  167 	   style/floatrow.el  style/moodle.el    style/canadian.el \
  168 	   style/arabxetex.el style/australian.el style/newzealand.el \
  169 	   style/xltabular.el style/marginnote.el style/thmtools.el \
  170 	   style/ocg-p.el     style/ocgx.el      style/thm-restate.el \
  171 	   style/pythontex.el style/dashundergaps.el style/beamerarticle.el \
  172 	   style/changelog.el style/ltugboat.el  style/beamerswitch.el \
  173 	   style/multitoc.el  style/fbox.el      style/xkcdcolors.el \
  174 	   style/ltxguide.el  style/revtex4-2.el style/overpic.el \
  175 	   style/tex-live.el  style/algorithm.el style/algpseudocode.el
  176 
  177 STYLEELC = $(STYLESRC:.el=.elc)
  178 
  179 ifeq (@preview_enabled@,yes)
  180    PREVIEWSRC = preview.el
  181    PREVIEWELC = $(PREVIEWSRC:.el=.elc)
  182    PREVIEWLATEX = $(MAKE) preview-latex.el
  183    TEXMF = (cd latex ; $(MAKE) all)
  184 
  185    # Install actions
  186    INS_TEXMF = (cd latex ; $(MAKE) DESTDIR=$(DESTDIR) install)
  187    PREVIEW_INS_STARTUP = \
  188      $(INSTALL_DATA) preview-latex.el $(DESTDIR)$(previewstartfile)
  189 else
  190    # Don't do anything with preview if the user doesn't want the
  191    # preview component.
  192    PREVIEWSRC =
  193    PREVIEWELC =
  194    PREVIEWLATEX =
  195    TEXMF =
  196    INS_TEXMF =
  197    PREVIEW_INS_STARTUP =
  198 endif
  199 
  200 
  201 
  202 CLEANFILES = $(AUCELC) $(STYLEELC) $(PREVIEWELC) preview-latex.el
  203 DISTCLEANFILES = Makefile tex-site.el tex-site.el.out auctex.el \
  204 	auto-loads.el config.* preview.el
  205 DISTTEXTS = FAQ INSTALL INSTALL.windows README TODO PROBLEMS.preview
  206 
  207 NOSEARCH = style/.nosearch
  208 
  209 all: texmf lisp docs
  210 
  211 .PHONY: all lisp info dvi some install install-el install-lisp docs	\
  212 	install-docs install-auto install-startup			\
  213 	clean distclean maintainer-clean extraclean			\
  214 	tar-ball-clean check-tag check release-commit dist snapshot	\
  215 	patch tar-ball rpm-packages wc windows-package	\
  216 	release-sign release-upload preview-ball uninstall
  217 
  218 texmf: latex/Makefile
  219 	$(TEXMF)
  220 
  221 lisp:	tex-site.el $(AUCSRC) $(STYLESRC) $(PREVIEWSRC)
  222 	$(ELCC) -f batch-byte-compile $(AUCSRC) $(STYLESRC) $(PREVIEWSRC)
  223 	$(PREVIEWLATEX)
  224 
  225 preview-latex.el: preview.el
  226 	rm -f preview-latex.el
  227 	-$(EMACS) -batch -no-site-file -no-init-file $(PREVIEW_AUTOLOAD) ; \
  228 	test -r $@ || { \
  229 	  echo ";; Auto-generated preview-latex.el" > $@ ; \
  230 	  echo "" >> $@ ; \
  231 	  $(EMACS) -batch -no-site-file -no-init-file $(PREVIEW_AUTOLOAD) ; \
  232 	}
  233 
  234 docs:
  235 	cd doc ; $(MAKE) all
  236 
  237 info:
  238 	cd doc ; $(MAKE) info
  239 
  240 dvi:
  241 	cd doc ; $(MAKE) dvi
  242 
  243 tex-site.el: tex-site.el.out auto-loads.el Makefile
  244 	cat tex-site.el.out >$@
  245 	cat auto-loads.el >>$@
  246 	echo "(provide 'tex-site)" >>$@ ; \
  247 	echo ";;; tex-site.el ends here" >>$@
  248 
  249 tex-site.el.out: tex-site.el.in Makefile config.status
  250 	./config.status
  251 
  252 auctex.el: auctex.el.in config.status
  253 	./config.status
  254 
  255 latex/Makefile: latex/Makefile.in Makefile config.status
  256 	./config.status
  257 
  258 configure: configure.ac aclocal.m4
  259 	autoconf
  260 
  261 Makefile: Makefile.in config.status
  262 	./config.status
  263 
  264 doc/Makefile: doc/Makefile.in config.status ChangeLog.1
  265 	./config.status
  266 
  267 config.status: configure
  268 	./config.status --recheck
  269 
  270 auto-loads.el: $(AUCSRC) Makefile
  271 	rm -f $@
  272 	-$(ELCC) $(AUTOLOAD) $(AUCSRC)
  273 	test -r $@ || { \
  274 	  echo ";; Auto-generated part of tex-site.el" > $@ ; \
  275 	  echo "" >> $@ ; \
  276 	  $(ELCC) $(AUTOLOAD) $(AUCSRC) ; \
  277 	}
  278 
  279 some:	$(AUCELC) $(STYLEELC)
  280 
  281 install: install-texmf install-lisp install-docs install-images \
  282          install-startup
  283 
  284 install-startup:
  285 	$(PREVIEWLATEX)
  286 	$(PREVIEW_INS_STARTUP)
  287 	$(INSTALL_DATA) auctex.el $(DESTDIR)$(auctexstartfile)
  288 
  289 install-texmf:
  290 	$(INS_TEXMF)
  291 
  292 install-el:
  293 	-$(MKINSTALLDIRS) $(DESTDIR)$(lispdir)
  294 	rm -f $(DESTDIR)$(packagelispdir)/tex-site.el # Remove old (Git-version) mistakes
  295 	test ! -f $(DESTDIR)$(lispdir)/tex-site.el || { \
  296 	   if grep -q "tex-site.*Don't edit." $(DESTDIR)$(lispdir)/tex-site.el; then \
  297 	    echo "Overwriting old tex-site.el" ; \
  298 	   else \
  299 	    echo "Renaming old tex-site.el to tex-site.el.save" ; \
  300 	    mv $(DESTDIR)$(lispdir)/tex-site.el $(DESTDIR)$(lispdir)/tex-site.el.save ; \
  301 	   fi; \
  302 	}
  303 	$(INSTALL_DATA) tex-site.el $(DESTDIR)$(lispdir)
  304 	-$(MKINSTALLDIRS) $(DESTDIR)$(packagelispdir)
  305 	@: $(MAKE) ; for x in $(AUCSRC) $(PREVIEWSRC); do \
  306 	  echo '$(INSTALL_DATA)' $$x '$(DESTDIR)$(packagelispdir)' ; \
  307 	done
  308 	@for x in $(AUCSRC) $(PREVIEWSRC); do \
  309 	  $(INSTALL_DATA) $$x $(DESTDIR)$(packagelispdir) ; \
  310 	done;
  311 	-$(MKINSTALLDIRS) $(DESTDIR)$(styledir)
  312 	$(INSTALL_DATA) $(NOSEARCH) $(DESTDIR)$(styledir)
  313 	@: $(MAKE) ; for x in $(STYLESRC) ; do \
  314 	  echo '$(INSTALL_DATA)' $$x '$(DESTDIR)$(styledir)' ; \
  315 	done;
  316 	@for x in $(STYLESRC) ; do \
  317 	  $(INSTALL_DATA) $$x $(DESTDIR)$(styledir) ; \
  318 	done;
  319 	-$(MKINSTALLDIRS) $(DESTDIR)$(autodir)
  320 	-$(INSTALL_DATA) $(NOSEARCH) $(DESTDIR)$(autodir)
  321 
  322 install-lisp: some install-el
  323 	@: $(MAKE) ; for x in $(AUCSRC) $(PREVIEWSRC); do \
  324 	  echo '$(INSTALL_DATA)' $${x}c '$(DESTDIR)$(packagelispdir)' ; \
  325 	done
  326 	@for x in $(AUCSRC) $(PREVIEWSRC); do \
  327 	  $(INSTALL_DATA) $${x}c $(DESTDIR)$(packagelispdir) ; \
  328 	done
  329 	@: $(MAKE) ; for x in $(STYLESRC) ; do \
  330 	  echo '$(INSTALL_DATA)' $${x}c '$(DESTDIR)$(styledir)' ; \
  331 	done
  332 	@for x in $(STYLESRC) ; do \
  333 	  $(INSTALL_DATA) $${x}c $(DESTDIR)$(styledir) ; \
  334 	done
  335 
  336 install-images:
  337 	-$(MKINSTALLDIRS) $(DESTDIR)$(packagedatadir)/images
  338 	@: $(MAKE) ; for x in images/*.xpm ; do \
  339 	  echo '$(INSTALL_DATA)' $${x} '$(DESTDIR)$(packagedatadir)/images' ; \
  340 	done
  341 	@for x in images/*.xpm ; do \
  342 	  $(INSTALL_DATA) $${x} $(DESTDIR)$(packagedatadir)/images ; \
  343 	done
  344 
  345 install-docs:	doc/Makefile
  346 	cd doc ; $(MAKE) DESTDIR=$(DESTDIR) install-auctex
  347 	test "x$(preview_enabled)" != xyes || { \
  348 		cd doc ; $(MAKE) DESTDIR=$(DESTDIR) install-preview; }
  349 
  350 install-auto:
  351 	@echo "Use \"M-x TeX-auto-generate-global RET\" instead."
  352 
  353 uninstall:
  354 	rm -rf $(DESTDIR)$(packagelispdir) $(DESTDIR)$(packagedatadir) \
  355 		$(DESTDIR)$(autodir)
  356 	rm -f $(DESTDIR)$(lispdir)/tex-site.el $(DESTDIR)$(auctexstartfile)
  357 	cd doc ; $(MAKE) DESTDIR=$(DESTDIR) uninstall
  358 	rm -f $(DESTDIR)$(previewstartfile)
  359 	rm -rf $(DESTDIR)$(packagelispdir)
  360 	(cd latex ; $(MAKE) DESTDIR=$(DESTDIR) uninstall)
  361 
  362 .el.elc:
  363 	$(ELCC) -f batch-byte-compile $<
  364 
  365 clean:	doc/Makefile latex/Makefile
  366 	rm -f $(CLEANFILES)
  367 	cd doc && $(MAKE) clean
  368 	cd latex && $(MAKE) clean
  369 
  370 distclean: doc/Makefile latex/Makefile
  371 	rm -f $(CLEANFILES) $(DISTCLEANFILES)
  372 	cd doc && $(MAKE) distclean
  373 	cd latex && $(MAKE) distclean
  374 
  375 maintainer-clean: doc/Makefile latex/Makefile
  376 	rm -f $(DISTTEXTS)
  377 	rm -rf autom4te.cache
  378 	rm -f $(CLEANFILES) $(DISTCLEANFILES)
  379 	cd doc && $(MAKE) maintainer-clean
  380 	cd latex && $(MAKE) distclean
  381 	cd tests && $(MAKE) clean
  382 
  383 extraclean: maintainer-clean
  384 	rm -f *~ \#*\#
  385 
  386 tar-ball-clean: check-tag
  387 	rm -rf auctex-$(TAG)/
  388 
  389 wc:
  390 	wc $(AUCSRC) $(STYLESRC)
  391 
  392 # ----------------------------------------------------------------------
  393 # The targets below update the ChangeLog from git log
  394 # and are intended to be used only by the maintainers.
  395 # These rules are adapted from GNU Emacs Makefile.
  396 
  397 .PHONY: ChangeLog change-history change-history-commit change-history-nocommit
  398 .PHONY: preferred-branch-is-current unchanged-history-files
  399 
  400 CHANGELOG = ChangeLog
  401 auctexlog = build-aux/gitlog-to-auctexlog
  402 # The ChangeLog history files are called ChangeLog.1, ChangeLog.2, ...,
  403 # ChangeLog.$(CHANGELOG_HISTORY_INDEX_MAX).  $(CHANGELOG_N) stands for
  404 # the newest (highest-numbered) ChangeLog history file.
  405 CHANGELOG_HISTORY_INDEX_MAX = 1
  406 CHANGELOG_N = ChangeLog.$(CHANGELOG_HISTORY_INDEX_MAX)
  407 
  408 # Check that we are in a good state for changing history.
  409 PREFERRED_BRANCH = master
  410 preferred-branch-is-current:
  411 	git branch | grep -q '^\* $(PREFERRED_BRANCH)$$'
  412 unchanged-history-files:
  413 	x=$$(git diff-files --name-only $(CHANGELOG_N) $(auctexlog)) && \
  414 	  test -z "$$x"
  415 
  416 # Convert git commit log to ChangeLog file.  make-dist uses this.
  417 # I guess this is PHONY so it always updates?
  418 ChangeLog:
  419 	  ./$(auctexlog) -o $(CHANGELOG) -n $(CHANGELOG_HISTORY_INDEX_MAX)
  420 
  421 # Regular expression that matches the newest commit covered by a ChangeLog.
  422 new_commit_regexp = ^commit [0123456789abcdef]* (inclusive)
  423 
  424 # Copy newer commit messages to the start of the ChangeLog history file,
  425 # and consider them to be older.
  426 change-history-nocommit: #preferred-branch-is-current unchanged-history-files
  427 	-rm -f ChangeLog.tmp
  428 	$(MAKE) ChangeLog CHANGELOG=ChangeLog.tmp
  429 	sed '/^This file records repository revisions/,$$d' \
  430 	  ChangeLog.tmp > $(CHANGELOG_N).tmp
  431 	new_commit_line=`grep --text '$(new_commit_regexp)' ChangeLog.tmp` && \
  432 	sed 's/$(new_commit_regexp).*/'"$$new_commit_line/" \
  433 	  $(CHANGELOG_N) >>$(CHANGELOG_N).tmp
  434 	rm ChangeLog.tmp
  435 	mv $(CHANGELOG_N).tmp $(CHANGELOG_N)
  436 
  437 change-history: change-history-nocommit
  438 	$(MAKE) $@-commit
  439 
  440 # If 'make change-history' fails because the newest ChangeLog history
  441 # file contains invalid text, fix the file by hand and then run
  442 # 'make change-history-commit'.
  443 change-history-commit:
  444 	git commit -m'; make $@' $(CHANGELOG_N) $(auctexlog)
  445 
  446 # ----------------------------------------------------------------------
  447 # The targets below are concerned with the release process and
  448 # intended to be used only by the maintainers.
  449 
  450 # Steps for making a release:
  451 #
  452 # 0) check
  453 #    Run tests using ERT tool.  Not necessary but strongly suggested before a
  454 #    release.
  455 #
  456 # 1) change-history
  457 #    Update the ChangeLog file.
  458 #
  459 # 2) release-commit TAG=<tag> COMMITTER=<committer>
  460 #    Tag the release.
  461 #    Pass `COMMITTER=<committer>' argument only if it is different from
  462 #    your git name and email.  `<committer>' should be in the form
  463 #        "John Doe  <john.doe@example.com>"
  464 #
  465 # 3) dist TAG=<tag>
  466 #    Create the tar ball and other release files and put them into $FTPDIR.
  467 #
  468 # 4) windows-package WEMACSVER=<emacs-version> TAG=<tag>
  469 #    Create the precompiled AUCTeX package for Windows.
  470 #    This requires a compiled Emacs of the same version at location $WEMACS.
  471 #    NOTA BENE: you may need to use bash shell for this recipe to work.
  472 #
  473 # 5) release-sign TAG=<tag>
  474 #    Sign the tar ball and create directive files for upload.  NOTA BENE: you
  475 #    may need to use bash shell for this recipe to work.
  476 #
  477 # 6) release-upload
  478 #    Upload files to GNU FTP server.
  479 #
  480 # 7) www-doc TAG=<tag>
  481 #    Create documentation for AUCTeX home page.
  482 #
  483 # 8) preview-ball TAG=<tag>
  484 #    Create preview package.  (Not for GNU FTP server but for CTAN.)
  485 
  486 dist: check-tag tar-ball
  487 
  488 snapshot: dist
  489 
  490 check-tag:
  491 	@if [ "X$(TAG)" = "X" ]; then echo "*** Error: No TAG ***"; exit 1; fi
  492 
  493 check:
  494 	cd tests && $(MAKE) check
  495 
  496 release-commit: check-tag
  497 	@echo "Tagging release $(TAG) in Git ..."
  498 	sleep 5
  499 	mv $(CHANGELOG_N) ChangeLog.old
  500 	mv ChangeLog-preview ChangeLog-preview.old
  501 # Make sure the release ChangeLog entry is encoded with UTF-8.
  502 # This requires the `iconv' program.
  503 	echo `date "+%Y-%m-%d "`" ${COMMITTER}" | iconv -t UTF-8 - > $(CHANGELOG_N)
  504 	echo >> $(CHANGELOG_N)
  505 	echo "	* Version" $(TAG) released. >> $(CHANGELOG_N)
  506 	echo >> $(CHANGELOG_N)
  507 	cp $(CHANGELOG_N) ChangeLog-preview
  508 	cat ChangeLog.old >> $(CHANGELOG_N)
  509 	cat ChangeLog-preview.old >> ChangeLog-preview
  510 	git commit -m '; Release_$(TAG)' -- $(CHANGELOG_N) ChangeLog-preview
  511 	git tag release_`echo $(TAG) | sed -e 's/[.]/_/g'`
  512 	@echo
  513 	@echo "Congratulations!  Release $(TAG) of AUCTeX is ready."
  514 	@echo "Please, remember to run"
  515 	@echo "    git push --tags origin master"
  516 	@echo "to propagate release commit and tag to the remote repository."
  517 
  518 tar-ball: doc/Makefile
  519 	test ! -d auctex-$(TAG) || rm -r auctex-$(TAG)
  520 	mkdir auctex-$(TAG)
  521 # Use TAG_EXPORT if set (for snapshots)
  522 	git archive $${TAG_EXPORT:=`echo release_$(TAG) | sed 's/[.]/_/g'`} | tar -xC auctex-$(TAG)
  523 	cd auctex-$(TAG) && AUCTEXVERSION=$(TAG) AUCTEXDATE=$(AUCTEXDATE) ./autogen.sh && rm -rf $(EXCLUDEDFILES)
  524 	chmod -R go-w+rX auctex-$(TAG)
  525 	rm -rf $(FTPDIR)
  526 	mkdir -p $(FTPDIR)
  527 	tar -cf - --owner=root --group=root auctex-$(TAG) | gzip --best > $(FTPDIR)/auctex-$(TAG).tar.gz
  528 	-zip -r $(FTPDIR)/auctex-$(TAG).zip auctex-$(TAG)
  529 	$(CP) auctex-$(TAG)/CHANGES $(FTPDIR)/CHANGES
  530 	$(CP) auctex-$(TAG)/RELEASE $(FTPDIR)/RELEASE-$(TAG)
  531 # The following files aren't produced in auctex-$(TAG) since they
  532 # are not in the tarball and should not become part of the patch target.
  533 	$(CP) auctex-$(TAG)/doc/version.texi doc/version.texi
  534 	cd doc && $(MAKE) extradist
  535 	rm -f doc/version.texi
  536 	$(CP) doc/auctex.ps doc/auctex.pdf doc/tex-ref.ps doc/tex-ref.pdf $(FTPDIR)
  537 	$(CP) $(CHANGELOG_N) $(FTPDIR)
  538 
  539 rpm-packages:
  540 	rpmbuild -ta $(RPM_SIGN) $(FTPDIR)/auctex-$(TAG).tar.gz
  541 	$(CP) $(RPMROOT)/{RPMS/noarch/{auctex-emacs,preview-tetex},SRPMS/auctex}-$(TAG)[.-]* $(FTPDIR)
  542 	@echo "If you need to prepare RPM on some other system, you need to add"
  543 	@echo "them in $(FTPDIR) before 'make release-sign'."
  544 	sleep 2
  545 
  546 patch:
  547 	diff -u auctex-$(OLD) auctex-$(TAG) | gzip --best \
  548 		>$(FTPDIR)/auctex-$(OLD)-to-$(TAG).patch.gz
  549 
  550 # Pre-compiled AUCTeX package for Emacs on Windows
  551 WBUILDDIR=$(PWD)/windows-package
  552 WEMACS=/usr/src/emacs-$(WEMACSVER)/src/emacs
  553 WPACKAGE=auctex-$(TAG)-e$(WEMACSVER)-msw.zip
  554 # Starting from Emacs 24.4, the name of the Windows package and the tree
  555 # structure of the package have been changed.  The following variables cater for
  556 # these differences.
  557 ifeq ($(shell echo "$(WEMACSVER)" | grep '\(2[2-3].[1-4]\|24.[1-3]\)' -),$(WEMACSVER))
  558 	WEMACSDATAROOTDIR=""
  559 	WEMACSEXTRACTDIR=""
  560 	WEMACSPACKAGE="emacs-$(WEMACSVER)-bin-i386.zip"
  561 	WEMACSSITELISP="site-lisp"
  562 else
  563 	WEMACSDATAROOTDIR="share/"
  564 	WEMACSEXTRACTDIR="emacs-$(WEMACSVER)"
  565 # And just to add more complexity, the package name changed again with Emacs
  566 # 24.5.  Actually, we don't really need to keep track of all these changes as we
  567 # should support only the latest Emacs version, but unless something else
  568 # changes again again in the near future we can keep them (and it's useful to
  569 # reproduce old AUCTeX packages!).
  570 	ifeq (24.4,$(WEMACSVER))
  571 		WEMACSPACKAGE="emacs-$(WEMACSVER)-bin-i686-pc-mingw32.zip"
  572 	else
  573 		WEMACSPACKAGE="emacs-$(WEMACSVER)-bin-i686-mingw32.zip"
  574 	endif
  575 	WEMACSSITELISP="$(WEMACSDATAROOTDIR)/emacs/site-lisp"
  576 endif
  577 WPACKAGEFILES=$(WEMACSSITELISP)/auctex $(WEMACSSITELISP)/site-start.d \
  578 	$(WEMACSSITELISP)/site-start.el $(WEMACSSITELISP)/tex-site.el \
  579 	var/auctex $(WEMACSDOC) $(WEMACSDATAROOTDIR)doc $(WEMACSDATAROOTDIR)info/dir \
  580 	$(WEMACSDATAROOTDIR)info/auctex.info* $(WEMACSDATAROOTDIR)info/preview-latex.info*
  581 windows-package: check-tag
  582 	@if [ "X$(WEMACSVER)" = "X" ]; then \
  583 	  echo "*** Error: No Emacs version (WEMACSVER) ***"; \
  584 	  exit 1; \
  585 	fi
  586 # Make sure the prerequisites are available
  587 	test -d $(WBUILDDIR) || mkdir $(WBUILDDIR)
  588 	test -f $(WBUILDDIR)/$(WEMACSPACKAGE) \
  589 	|| { cd $(WBUILDDIR) \
  590 	&& wget https://ftp.gnu.org/gnu/emacs/windows/$(WEMACSPACKAGE); }
  591 	test -f $(WBUILDDIR)/auctex-$(TAG).zip \
  592 	|| { test -f $(FTPDIR)/auctex-$(TAG).zip \
  593 	  && $(CP) $(FTPDIR)/auctex-$(TAG).zip $(WBUILDDIR); } \
  594 	|| { cd $(WBUILDDIR) \
  595 	  && wget https://ftp.gnu.org/gnu/auctex/auctex-$(TAG).zip; }
  596 # Reset to clean state
  597 	cd $(WBUILDDIR) \
  598 	&& rm -rf emacs-$(WEMACSVER) \
  599 	&& rm -rf auctex-$(TAG) \
  600 	&& unzip -d "$(WEMACSEXTRACTDIR)" $(WEMACSPACKAGE) \
  601 	&& unzip auctex-$(TAG).zip
  602 	rm -f $(WPACKAGE)
  603 # Create site-start.el and site-start.d
  604 	cd $(WBUILDDIR)/emacs-$(WEMACSVER)/$(WEMACSSITELISP) \
  605 	&& echo -e ";; Load files in \`site-start.d' directory.\
  606 \n(dolist (file (directory-files\
  607 \n	       (concat (file-name-directory load-file-name) \"site-start.d\")\
  608 \n	       t \"\\\\\\\\.el\\\\\\\\'\"))\
  609 \n  (load file nil t t))" > site-start.el \
  610 	&& mkdir site-start.d
  611 # Build and install AUCTeX
  612 	cd $(WBUILDDIR)/auctex-$(TAG) \
  613 	&& ./configure --prefix=$(WBUILDDIR)/emacs-$(WEMACSVER) \
  614 	  --without-texmf-dir --with-emacs=$(WEMACS) \
  615 	  --with-lispdir=$(WBUILDDIR)/emacs-$(WEMACSVER)/$(WEMACSSITELISP) \
  616 	  --datarootdir=$(WBUILDDIR)/emacs-$(WEMACSVER)/$(WEMACSDATAROOTDIR) \
  617 	&& $(MAKE) \
  618 	&& sed -i -e 's/"\/[^\n]\+/(expand-file-name "..\/var\/auctex" (file-name-directory load-file-name))/' tex-site.el \
  619 	&& $(MAKE) install
  620 # Create the package
  621 	test -d $(FTPDIR) || mkdir -p $(FTPDIR)
  622 	rm -f $(FTPDIR)/$(WPACKAGE)
  623 	cd $(WBUILDDIR)/emacs-$(WEMACSVER) \
  624 	&& zip -r $(FTPDIR)/$(WPACKAGE) $(WPACKAGEFILES)
  625 
  626 release-sign: check-tag
  627 	rm -f $(FTPDIR)/*.{directive,asc,sig}
  628 	if [ "x$$GPG_AGENT_INFO" = "x" ]; then \
  629 	  read -sp "Enter pass phrase: " phrase ; \
  630 	  gpg_opt="--passphrase-fd 0"; \
  631 	else \
  632 	  gpg_opt=""; phrase=""; \
  633 	fi; \
  634 	for i in $(FTPDIR)/*; do \
  635 	   echo "$$phrase" | gpg --detach-sign $$gpg_opt $$i ; \
  636 	   echo "version: 1.1" >$$i.directive; \
  637 	   case $$i in *-$(TAG)*) echo "directory: auctex" >>$$i.directive;; \
  638 	      *) echo "directory: auctex/$(TAG)-extra" >>$$i.directive ;; \
  639 	   esac ; \
  640 	   echo "filename: "`basename $$i` >>$$i.directive ; \
  641 	   echo "$$phrase" | gpg $$gpg_opt --clearsign $$i.directive ; \
  642 	done
  643 	rm $(FTPDIR)/*.directive
  644 
  645 release-upload:
  646 	@echo "Uploading everything in FTPDIR to GNU FTP server ..."
  647 	@sleep 5
  648 	ncftpput ftp-upload.gnu.org /incoming/ftp $(FTPDIR)/*
  649 
  650 # AUCTeX and preview-latex manuals for the home page
  651 www-doc: check-tag
  652 	rm -rf $(WWWDIR)
  653 	mkdir -p $(WWWDIR)/manual
  654 	$(CP) auctex-$(TAG)/doc/*.texi $(WWWDIR)/manual
  655 	cd $(WWWDIR)/manual \
  656 	&& wget -O gendocs.sh 'https://cvs.savannah.gnu.org/viewvc/%2acheckout%2a/texinfo/texinfo/util/gendocs.sh' \
  657 	&& wget -O gendocs.sh.patch 'https://git.savannah.gnu.org/gitweb/?p=auctex.git;a=blob_plain;f=gendocs.sh.patch;hb=gendocspatch' \
  658 	&& patch <gendocs.sh.patch \
  659 	&& chmod u+x gendocs.sh \
  660 	&& wget -O gendocs_template 'https://cvs.savannah.gnu.org/viewvc/%2acheckout%2a/texinfo/texinfo/util/gendocs_template' \
  661 	&& sed -i -e 's/html_node\/index\.html/%%PACKAGE%%\/index.html/' gendocs_template \
  662 	&& mkdir .texinfo \
  663 	&& echo -e "emacs split https://www.gnu.org/software/emacs/manual/html_node/emacs/\nemacs mono https://www.gnu.org/software/emacs/manual/html_mono/emacs.html\nreftex split https://www.gnu.org/software/auctex/manual/reftex/\nreftex mono https://www.gnu.org/software/auctex/manual/reftex.html\n" > .texinfo/htmlxref.cnf \
  664 	&& ./gendocs.sh --email bug-auctex@gnu.org --texi2html \
  665 	  --html --use-nodes auctex "AUCTeX Manual" \
  666 	&& ./gendocs.sh --email bug-auctex@gnu.org --texi2html \
  667 	  --html --use-nodes preview-latex "preview-latex Manual"
  668 
  669 preview-ball: check-tag
  670 	test ! -d $(PREVIEW_BUILD_DIR) || rm -r $(PREVIEW_BUILD_DIR)
  671 	mkdir $(PREVIEW_BUILD_DIR)
  672 # Use TAG_EXPORT if set (for snapshots)
  673 	git archive $${TAG_EXPORT:=`echo release_$(TAG) | sed 's/[.]/_/g'`} \
  674 	  latex/ | tar -xC $(PREVIEW_BUILD_DIR) --strip-components=1
  675 	cd $(PREVIEW_BUILD_DIR) && $(MAKE) -f ../latex/Makefile preview.ins preview.pdf
  676 	chmod -R go-w+rX $(PREVIEW_BUILD_DIR)
  677 	test -d $(CTANDIR) || mkdir -p $(CTANDIR)
  678 # CTAN requires a top level directory "preview/" for the archive.
  679 	cd $(PREVIEW_BUILD_DIR) && mkdir -p preview && \
  680 	cp README preview.dtx preview.ins preview.pdf preview/ && \
  681 	tar -cf - --owner=root --group=root preview/ | gzip --best > $(CTANDIR)/preview-$(TAG).tar.gz