Fixed message typo.
[captive.git] / Makefile-head.am
1 # $Id$
2 # automake source include to the begin of all Makefile.am's
3 # Copyright (C) 2002 Jan Kratochvil <project-captive@jankratochvil.net>
4
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; exactly version 2 of June 1991 is required
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
18
19 # defined WANT_GTK_DOC if you plan to include macros/Makefile-gtk-doc.am
20
21
22 # Set all needed variables to their empty values to prevent "variable `...' not defined"
23 # Any further settings should be done exclusively by += operator
24 EXTRA_DIST=
25 BUILT_SOURCES=
26 CLEANFILES=
27 MAINTAINERCLEANFILES=
28 PHONY=
29 # default DEFAULT_INCLUDES=' -I. -I$(srcdir)'.(dirnames of 'CONFIG_HEADER') ,
30 # we neeed such $(DEFAULT_INCLUDES) but we need to prefer our $(INCLUDES)
31 # thus we postpone them later by moving them to $(AM_CPPFLAGS).
32 # It prevent us the inclusion of own wrappers
33 # when we want direct include during (test) compilations
34 # in $(top_srcdir)/src/libcaptive/include/reactos/
35 # as -I. is always as one of the first '-I's in $(INCLUDES).
36 # It will be utilized in $(top_srcdir)/src/libcaptive/Makefile-libcaptive.am .
37 # It would be also possible to use some #include_next's but it is pretty
38 # hassle to guess the right ordering in such case.
39 # FIXME: $(addprefix ) and $(dir /) are GNU make dependent!
40 AM_CPPFLAGS=-I. -I$(srcdir) $(addprefix -I,$(dir $(CONFIG_HEADER)))
41 # 'DEFAULT_INCLUDES=' will drop its contents.
42 # 'DEFAULT_INCLUDES:=' will cause: automake-X.Y/am/compile.am: DEFAULT_INCLUDES was set with `:=' and is now set with `='
43 # %DEFAULT_INCLUDES% is permitted only in automake system files.
44 # No possibility to keep its state therefore we generate
45 # (I hope) the same contents in 'AM_CPPFLAGS=...' line above
46 DEFAULT_INCLUDES=
47 INCLUDES=
48 lib_LTLIBRARIES=
49 pkginclude_HEADERS=
50 bin_PROGRAMS=
51 sbin_PROGRAMS=
52 noinst_HEADERS=
53 # Prevent: noinst_DATA was already defined in condition TRUE, which implies condition MAINTAINER_MODE_TRUE
54 # You should only unconditionally do: noinst_DATA+=...
55 noinst_DATA=$(noinst_DATA__include_test_all_stamp)
56
57 # Custom variables
58 captive_library=$(top_builddir)/src/libcaptive/libcaptive.la
59 localedir=$(datadir)/locale
60
61 # Standard settings
62 INCLUDES+=-DLOCALEDIR=\"$(localedir)\"
63 INCLUDES+=-I$(top_srcdir)/src/libcaptive/include
64 INCLUDES+=-I$(top_srcdir)/intl
65
66 # Force delete of target file if command fails.
67 # Generally better behaviour but it requires GNU make. Harmless otherwise.
68 .DELETE_ON_ERROR:
69
70 .PHONY: $(PHONY)
71
72 # This target is used during ./autogen.pl POTFILES.in generation
73 PHONY+=distfiles
74 distfiles: $(DISTFILES)
75         @if test -n "$(DISTFILES_PRINT)";then \
76                 echo -n ":DISTFILES:"; \
77                 for distfile in . $(DISTFILES);do \
78                         if test -n 1 \
79                                         -a "$$distfile" '!=' . \
80                                         -a "$$distfile" '!=' Makefile.am \
81                                         -a "$$distfile" '!=' Makefile.in \
82                                         ;then \
83                                 if echo " $(BUILT_SOURCES) "|grep -q " $$distfile ";then :;else \
84                                         echo -n " $(subdir)/$$distfile"; \
85                                         fi; \
86                                 fi; \
87                         done; \
88                 echo; \
89                 fi;
90         @for subdir in . $(SUBDIRS);do \
91                 if test "$$subdir" = . -o "$$subdir" = intl -o "$$subdir" = po -o "$$subdir" = m4;then :;else \
92                         (cd "$$subdir" && $(MAKE) $(AM_MAKEFLAGS) distfiles) || exit 1; \
93                         fi; \
94                 done
95
96 # check for macros/Makefile-gtk-doc.am inclusion
97 # FIXME: GNU make dependent!
98 # use <space><keyword> to bypass automake but apply to GNU make
99  ifdef WANT_GTK_DOC
100 dist-hook-local:
101  else
102 dist-hook:
103  endif
104         for i in _built_sources_pad $(BUILT_SOURCES);do \
105                 $(RM) -r $(distdir)/$$i; \
106         done
107
108
109 # Test compilability of all local separate include files
110 CLEANFILES+=.include_test.o .include_test_all.stamp
111 if MAINTAINER_MODE
112 noinst_DATA__include_test_all_stamp=.include_test_all.stamp
113 else
114 noinst_DATA__include_test_all_stamp=
115 endif
116
117 # FIXME: Use separate .stamp file for each of $(noinst_HEADERS)
118 # we would need some pattern substituion which means GNU make dependency
119 .include_test_all.stamp: $(HEADERS) $(top_srcdir)/include_test.c
120         @set -e;for header in . $(HEADERS);do \
121                 if test "$$header" '!=' .;then \
122                         $(COMPILE) -include "$$header" -o .include_test.o -c $(top_srcdir)/include_test.c; \
123                         fi; \
124                 done
125         @rm -f include_test.o
126         @touch $@
127
128
129 # Unfortunately we need to use this never-invocated target
130 # to get $(COMPILE) variable definition.
131 # Do not: .include_test_false.c
132 # as automake-1.9.5-1 would produce invalid rules for file: .c
133 MAINTAINERCLEANFILES+=_include_test_false.c
134 BUILT_SOURCES+=_include_test_false.c
135 if NEVER
136 noinst_PROGRAMS=_include_test_false
137 endif
138 _include_test_false.c:
139         @touch $@
140
141 if HAVE_PERL
142 %.pod: %.pod.pl
143         $(PERL) $< >$@
144
145 endif
146 if HAVE_POD2MAN
147 %.1: %.pod
148         $(POD2MAN) --section=1 $< >$@
149
150 %.7: %.pod
151         $(POD2MAN) --section=7 $< >$@
152
153 %.8: %.pod
154         $(POD2MAN) --section=8 $< >$@
155
156 endif