#
# Top-level makefile for MiniReq
#
# $Id: Makefile,v 1.10 2001/01/11 06:15:45 jwise Exp $
#
# remy@ccs.neu.edu
# 27 June 1994
#
# Copyright (C) 1994 by Remy Evard
#
# This program 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
# any later version.
#
# A copy of the license may be found in docs/license of the source
# distribution.
#

default: all

help:
	@echo "=================================================================="
	@echo "make options you're probably interested in: (in order)"
	@echo " 1. all"
	@echo " 2. install           (requires privs)"
	@echo
	@echo "If this is the _first_ time you've installed MiniReq:"
	@echo " 5. init              (requires privs)"
	@echo 
	@echo "Others:"
	@echo "  extract    - build the extract script"
	@echo "  Makefiles  - lower-level Makefiles"
	@echo "  clean      - clean up"
	@echo "  distclean  - clean up _everything_"
	@echo 
	@echo "Edit the defs file first. See docs/install for more information."
	@echo "=================================================================="

Makefiles: defs
	./extract < build/Makefile.def > build/Makefile

all:	Makefiles
	(cd build; make all)

install:
	(cd build; make directories)
	(cd build; make install)
	(cd build; make install-man)
	(cd build; make install-defs)
	@echo "=================================================================="
	@echo "  MiniReq is now installed.  If this is the first time you have  "
	@echo "  installed MiniReq in this location, you should run
	@echo
	@echo "          make init  "
	@echo
	@echo "  to set up the MiniReq queue  "
	@echo "=================================================================="

init:
	(cd build; make numbers)

clean:	Makefiles
	(cd build; make clean)

defs:
	@echo "Please run configure first" && false

distclean:	clean
	rm -f defs
	rm -f extract
	rm -f config.cache config.log config.status
