# Don't edit Makefile!  Use conf-* for configuration.
#
# Generated by spac see http://untroubled.org/spac/

SHELL=/bin/sh

DEFAULT: all

all: programs python

auto_python.c: 
	( set -e; PATH="/bin:/usr/bin:/usr/local/bin:$$PATH"; export PATH; \
	  python=`which python`; \
	  echo 'const char auto_python[] = "'$$python'";' ) >auto_python.c

compile: conf-cc
	( echo '#!/bin/sh'; \
	  echo 'source=$$1; shift'; \
	  echo 'base=`echo "$$source" | sed -e s:\\\\.c$$::`'; \
	  echo exec `head -1 conf-cc` '-I. -o $${base}.o -c $$source $${1+"$$@"}'; \
	) >compile
	chmod 755 compile

conf_home.c: conf-home
	head -1 conf-home | \
	  sed -e 's/"/\\"/g' \
	      -e 's/^/const char conf_home[] = "/' \
	      -e 's/$$/";/' >conf_home.c

config.pyc: config.py
	python -c '__import__("config")'

ezmlm-browse: load ezmlm-browse.o
	./load ezmlm-browse  

ezmlm-browse.o: compile ezmlm-browse.c conf_home.c auto_python.c
	./compile ezmlm-browse.c

ezmlm.pyc: ezmlm.py
	python -c '__import__("ezmlm")'

functions.pyc: functions.py
	python -c '__import__("functions")'

globals.pyc: globals.py
	python -c '__import__("globals")'

load: conf-ld
	( echo '#!/bin/sh';\
	  echo 'main="$$1"; shift';\
	  echo exec `head -1 conf-ld` '-o "$$main" "$$main.o" $${1+"$$@"}';\
	) >load
	chmod 755 load

mail.pyc: mail.py
	python -c '__import__("mail")'

main.pyc: main.py
	python -c '__import__("main")'

makedist.pyc: makedist.py
	python -c '__import__("makedist")'

programs: ezmlm-browse

python: config.pyc functions.pyc main.pyc mail.pyc globals.pyc ezmlm.pyc makedist.pyc template/syntax.pyc template/__init__.pyc template/context.pyc template/lex.pyc template/parser.pyc template/functions.pyc

template/__init__.pyc: template/__init__.py
	python -c '__import__("template/__init__")'

template/context.pyc: template/context.py
	python -c '__import__("template/context")'

template/functions.pyc: template/functions.py
	python -c '__import__("template/functions")'

template/lex.pyc: template/lex.py
	python -c '__import__("template/lex")'

template/parser.pyc: template/parser.py
	python -c '__import__("template/parser")'

template/syntax.pyc: template/syntax.py
	python -c '__import__("template/syntax")'

