#
# $Id: Makefile.in,v 2.0 1998/10/14 22:45:49 hender Exp $
#
# Master Makefile for the PBS Package
#
# This program is confidential and proprietary to MRJ Technology Solutions
# and may not be reproduced, published or disclosed to others without
# written authorization from MRJ.
# 
# Copyright (c) 1998 MRJ Technology Solutions, Inc. All Rights Reserved.
# 
# This program is derived from prior work some of which was originally
# written as a joint project between the Numerical Aerospace Simulation
# (NAS) Systems Division of NASA Ames Research Center and the National
# Energy Research Supercomputer Center (NERSC) of Lawrence Livermore
# National Laboratory.
#
# the first non-comment line must be .POSIX to assure POSIX make behavior
#
@MAKE_POSIX_TARGET@

srcdir = @srcdir@
top_srcdir = @top_srcdir@
MK_VPATH = @srcdir@

@mk_head@
@mk_dirs@


all build depend install clean distclean::
	@# do the distclean here so the sequencing can be assured
	@# allow for empty subdir lists and abort make if any subdir fails
	@case $@ in \
	    *clean)  SDIRS="src buildutils doc";; \
	    *)       SDIRS="src @PART_DOCS@";; \
	esac && \
	for d in $$SDIRS "" ; do \
	    if test -n "$$d"; then \
	        (cd $$d && echo Making $@ in $$d && $(MAKE) $@) || exit $$?; \
	    else true; fi; \
	done && \
	{ test $@ = distclean && \
	    ($(RM) Makefile config.*; exit 0) > /dev/null 2>&1 || true; }



#
# For an explanation of the following Makefile rules, see node
# `Automatic Remaking' in GNU Autoconf documentation.
#
# Note that gmake magically looks for a "Makefile" target and
# will try to remake the makefile for you. It is often the case
# that configure is slightly older than configure.in because it
# sorts earlier and is checked out of CVS repositories first.
# This often leads to autoconf being rerun the first time
# make is done, even if configure had just been run. This only
# happens with gmake and has no deleterious effect on the build
# process. For more info on this read the node 'Remaking Makefiles'
# in the GNU make info documents.
#
# However, this introduces a problem if you want separate build and src
# trees since this part of the makefile sticks its nose into the src tree,
# which may not even be writable. The solution taken is to rename the
# target "Makefile" to "_Makefile". In the src tree one could then
# do an explicit "make _Makefile".
#
_Makefile: $(srcdir)/Makefile.in config.status
	CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
config.status: $(srcdir)/configure
	./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.in $(srcdir)/aclocal.m4
	type autoconf > /dev/null 2>&1 && cd $(srcdir) && autoconf

config.h: stamp-h
stamp-h: $(srcdir)/config.h.in config.status
	CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status
$(srcdir)/config.h.in: $(srcdir)/stamp-h.in
$(srcdir)/stamp-h.in: $(srcdir)/configure.in $(srcdir)/aclocal.m4 $(srcdir)/acconfig.h
	type autoheader > /dev/null 2>&1 && cd $(srcdir) && autoheader
	date > $(srcdir)/stamp-h.in

