AUTOMAKE_OPTIONS = foreign

bin_PROGRAMS = posh

posh_SOURCES = alloc.c c_test.c \
        eval.c exec.c expr.c history.c io.c jobs.c lex.c \
        main.c misc.c path.c shf.c syn.c table.c trap.c \
        tree.c tty.c var.c \
	src/builtins.c src/compat.c src/times.c \
	sh.h shf.h table.h tree.h expand.h lex.h proto.h \
	ksh_dir.h ksh_stat.h ksh_wait.h ksh_limval.h ksh_time.h \
	c_test.h conf-end.h edit.h tty.h \
	src/compat.h

man_MANS = posh.1

common_dep = $(top_srcdir)/configure.ac

#posh.1:   $(common_dep) $(srcdir)/posh.xml
#	LANG=C xmlto man $(srcdir)/posh.xml

EXTRA_DIST = siglist.in siglist.sh posh.xml $(man_MANS)
BUILT_SOURCES = siglist.out
DISTCLEANFILES = siglist.out

siglist.out: config.h sh.h siglist.in siglist.sh
	$(srcdir)/siglist.sh "$(CPP) $(CPPFLAGS) $(DEFS) -I. -I$(srcdir)" < $(srcdir)/siglist.in > tmpsiglist.out
	mv tmpsiglist.out siglist.out

SUBDIRS = . src tests
