1#
2#	aegis - project change supervisor
3#	This file is in the Public Domain 2004 Peter Miller
4#
5# This is an example makefile for use when importing existing projexcts
6# into Aegis.  Note that it assumes you are using GNU Automake and GNU
7# Autoconf.  If you are not, this file is not use to you.
8#
9
10#
11# Try to include the Makefile generated by ./configure If it exists, its
12# contents will be used.  If it does not exist, GNU Make will try to
13# build it, and then restart.
14#
15include Makefile
16
17#
18# Makefiles generated by GNU Automake define the "srcdir" macro right at
19# the start.  If this macro has NOT been defined, it means the Makefile
20# does not yet exist, and it needs to be constructed.
21#
22ifndef srcdir
23
24bogus-default-target: Makefile
25	$(MAKE) $(MAKECMDGOALS)
26
27#
28# Thsi is how to generate the Makefile and the config.h file.
29#
30Makefile: configure Makefile.in config.h.in
31	rm -f config.cache
32	./configure
33
34#
35# This is how to build the ./configure script.
36#
37configure: configure.ac config.h.in Makefile.in
38	autoconf
39
40#
41# If your project needs any of those extra files you need to add them to
42# this rule.  Only uncomment the dependencies you know you need.
43#
44#configure: aclocal.m4
45#configure: install-sh missing mkinstalldir
46
47#
48# There are two different, but equally common, ways of creating the
49# config.h.in file.  Select the one you need.  Note that some projets
50# don't use config.h at all, and so you comment out both.
51#
52config.h.in: configure.ac aclocal.m4
53	autoheader
54#config.h.in: configure.ac aclocal.m4 acconfig.h
55#	autoheader acconfig.h
56
57#
58# Only use this rule if the project uses GNU Automake.
59#
60Makefile.in: Makefile.am configure.ac config.h.in
61	automake
62
63aclocal.m4: configure.ac
64	aclocal
65
66#
67# The following rules apply ONLY if your ./configure script needs them.
68# See the configure rule, above.
69#
70AUTOMAKE_DIR=/usr/share/automake-1.7
71
72install-sh: $(AUTOMAKE_DIR)/install-sh
73	cp $^ $@
74
75missing: $(AUTOMAKE_DIR)/missing
76	cp $^ $@
77
78mkinstalldirs: $(AUTOMAKE_DIR)/mkinstalldirs
79	cp $^ $@
80endif
81