#
#  Tools makefile for GNUstep Base Library
#  Copyright (C) 1997 Free Software Foundation, Inc.
#
#  Written by:	Richard Frith-Macdonald <richard@brainstorm.co.uk>
#
#  This file is part of the GNUstep Base Library.
#
#  This library 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 of the License, or (at your option) any later version.
#
#  This library 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 this library; if not, write to the Free
#  Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.

# Install into the system root by default
GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT)

GNUSTEP_LOCAL_ADDITIONAL_MAKEFILES=../base.make
include $(GNUSTEP_MAKEFILES)/common.make

include ../Version
include ../config.mak

# DTDs to install
dtddir = $(GNUSTEP_LIBRARY)/DTDs
DTD_FILES = plist-0_9.dtd \
	gsdoc-0_6_5.dtd \
	gsdoc-0_6_6.dtd \
	gsdoc-0_6_7.dtd \
	gsdoc-1_0_0.dtd \
	gsdoc-1_0_1.dtd \
	gsdoc-1_0_2.dtd \
	gsdoc-1_0_3.dtd \
	gsdoc-1_0_1.rnc

# Manual pages to install
MAN1_PAGES = gdnc.1 autogsdoc.1 cvtenc.1 defaults.1 gspath.1 \
  pldes.1 sfparse.1 xmlparse.1
MAN7_PAGES = gsdoc.7
MAN8_PAGES = gdomap.8

# The application to be compiled
ifeq ($(add),yes)
TOOL_NAME = autogsdoc cvtenc plmerge sfparse xmlparse
else
TOOL_NAME = autogsdoc cvtenc gdnc gspath defaults pl plmerge \
		plparse sfparse pldes plser pl2link xmlparse
CTOOL_NAME = gdomap

SUBPROJECTS = make_strings
endif

TEST_TOOL_NAME = locale_alias

# The source files to be compiled
autogsdoc_OBJC_FILES = autogsdoc.m AGSParser.m AGSOutput.m AGSIndex.m AGSHtml.m
cvtenc_OBJC_FILES = cvtenc.m
gdomap_C_FILES = gdomap.c
gdnc_OBJC_FILES = gdnc.m
gspath_OBJC_FILES = gspath.m
defaults_OBJC_FILES = defaults.m
dread_OBJC_FILES = dread.m
dremove_OBJC_FILES = dremove.m
dwrite_OBJC_FILES = dwrite.m
pl_OBJC_FILES = pl.m
pldes_OBJC_FILES = pldes.m
plser_OBJC_FILES = plser.m
plmerge_OBJC_FILES = plmerge.m
plparse_OBJC_FILES = plparse.m
sfparse_OBJC_FILES = sfparse.m
pl2link_OBJC_FILES = pl2link.m
locale_alias_OBJC_FILES = locale_alias.m
xmlparse_OBJC_FILES = xmlparse.m

DOCUMENT_NAME = autogsdoc

# Documentation rules for autogsdoc
autogsdoc_AGSDOC_FLAGS = -Up autogsdoc
autogsdoc_AGSDOC_FILES = autogsdoc.m \
	AGSParser.h AGSOutput.h AGSIndex.h AGSHtml.h
autogsdoc_DOC_INSTALL_DIR = Developer/Tools

# Use local version of autogsdoc in case it is not installed
AUTOGSDOC=./obj/autogsdoc

include Makefile.preamble

-include GNUmakefile.local

include $(GNUSTEP_MAKEFILES)/tool.make
include $(GNUSTEP_MAKEFILES)/ctool.make
include $(GNUSTEP_MAKEFILES)/aggregate.make

ifeq ($(GNUSTEP_BASE_HAVE_LIBXML),1)
ifeq ($(doc),yes)
include $(GNUSTEP_MAKEFILES)/documentation.make
endif
endif

include Makefile.postamble

