List us as maintainer for XE dev team packages
[packages] / xemacs-packages / psgml-dtds / Makefile
1 # Makefile for psgml DTD files
2
3 # This file is part of XEmacs.
4
5 # XEmacs 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
8 # later version.
9
10 # XEmacs 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
13 # for more details.
14
15 # You should have received a copy of the GNU General Public License
16 # along with XEmacs; see the file COPYING.  If not, write to
17 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 # Boston, MA 02111-1307, USA.
19
20 VERSION = 1.05
21 AUTHOR_VERSION =
22 MAINTAINER = SXEmacs Development Team <sxemacs-devel@sxemacs.org>
23 PACKAGE = psgml-dtds
24 PKG_TYPE = regular
25 REQUIRES = xemacs-base psgml edit-utils mail-lib fsf-compat eterm sh-script
26 CATEGORY = standard
27
28 include ../../Local.rules.inc
29
30 DATA_FILES = $(wildcard etc/[EHRWhsw]*) etc/CATALOG $(wildcard etc/*ent) \
31              $(wildcard etc/*.dtd) $(wildcard etc/*.mod) $(wildcard etc/*.dcl)
32 DATA_DEST = $(PACKAGE)
33
34 GET_CDTD_FILES = \
35 (progn \
36   (find-file \
37    \"etc/ECAT\") \
38   (princ \
39     (replace-in-string \
40      (buffer-string) \
41      \"FILE.*[ \\t]+\\\\([^ \\t]+\\\\)[ \\r\\t]*\\n\" \
42      \" etc/\\\\1\"))))
43
44 # Use := here so that this gets evaluated only once.  With just = it gets
45 # run four times!!!
46 DATA_1_FILES := $(shell $(XEMACS) -batch -no-autoloads -eval "$(GET_CDTD_FILES)")
47
48 DATA_1_DEST = $(PACKAGE)/cdtd
49
50 DATA_2_FILES = $(wildcard etc/ISO_8879-1986/entities/[A,D-Z]*) \
51                $(wildcard etc/ISO_8879-1986/entities/*.ent)
52 DATA_2_DEST = $(PACKAGE)/ISO_8879-1986/entities
53
54 SGML_DATA_DIRECTORY = (expand-file-name \"etc\")
55 SGML_ECAT_FILES = (expand-file-name \"ECAT\" sgml-data-directory)
56 SGML_CATALOG_FILES = (expand-file-name \"CATALOG\" sgml-data-directory)
57
58 PRELOADS = -eval "(setq sgml-data-directory $(SGML_DATA_DIRECTORY))"
59
60 EXTRA_DEPENDENCIES = $(DATA_1_FILES)
61
62 include ../../XEmacs.rules
63
64 # This may not actually recompute anything, so touch the files when done to
65 # avoid infinite rebuild.
66 $(DATA_1_FILES): $(DATA_FILES) $(DATA_2_FILES)
67         mkdir -p etc/cdtd
68         $(BOOT_XEMACS) -l psgml-html -l psgml-parse \
69                -eval "(setq sgml-auto-activate-dtd t  \
70                             sgml-ecat-files (list $(SGML_ECAT_FILES))  \
71                             sgml-catalog-files (list $(SGML_CATALOG_FILES)))" \
72                -f sgml-compile-all-dtds && touch $(DATA_1_FILES)