| 1 | #### -*- Makefile -*- for the Emacs Manual and other documentation. |
| 2 | |
| 3 | # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. |
| 4 | |
| 5 | # This file is part of GNU Emacs. |
| 6 | |
| 7 | # GNU Emacs is free software; you can redistribute it and/or modify |
| 8 | # it under the terms of the GNU General Public License as published by |
| 9 | # the Free Software Foundation; either version 2, or (at your option) |
| 10 | # any later version. |
| 11 | |
| 12 | # GNU Emacs is distributed in the hope that it will be useful, |
| 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | # GNU General Public License for more details. |
| 16 | |
| 17 | # You should have received a copy of the GNU General Public License |
| 18 | # along with GNU Emacs; see the file COPYING. If not, write to |
| 19 | # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 20 | # Boston, MA 02110-1301, USA. |
| 21 | |
| 22 | # Where to find the source code. The source code for Emacs's C kernel is |
| 23 | # expected to be in $(srcdir)/src, and the source code for Emacs's |
| 24 | # utility programs is expected to be in $(srcdir)/lib-src. This is |
| 25 | # set by the configure script's `--srcdir' option. |
| 26 | srcdir=. |
| 27 | |
| 28 | infodir = $(srcdir)/../info |
| 29 | |
| 30 | # The makeinfo program is part of the Texinfo distribution. |
| 31 | MAKEINFO = makeinfo --force |
| 32 | MULTI_INSTALL_INFO = $(srcdir)\..\nt\multi-install-info.bat |
| 33 | INFO_TARGETS = $(infodir)/emacs $(infodir)/ccmode \ |
| 34 | $(infodir)/cl $(infodir)/dired-x $(infodir)/ediff \ |
| 35 | $(infodir)/forms $(infodir)/gnus $(infodir)/message \ |
| 36 | $(infodir)/sieve $(infodir)/pgg $(infodir)/emacs-mime \ |
| 37 | $(infodir)/info $(infodir)/mh-e $(infodir)/reftex \ |
| 38 | $(infodir)/sc $(infodir)/vip $(infodir)/viper \ |
| 39 | $(infodir)/widget $(infodir)/efaq $(infodir)/ada-mode \ |
| 40 | $(infodir)/autotype $(infodir)/calc $(infodir)/idlwave \ |
| 41 | $(infodir)/eudc $(infodir)/ebrowse $(infodir)/pcl-cvs \ |
| 42 | $(infodir)/woman $(infodir)/eshell $(infodir)/org \ |
| 43 | $(infodir)/url $(infodir)/speedbar $(infodir)/tramp \ |
| 44 | $(infodir)/ses $(infodir)/smtpmail $(infodir)/flymake \ |
| 45 | $(infodir)/newsticker $(infodir)/rcirc $(infodir)/erc |
| 46 | DVI_TARGETS = emacs.dvi calc.dvi cc-mode.dvi cl.dvi dired-x.dvi \ |
| 47 | ediff.dvi forms.dvi gnus.dvi message.dvi emacs-mime.dvi \ |
| 48 | gnus.dvi message.dvi sieve.dvi pgg.dvi mh-e.dvi \ |
| 49 | reftex.dvi sc.dvi vip.dvi viper.dvi widget.dvi faq.dvi \ |
| 50 | ada-mode.dvi autotype.dvi idlwave.dvi eudc.dvi ebrowse.dvi \ |
| 51 | pcl-cvs.dvi woman.dvi eshell.dvi org.dvi url.dvi \ |
| 52 | speedbar.dvi tramp.dvi ses.dvi smtpmail.dvi flymake.dvi \ |
| 53 | newsticker.dvi emacs-xtra.dvi rcirc.dvi erc.dvi |
| 54 | INFOSOURCES = info.texi |
| 55 | |
| 56 | # The following rule does not work with all versions of `make'. |
| 57 | .SUFFIXES: .texi .dvi |
| 58 | .texi.dvi: |
| 59 | texi2dvi $< |
| 60 | |
| 61 | TEXI2DVI = texi2dvi |
| 62 | ENVADD = $(srcdir)\..\nt\envadd.bat "TEXINPUTS=$(srcdir);$(TEXINPUTS)" \ |
| 63 | "MAKEINFO=$(MAKEINFO) -I$(srcdir)" /C |
| 64 | |
| 65 | EMACS_XTRA=\ |
| 66 | $(srcdir)/arevert-xtra.texi \ |
| 67 | $(srcdir)/cal-xtra.texi \ |
| 68 | $(srcdir)/dired-xtra.texi \ |
| 69 | $(srcdir)/picture-xtra.texi \ |
| 70 | $(srcdir)/emerge-xtra.texi \ |
| 71 | $(srcdir)/vc-xtra.texi \ |
| 72 | $(srcdir)/vc1-xtra.texi \ |
| 73 | $(srcdir)/vc2-xtra.texi \ |
| 74 | $(srcdir)/fortran-xtra.texi \ |
| 75 | $(srcdir)/msdog-xtra.texi |
| 76 | |
| 77 | EMACSSOURCES= \ |
| 78 | $(srcdir)/emacs.texi \ |
| 79 | $(srcdir)/doclicense.texi \ |
| 80 | $(srcdir)/screen.texi \ |
| 81 | $(srcdir)/commands.texi \ |
| 82 | $(srcdir)/entering.texi \ |
| 83 | $(srcdir)/basic.texi \ |
| 84 | $(srcdir)/mini.texi \ |
| 85 | $(srcdir)/m-x.texi \ |
| 86 | $(srcdir)/help.texi \ |
| 87 | $(srcdir)/mark.texi \ |
| 88 | $(srcdir)/killing.texi \ |
| 89 | $(srcdir)/regs.texi \ |
| 90 | $(srcdir)/display.texi \ |
| 91 | $(srcdir)/search.texi \ |
| 92 | $(srcdir)/fixit.texi \ |
| 93 | $(srcdir)/files.texi \ |
| 94 | $(srcdir)/buffers.texi \ |
| 95 | $(srcdir)/windows.texi \ |
| 96 | $(srcdir)/frames.texi \ |
| 97 | $(srcdir)/mule.texi \ |
| 98 | $(srcdir)/major.texi \ |
| 99 | $(srcdir)/indent.texi \ |
| 100 | $(srcdir)/text.texi \ |
| 101 | $(srcdir)/programs.texi \ |
| 102 | $(srcdir)/building.texi \ |
| 103 | $(srcdir)/maintaining.texi \ |
| 104 | $(srcdir)/abbrevs.texi \ |
| 105 | $(srcdir)/sending.texi \ |
| 106 | $(srcdir)/rmail.texi \ |
| 107 | $(srcdir)/dired.texi \ |
| 108 | $(srcdir)/calendar.texi \ |
| 109 | $(srcdir)/misc.texi \ |
| 110 | $(srcdir)/custom.texi \ |
| 111 | $(srcdir)/trouble.texi \ |
| 112 | $(srcdir)/cmdargs.texi \ |
| 113 | $(srcdir)/xresources.texi \ |
| 114 | $(srcdir)/anti.texi \ |
| 115 | $(srcdir)/macos.texi \ |
| 116 | $(srcdir)/msdog.texi \ |
| 117 | $(srcdir)/gnu.texi \ |
| 118 | $(srcdir)/glossary.texi \ |
| 119 | $(srcdir)/ack.texi \ |
| 120 | $(srcdir)/kmacro.texi \ |
| 121 | $(EMACS_XTRA) |
| 122 | |
| 123 | info: $(INFO_TARGETS) |
| 124 | |
| 125 | dvi: $(DVI_TARGETS) |
| 126 | |
| 127 | # Note that all the Info targets build the Info files |
| 128 | # in srcdir. There is no provision for Info files |
| 129 | # to exist in the build directory. |
| 130 | # In a distribution of Emacs, the Info files should be up to date. |
| 131 | |
| 132 | # The following target uses an explicit -o switch to work around |
| 133 | # the @setfilename directive in info.texi, which is required for |
| 134 | # the Texinfo distribution. |
| 135 | # Some Windows ports of makeinfo seem to require -o to come before the |
| 136 | # texi filename, contrary to GNU standards. |
| 137 | |
| 138 | $(infodir)/dir: |
| 139 | $(MULTI_INSTALL_INFO) --info-dir=$(infodir) $(INFO_TARGETS) |
| 140 | |
| 141 | $(infodir)/info: $(INFOSOURCES) |
| 142 | $(MAKEINFO) --no-split -o $@ info.texi |
| 143 | |
| 144 | info.dvi: $(INFOSOURCES) |
| 145 | $(ENVADD) $(TEXI2DVI) $(srcdir)/info.texi |
| 146 | |
| 147 | $(infodir)/emacs: $(EMACSSOURCES) |
| 148 | $(MAKEINFO) emacs.texi |
| 149 | |
| 150 | emacs.dvi: $(EMACSSOURCES) $(srcdir)/xresmini.texi |
| 151 | $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs.texi |
| 152 | |
| 153 | # This target is here so you could easily get the list of the *.texi |
| 154 | # files which belong to the Emacs manual (as opposed to the separate |
| 155 | # manuals for CL, CC Mode, Ebrowse, etc.). With this target, you can |
| 156 | # say things like "grep foo `make emacsman`". |
| 157 | emacsman: |
| 158 | @echo $(EMACSSOURCES) |
| 159 | |
| 160 | $(infodir)/ccmode: cc-mode.texi |
| 161 | $(MAKEINFO) cc-mode.texi |
| 162 | cc-mode.dvi: cc-mode.texi |
| 163 | $(ENVADD) $(TEXI2DVI) $(srcdir)/cc-mode.texi |
| 164 | |
| 165 | $(infodir)/ada-mode: ada-mode.texi |
| 166 | $(MAKEINFO) ada-mode.texi |
| 167 | ada-mode.dvi: ada-mode.texi |
| 168 | $(ENVADD) $(TEXI2DVI) $(srcdir)/ada-mode.texi |
| 169 | |
| 170 | $(infodir)/pcl-cvs: pcl-cvs.texi |
| 171 | $(MAKEINFO) pcl-cvs.texi |
| 172 | pcl-cvs.dvi: pcl-cvs.texi |
| 173 | $(ENVADD) $(TEXI2DVI) $(srcdir)/pcl-cvs.texi |
| 174 | |
| 175 | $(infodir)/eshell: eshell.texi |
| 176 | $(MAKEINFO) eshell.texi |
| 177 | eshell.dvi: eshell.texi |
| 178 | $(ENVADD) $(TEXI2DVI) $(srcdir)/eshell.texi |
| 179 | |
| 180 | $(infodir)/cl: cl.texi |
| 181 | $(MAKEINFO) cl.texi |
| 182 | cl.dvi: cl.texi |
| 183 | $(ENVADD) $(TEXI2DVI) $(srcdir)/cl.texi |
| 184 | |
| 185 | $(infodir)/dired-x: dired-x.texi |
| 186 | $(MAKEINFO) dired-x.texi |
| 187 | dired-x.dvi: dired-x.texi |
| 188 | $(ENVADD) $(TEXI2DVI) $(srcdir)/dired-x.texi |
| 189 | |
| 190 | $(infodir)/ediff: ediff.texi |
| 191 | $(MAKEINFO) ediff.texi |
| 192 | ediff.dvi: ediff.texi |
| 193 | $(ENVADD) $(TEXI2DVI) $(srcdir)/ediff.texi |
| 194 | |
| 195 | $(infodir)/flymake: flymake.texi |
| 196 | $(MAKEINFO) flymake.texi |
| 197 | flymake.dvi: flymake.texi |
| 198 | $(ENVADD) $(TEXI2DVI) $(srcdir)/flymake.texi |
| 199 | |
| 200 | $(infodir)/forms: forms.texi |
| 201 | $(MAKEINFO) forms.texi |
| 202 | forms.dvi: forms.texi |
| 203 | $(ENVADD) $(TEXI2DVI) $(srcdir)/forms.texi |
| 204 | |
| 205 | # gnus/message/emacs-mime/sieve/pgg are part of Gnus: |
| 206 | $(infodir)/gnus: gnus.texi |
| 207 | $(MAKEINFO) gnus.texi |
| 208 | gnus.dvi: gnus.texi |
| 209 | sed -e "/@iflatex/,/@end iflatex/d" $(srcdir)/gnus.texi > gnustmp.texi |
| 210 | $(ENVADD) $(TEXI2DVI) gnustmp.texi |
| 211 | cp gnustmp.dvi $*.dvi |
| 212 | rm gnustmp.* |
| 213 | # |
| 214 | $(infodir)/message: message.texi |
| 215 | $(MAKEINFO) message.texi |
| 216 | message.dvi: message.texi |
| 217 | $(ENVADD) $(TEXI2DVI) $(srcdir)/message.texi |
| 218 | # |
| 219 | $(infodir)/emacs-mime: emacs-mime.texi |
| 220 | $(MAKEINFO) emacs-mime.texi |
| 221 | emacs-mime.dvi: emacs-mime.texi |
| 222 | $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs-mime.texi |
| 223 | # |
| 224 | $(infodir)/sieve: sieve.texi |
| 225 | $(MAKEINFO) sieve.texi |
| 226 | sieve.dvi: sieve.texi |
| 227 | $(ENVADD) $(TEXI2DVI) $(srcdir)/sieve.texi |
| 228 | # |
| 229 | $(infodir)/pgg: pgg.texi |
| 230 | $(MAKEINFO) pgg.texi |
| 231 | pgg.dvi: pgg.texi |
| 232 | $(ENVADD) $(TEXI2DVI) $(srcdir)/pgg.texi |
| 233 | |
| 234 | $(infodir)/mh-e: mh-e.texi |
| 235 | $(MAKEINFO) mh-e.texi |
| 236 | mh-e.dvi: mh-e.texi |
| 237 | $(ENVADD) $(TEXI2DVI) $(srcdir)/mh-e.texi |
| 238 | |
| 239 | $(infodir)/reftex: reftex.texi |
| 240 | $(MAKEINFO) reftex.texi |
| 241 | reftex.dvi: reftex.texi |
| 242 | $(ENVADD) $(TEXI2DVI) $(srcdir)/reftex.texi |
| 243 | |
| 244 | $(infodir)/sc: sc.texi |
| 245 | $(MAKEINFO) sc.texi |
| 246 | sc.dvi: sc.texi |
| 247 | $(ENVADD) $(TEXI2DVI) $(srcdir)/sc.texi |
| 248 | |
| 249 | $(infodir)/vip: vip.texi |
| 250 | $(MAKEINFO) vip.texi |
| 251 | vip.dvi: vip.texi |
| 252 | $(ENVADD) $(TEXI2DVI) $(srcdir)/vip.texi |
| 253 | |
| 254 | $(infodir)/viper: viper.texi |
| 255 | $(MAKEINFO) viper.texi |
| 256 | viper.dvi: viper.texi |
| 257 | $(ENVADD) $(TEXI2DVI) $(srcdir)/viper.texi |
| 258 | |
| 259 | $(infodir)/widget: widget.texi |
| 260 | $(MAKEINFO) widget.texi |
| 261 | widget.dvi: widget.texi |
| 262 | $(ENVADD) $(TEXI2DVI) $(srcdir)/widget.texi |
| 263 | |
| 264 | $(infodir)/efaq: faq.texi |
| 265 | $(MAKEINFO) faq.texi |
| 266 | faq.dvi: faq.texi |
| 267 | $(ENVADD) $(TEXI2DVI) $(srcdir)/faq.texi |
| 268 | |
| 269 | ../etc/GNU: gnu1.texi gnu.texi |
| 270 | $(MAKEINFO) --no-headers -o ../etc/GNU gnu1.texi |
| 271 | |
| 272 | $(infodir)/autotype: autotype.texi |
| 273 | $(MAKEINFO) autotype.texi |
| 274 | autotype.dvi: autotype.texi |
| 275 | $(ENVADD) $(TEXI2DVI) $(srcdir)/autotype.texi |
| 276 | |
| 277 | $(infodir)/calc: calc.texi |
| 278 | $(MAKEINFO) calc.texi |
| 279 | |
| 280 | calc.dvi: calc.texi |
| 281 | $(ENVADD) $(TEXI2DVI) $(srcdir)/calc.texi |
| 282 | |
| 283 | # This is produced with --no-split to avoid making files whose |
| 284 | # names clash on DOS 8+3 filesystems |
| 285 | $(infodir)/idlwave: idlwave.texi |
| 286 | $(MAKEINFO) --no-split idlwave.texi |
| 287 | idlwave.dvi: idlwave.texi |
| 288 | $(ENVADD) $(TEXI2DVI) $(srcdir)/idlwave.texi |
| 289 | |
| 290 | $(infodir)/eudc: eudc.texi |
| 291 | $(MAKEINFO) eudc.texi |
| 292 | eudc.dvi: eudc.texi |
| 293 | $(ENVADD) $(TEXI2DVI) $(srcdir)/eudc.texi |
| 294 | |
| 295 | $(infodir)/ebrowse: ebrowse.texi |
| 296 | $(MAKEINFO) ebrowse.texi |
| 297 | ebrowse.dvi: ebrowse.texi |
| 298 | $(ENVADD) $(TEXI2DVI) $(srcdir)/ebrowse.texi |
| 299 | |
| 300 | $(infodir)/woman: woman.texi |
| 301 | $(MAKEINFO) woman.texi |
| 302 | woman.dvi: woman.texi |
| 303 | $(ENVADD) $(TEXI2DVI) $(srcdir)/woman.texi |
| 304 | |
| 305 | $(infodir)/speedbar: speedbar.texi |
| 306 | $(MAKEINFO) speedbar.texi |
| 307 | speedbar.dvi: speedbar.texi |
| 308 | $(ENVADD) $(TEXI2DVI) $(srcdir)/speedbar.texi |
| 309 | |
| 310 | $(infodir)/tramp: tramp.texi |
| 311 | $(MAKEINFO) tramp.texi |
| 312 | tramp.dvi: tramp.texi |
| 313 | $(ENVADD) $(TEXI2DVI) $(srcdir)/tramp.texi |
| 314 | |
| 315 | $(infodir)/ses: ses.texi |
| 316 | $(MAKEINFO) ses.texi |
| 317 | ses.dvi: ses.texi |
| 318 | $(ENVADD) $(TEXI2DVI) $(srcdir)/ses.texi |
| 319 | |
| 320 | $(infodir)/smtpmail: smtpmail.texi |
| 321 | $(MAKEINFO) smtpmail.texi |
| 322 | smtpmail.dvi: smtpmail.texi |
| 323 | $(ENVADD) $(TEXI2DVI) $(srcdir)/smtpmail.texi |
| 324 | |
| 325 | emacs-xtra.dvi: emacs-xtra.texi $(EMACS_XTRA) |
| 326 | $(ENVADD) $(TEXI2DVI) $(srcdir)/emacs-xtra.texi |
| 327 | |
| 328 | $(infodir)/org: org.texi |
| 329 | $(MAKEINFO) org.texi |
| 330 | org.dvi: org.texi |
| 331 | $(ENVADD) $(TEXI2DVI) $(srcdir)/org.texi |
| 332 | |
| 333 | $(infodir)/url: url.texi |
| 334 | $(MAKEINFO) url.texi |
| 335 | url.dvi: url.texi |
| 336 | $(ENVADD) $(TEXI2DVI) $(srcdir)/url.texi |
| 337 | |
| 338 | $(infodir)/newsticker: newsticker.texi |
| 339 | $(MAKEINFO) newsticker.texi |
| 340 | newsticker.dvi: newsticker.texi |
| 341 | $(ENVADD) $(TEXI2DVI) $(srcdir)/newsticker.texi |
| 342 | |
| 343 | $(infodir)/rcirc: rcirc.texi |
| 344 | $(MAKEINFO) rcirc.texi |
| 345 | rcirc.dvi: rcirc.texi |
| 346 | $(ENVADD) $(TEXI2DVI) $(srcdir)/rcirc.texi |
| 347 | |
| 348 | $(infodir)/erc: erc.texi |
| 349 | $(MAKEINFO) erc.texi |
| 350 | erc.dvi: erc.texi |
| 351 | $(ENVADD) $(TEXI2DVI) $(srcdir)/erc.texi |
| 352 | |
| 353 | mostlyclean: |
| 354 | - $(DEL) *.log *.cp *.fn *.ky *.pg *.vr core *.tp *.core gnustmp.* |
| 355 | |
| 356 | clean: mostlyclean |
| 357 | - $(DEL) *.dvi |
| 358 | - $(DEL) $(infodir)/emacs* $(infodir)/ccmode* \ |
| 359 | $(infodir)/cl* $(infodir)/dired-x* \ |
| 360 | $(infodir)/ediff* $(infodir)/forms* \ |
| 361 | $(infodir)/gnus* $(infodir)/info* \ |
| 362 | $(infodir)/message* $(infodir)/mh-e* \ |
| 363 | $(infodir)/reftex* $(infodir)/sc* \ |
| 364 | $(infodir)/vip* $(infodir)/widget* \ |
| 365 | $(infodir)/efaq* $(infodir)/ada-mode* \ |
| 366 | $(infodir)/autotype* $(infodir)/calc* \ |
| 367 | $(infodir)/idlwave* $(infodir)/eudc* \ |
| 368 | $(infodir)/ebrowse* $(infodir)/pcl-cvs* \ |
| 369 | $(infodir)/woman* $(infodir)/eshell* \ |
| 370 | $(infodir)/speedbar* $(infodir)/tramp* \ |
| 371 | $(infodir)/ses* $(infodir)/smtpmail* \ |
| 372 | $(infodir)/url* $(infodir)/org* \ |
| 373 | $(infodir)/flymake* $(infodir)/newsticker* \ |
| 374 | $(infodir)/sieve* $(infodir)/pgg* \ |
| 375 | $(infodir)/erc* $(infodir)/rcirc* |
| 376 | |
| 377 | distclean: clean |
| 378 | |
| 379 | maintainer-clean: distclean |
| 380 | - $(DEL) *.aux *.cps *.fns *.kys *.pgs *.vrs *.toc |
| 381 | # Don't delete these, because they are outside the current directory. |
| 382 | # for file in $(INFO_TARGETS); do rm -f $${file}*; done |
| 383 | |
| 384 | |
| 385 | # Formerly this directory had texindex.c and getopt.c in it |
| 386 | # and this makefile built them to make texindex. |
| 387 | # That caused trouble because this is run entirely in the source directory. |
| 388 | # Since we expect to get texi2dvi from elsewhere, |
| 389 | # it is ok to expect texindex from elsewhere also. |