1 # Makefile for pcomplete lisp code
3 # Copyright (C) 1998-1999 John Wiegley <johnw@gnu.org>
5 # This file is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License as published by the
7 # Free Software Foundation; either version 2, or (at your option) any
10 # This file is distributed in the hope that it will be useful, but WITHOUT
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 # You should have received a copy of the GNU General Public License
16 # along with GNU Emacs; see the file COPYING. If not, write to
17 # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
20 datadir = $(prefix)/share
22 # the directory where you install third-party emacs packges
23 lispdir = $(datadir)/emacs/site-lisp
25 # the directory where you install the info doc
26 infodir = $(prefix)/info
27 docdir = $(prefix)/doc
38 ######################################################################
39 ### No changes below this line should be necessary ###
40 ######################################################################
44 # the directory where the .elc files will be installed
45 elcdir = $(lispdir)/$(PACKAGE)
48 MARGS = --no-init-file --no-site-file -l ./pcmpl-maint.el -batch
49 BEMACS = $(EMACS) $(MARGS)
50 ELC = $(BEMACS) -f batch-byte-compile
60 ELCFILES = $(ELFILES:.el=.elc)
62 TEXEXTS = *.cps *.fns *.kys *.vr *.tp *.pg *.log *.aux *.toc *.cp *.ky *.fn
65 .PHONY: elcfiles clean distclean default
66 .PHONY: install_elc install install_el
71 ######################################################################
73 default: pcmpl-auto.el elcfiles
75 elcfiles: Makefile $(ELCFILES)
77 install_elc: $(ELCFILES) pcmpl-auto.el _pkg.el
79 $(CP) $(ELCFILES) auto-autoloads.el pcmpl-auto.el _pkg.el $(elcdir)/
83 $(CP) $(ELFILES) $(eldir)/
85 install: install_elc install_el
88 $(RM) *~ core .\#* $(TEXEXTS)
95 $(RM) pcmpl-auto.el* auto-autoloads.el*
97 pcmpl-auto.el: $(ELFILES)
98 echo ";;; DO NOT MODIFY THIS FILE" > pcmpl-auto.el
99 echo "(if (featurep 'pcmpl-auto) (error \"Already loaded\"))" \
101 $(BEMACS) -f pcomplete-generate-autoloads ./pcmpl-auto.el .
102 echo "(provide 'pcmpl-auto)" >> pcmpl-auto.el
103 ln pcmpl-auto.el auto-autoloads.el
105 TAG = $(shell echo v$(VERSION) | tr '.' '_')
106 ftpdir=/home/johnw/public_html/Emacs/packages
109 cvs tag -F $(TAG) &&\
111 cvs export -r $(TAG) -d $(PACKAGE)-$(VERSION) $(PACKAGE) &&\
112 cd $(PACKAGE)-$(VERSION) &&\
113 make pcmpl-auto.el &&\
116 tar cvzf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION) &&\
117 zip -r $(PACKAGE)-$(VERSION).zip $(PACKAGE)-$(VERSION) &&\
118 rm -rf $(PACKAGE)-$(VERSION)
119 mv /tmp/$(PACKAGE)-$(VERSION).tar.gz $(ftpdir)/
120 mv /tmp/$(PACKAGE)-$(VERSION).zip $(ftpdir)/
121 ln -sf $(PACKAGE)-$(VERSION).tar.gz $(ftpdir)/$(PACKAGE).tar.gz
122 ln -sf $(PACKAGE)-$(VERSION).zip $(ftpdir)/$(PACKAGE).zip