Remove non-free old and crusty clearcase pkg
[packages] / xemacs-packages / x-symbol / Makefile.upstream
1 ### Makefile --- create binary package of X-Symbol
2
3 ## Copyright (C) 1998-2003 Free Software Foundation, Inc.
4 ##
5 ## Author: Christoph Wedler <wedler@users.sourceforge.net>
6 ## Version: 4.5.X
7 ## Keywords: fonts, WYSIWYG, LaTeX, HTML, wp, math
8 ## X-URL: http://x-symbol.sourceforge.net/
9
10 # This software is free software; you can redistribute it and/or modify it
11 # under the terms of the GNU General Public License as published by the
12 # Free Software Foundation; either version 2, or (at your option) any
13 # later version.
14
15 # This software is distributed in the hope that it will be useful, but WITHOUT
16 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
18 # for more details.
19
20 # You should have received a copy of the GNU General Public License
21 # along with This software; see the file COPYING.  If not, write to
22 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 # Boston, MA 02111-1307, USA.
24
25 ### Commentary:
26
27 ## This Makefile is for X-Symbol developers (esp. the author) using XEmacs,
28 ## only!  Use Makefile.emacs for Emacs.  This file `include's a modified
29 ## version of the generic XEmacs Package Makefile "XEmacs.rules".  For details,
30 ## see <info:(xemacs)Building Packages>.
31
32 ## The following targets might be interesting:
33 ##  - clean: delete the generated files
34 ##  - binball: build /tmp/staging/x-symbol-X.YY-pkg.tar.gz
35 ##  - srckit: build /tmp/staging/x-symbol-X.YY-src.tar.gz
36 ##  - info: create the info file (to check)
37 ##  - elc: create the elc files (to check)
38 ##  - www: create tar.gz for web pages incl manual (personal use only)
39 ##  - release: create all tar.gz files for new version (personal use only)
40
41 ### Code:
42
43 ## VERSION is a float!
44 VERSION = 4.51
45 AUTHOR_VERSION = 4.5.1
46 MAINTAINER = Christoph Wedler <wedler@users.sourceforge.net>
47 PACKAGE = x-symbol
48 PKG_TYPE = regular
49 REQUIRES = xemacs-base
50 CATEGORY = wp
51 RELEASEDIR = $(HOME)/public_html/x-symbol
52 PACKAGEDIR = $(HOME)/.xemacs/xemacs-packages
53
54 ## nil if you want to use XEmacs-21' feature of uninterned symbols in
55 ## macros
56 XMAS20 = nil
57
58 ## other program settings after "include ./XEmacs.rules" below
59 ZIP = gzip -v9
60 MAKEINFO_FLAGS = -I ./man --no-split
61
62 ###===========================================================================
63 ## Shouldn't be interesting from now on... (except "include ./XEmacs.rules")
64
65 ELCS = lisp/x-symbol-hooks.elc lisp/x-symbol-macs.elc \
66         lisp/x-symbol-vars.elc lisp/x-symbol.elc \
67         lisp/x-symbol-image.elc lisp/x-symbol-sgml.elc \
68         lisp/x-symbol-tex.elc lisp/x-symbol-bib.elc \
69         lisp/x-symbol-texi.elc
70 ## now Emacs version dependend files (no autoloads, no custom)
71 MULE_ELCS = lisp/x-symbol-mule.elc lisp/x-symbol-nomule.elc \
72         lisp/x-symbol-xmacs.elc
73
74 DATA_DEST = $(PACKAGE)
75 DATA_FILES = Makefile.emacs \
76         etc/colormap138.xpm etc/RIP.xbm etc/drawing.xbm etc/escherknot.xbm \
77         etc/hourglass.xbm etc/recycle.xbm etc/termlock.xbm
78
79 DATA_1_DEST = $(PACKAGE)/fonts
80 DATA_1_FILES = fonts/Makefile fonts/makesub \
81         fonts/nilxs.bdf \
82         fonts/2helvR12.bdf fonts/3helvR12.bdf fonts/5etl14.bdf \
83         fonts/heriR12.bdf fonts/xsymb0_12.bdf fonts/xsymb1_12.bdf \
84         fonts/2helvR14.bdf fonts/3helvR14.bdf fonts/5etl16.bdf \
85         fonts/heriR14.bdf fonts/xsymb0_14.bdf fonts/xsymb1_14.bdf
86
87 DATA_2_DEST = $(PACKAGE)/origfonts
88 DATA_2_FILES = origfonts/helvR12.bdf origfonts/helvR14.bdf
89
90 DATA_3_DEST = $(PACKAGE)/pcf
91 DATA_3_FILES = pcf/fonts.dir pcf/*.pcf
92
93 DATA_4_DEST = $(PACKAGE)/genfonts
94 DATA_4_FILES = genfonts/*.bdf
95
96 INFO_FILES = man/x-symbol.info*
97 TEXI_FILES = man/Makefile man/x-symbol.texi man/x-symbol.css man/x-symbol.init
98
99 WWW_FILES = www/changes.txt www/style.css www/overview.tex.txt \
100         www/index.html www/related.html www/details.html www/news.html \
101         www/addfonts.html \
102         www/colors.png www/context.png www/grid.png \
103         www/images.png www/key.png www/overview.png www/subscripts.png \
104         www/token.png
105
106 MANUAL = x-symbol
107
108 AUTOLOAD_PATH = lisp
109
110 ###===========================================================================
111 include ./XEmacs.rules
112 ## preserve, the .el files could be newer than the .elc files otherwise)
113 RCOPY = cp -p
114 ## follow symbolic links
115 TAR = tar -h
116 ###===========================================================================
117
118 GENERATED += lisp/custom-load.elc
119
120 EXCLUDES += --exclude 'RCS' --exclude '*.elc' --exclude '*.aux' \
121         --exclude '*.cp' --exclude '*.dvi' \
122         --exclude 'genfonts' --exclude 'pcf' \
123         --exclude 'Also' --exclude 'Fonts' --exclude 'Old' --exclude 'Tests' \
124         --exclude 'Utils' --exclude 'doc' --exclude 'release' \
125         --exclude 'www' --exclude 'admin' --exclude 'dated'
126
127 EXTRA_SOURCES = lisp/x-symbol-emacs.el
128
129 ifeq ($(XMAS20),t)
130 PRELOADS = -eval "(setq byte-compile-print-gensym nil)"
131 else
132 PRELOADS =
133 endif
134 PRELOADS += -eval "(progn (if (featurep 'x-symbol-autoloads) (unload-feature 'x-symbol-autoloads)) (push \"`pwd`/lisp/\" load-path))" -l auto-autoloads.el
135
136 ifeq ($(PEDANTIC),t)
137 PRELOADS += -eval "(setq stack-trace-on-error t)"
138 ## every file with name matching "x-symbol" will be load/required uncompiled
139 PRELOADS += -eval "(progn \
140   (defadvice require (before require activate) \
141     (or filename \
142         (not (string-match \"x-symbol\" (symbol-name feature))) \
143         (setq filename (format \"%s.el\" feature)))) \
144   (defadvice load (before load activate) \
145     (or nosuffix \
146         (string-match \"\\\\.el\\\\'\" file) \
147         (not (string-match \"x-symbol\" (file-name-nondirectory file))) \
148         (setq file (format \"%s.el\" file) nosuffix t))))"
149 endif
150
151 # With XEmacs-21.1, -vanilla now only includes -no-early-packages, not
152 # -no-packages.  This is not useful at all.  If there is a decent function to
153 # get the load-path of packages in $(REQUIRES), I would use it.  If
154 # package-compile.el could be used without changing my file structure, I would
155 # probably use it.
156
157 all:: lisp/auto-autoloads.el $(MULE_ELCS) $(ELCS) \
158         lisp/auto-autoloads.elc lisp/custom-load.elc info fonts
159
160 elcs: lisp/auto-autoloads.el $(MULE_ELCS) $(ELCS) \
161         lisp/auto-autoloads.elc lisp/custom-load.elc
162
163 info: man/x-symbol.texi
164         $(MAKE) -C man x-symbol.info
165
166 fonts:
167         $(MAKE) -C fonts mkdirs
168         $(MAKE) -C fonts pcfs
169
170 .PHONY: srckit test release fonts info elcs
171
172 srckit: srckit-std
173
174 clean: mostlyclean
175         $(MAKE) -C man clean
176         $(MAKE) -C fonts clean
177
178 binkit: binkit-common
179
180 www: $(STAGING)/x-symbol/www.tar.gz
181
182 release: srckit man/index.html man/x-symbol.ps binball www
183         $(MAKE) -C release VERSION=$(VERSION) release
184
185 wwwrelease: www
186         $(MAKE) -C release VERSION=$(VERSION) release
187
188 man/index.html: man/x-symbol.texi man/x-symbol.init
189         $(MAKE) -C man html
190
191 man/x-symbol.ps: man/x-symbol.texi
192         $(MAKE) -C man ps
193
194 man/x-symbol.pdf: man/x-symbol.texi
195         $(MAKE) -C man pdf
196
197 $(STAGING)/x-symbol/www.tar.gz: $(WWW_FILES) man/index.html man/x-symbol.css \
198                                  man/x-symbol.ps man/x-symbol.pdf
199         if [ ! -d $(STAGING)/x-symbol/man ]; \
200                 then mkdir -p $(STAGING)/x-symbol/man; fi
201         rm -f $(STAGING)/x-symbol/man/*
202         $(RCOPY) $(WWW_FILES) $(STAGING)/x-symbol
203         $(RCOPY) man/x-symbol.css man/index.html man/x-symbol*.html \
204                 man/x-symbol.ps man/x-symbol.pdf $(STAGING)/x-symbol/man
205 ##      $(ZIP) -f $(STAGING)/x-symbol/man/x-symbol.ps
206 ##      $(ZIP) -f $(STAGING)/x-symbol/man/x-symbol.pdf
207         $(CHMOD) $(STAGING)/x-symbol/*
208         $(CHMOD) $(STAGING)/x-symbol/man/*
209         (cd $(STAGING)/x-symbol; \
210                 $(TAR) -cf www.tar $(notdir $(WWW_FILES)) man; \
211                 $(ZIP) -f www.tar)