1. xemacs
  2. psgml-dtds


psgml-dtds / Makefile

# Makefile for psgml DTD files

# This file is part of XEmacs.

# XEmacs is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any
# later version.

# XEmacs is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.

# You should have received a copy of the GNU General Public License
# along with XEmacs; see the file COPYING.  If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.

VERSION = 1.02
MAINTAINER = XEmacs Development Team <xemacs-beta@xemacs.org>
PACKAGE = psgml-dtds
PKG_TYPE = regular
REQUIRES = xemacs-base psgml edit-utils mail-lib fsf-compat eterm sh-script
CATEGORY = standard

include ../../Local.rules.inc

DATA_FILES = $(wildcard etc/[EHRWhsw]*) etc/CATALOG $(wildcard etc/*ent) \
	     $(wildcard etc/*.dtd) $(wildcard etc/*.mod) $(wildcard etc/*.dcl)

(progn \
  (find-file \
   \"etc/ECAT\") \
  (princ \
    (replace-in-string \
     (buffer-string) \
     \"FILE.*[ \\t]+\\\\([^ \\t]+\\\\)[ \\r\\t]*\\n\" \
     \" etc/\\\\1\"))))

# Use := here so that this gets evaluated only once.  With just = it gets
# run four times!!!
DATA_1_FILES := $(shell $(XEMACS) -batch -no-autoloads -eval "$(GET_CDTD_FILES)")


DATA_2_FILES = $(wildcard etc/ISO_8879-1986/entities/[A,D-Z]*) \
               $(wildcard etc/ISO_8879-1986/entities/*.ent)
DATA_2_DEST = $(PACKAGE)/ISO_8879-1986/entities

SGML_DATA_DIRECTORY = (expand-file-name \"etc\")
SGML_ECAT_FILES = (expand-file-name \"ECAT\" sgml-data-directory)
SGML_CATALOG_FILES = (expand-file-name \"CATALOG\" sgml-data-directory)

PRELOADS = -eval "(setq sgml-data-directory $(SGML_DATA_DIRECTORY))"


include ../../XEmacs.rules

# This may not actually recompute anything, so touch the files when done to
# avoid infinite rebuild.
	mkdir -p etc/cdtd
	$(BOOT_XEMACS) -l psgml-html -l psgml-parse \
               -eval "(setq sgml-auto-activate-dtd t  \
			    sgml-ecat-files (list $(SGML_ECAT_FILES))  \
			    sgml-catalog-files (list $(SGML_CATALOG_FILES)))" \
	       -f sgml-compile-all-dtds && touch $(DATA_1_FILES)