1 ## Process this file with automake to produce Makefile.in
3 # *** Under Windows NT and Microsoft Visual C++, we use cvsnt.mak, not
4 # *** this makefile. However, we need this file in order for 'make
5 # *** dist' to work properly on Unix machines.
7 # Makefile for GNU CVS windows-NT dist.
9 # Copyright (C) 1986-2005 The Free Software Foundation, Inc.
11 # Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
14 # This program is free software; you can redistribute it and/or modify
15 # it under the terms of the GNU General Public License as published by
16 # the Free Software Foundation; either version 2, or (at your option)
19 # This program is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU General Public License for more details.
62 ### Maintainer targets
64 MAINTAINERCLEANFILES =
67 all-local: config.h stdbool.h stdint.h
69 stamp-ch: config.h.in $(top_srcdir)/configure
70 @echo "/* This file is generated via a rule in Makefile.am from the" \
72 @echo " * config.h.in file." >>config.tmp
73 @echo " *" >>config.tmp
74 @echo " * *** DO NOT EDIT THIS FILE DIRECTLY ***" >>config.tmp
75 @echo " *" >>config.tmp
76 @echo " * Edit config.h.in instead." >>config.tmp
77 @echo " */" >>config.tmp
78 sed -e "s/%PACKAGE_STRING%/$(PACKAGE_STRING)/" \
79 -e "s/%PACKAGE_BUGREPORT%/$(PACKAGE_BUGREPORT)/" \
80 <$(srcdir)/config.h.in >>config.tmp
81 @cmp -s config.tmp $(srcdir)/config.h \
82 || (echo "Updating config.h"; \
83 cp config.tmp $(srcdir)/config.h)
85 @cp $(srcdir)/config.h $@
86 DISTCLEANFILES += stamp-ch
88 # The shell portion of this target is so that this file will be regenerated
89 # when it is missing, even when not in maintainer mode.
90 config.h.in: @MAINTAINER_MODE_TRUE@ stamp-chi
91 @if test ! -f $(srcdir)/$@; then \
92 rm -f $(srcdir)/stamp-chi; \
96 # The following target exists for two reasons. The first is so that the rule
97 # for config.h.in above may be conditionally dependent on it and thus only
98 # built in maintainer mode. The second reason is so that the config.h.in, and
99 # thus the config.h file, only gets touched when it actually changes, which
100 # could potentially save unnecessary rebuilds of many dependent files.
102 # This file is distributed since, without it, config.h.in will always be
103 # rebuilt on the first run in maintainer mode, even if its dependencies are
105 stamp-chi: $(srcdir)/mkconfig.pl $(top_srcdir)/config.h.in \
106 $(srcdir)/config.h.in.in $(srcdir)/config.h.in.footer
107 @$(PERL) mkconfig.pl -q $(top_srcdir)/config.h.in \
108 $(srcdir)/config.h.in \
109 $(srcdir)/config.h.in.in \
110 $(srcdir)/config.h.in.footer
111 @cp $(srcdir)/config.h.in $(srcdir)/$@
112 MAINTAINERCLEANFILES += $(srcdir)/config.h.in $(srcdir)/stamp-chi
115 stamp-sh: $(top_srcdir)/lib/stdbool_.h
116 @echo "/* This file is generated via a rule in Makefile.am from the" \
118 @echo " * ../lib/stdbool_.h.in file." >>stdbool.tmp
119 @echo " *" >>stdbool.tmp
120 @echo " * *** DO NOT EDIT THIS FILE DIRECTLY ***" >>stdbool.tmp
121 @echo " *" >>stdbool.tmp
122 @echo " * Edit ../lib/stdbool_.h instead." >>stdbool.tmp
123 @echo " */" >>stdbool.tmp
124 sed 's/@''HAVE__BOOL''@/0/' <$(top_srcdir)/lib/stdbool_.h \
126 @cmp -s stdbool.tmp $(srcdir)/stdbool.h \
127 || (echo "Updating stdbool.h"; \
128 cp stdbool.tmp $(srcdir)/stdbool.h)
130 @cp $(srcdir)/stdbool.h $@
131 DISTCLEANFILES += stamp-sh
134 stamp-sh2: $(top_srcdir)/lib/stdint_.h
135 @echo "/* This file is generated via a rule in Makefile.am from the" \
137 @echo " * ../lib/stdint_.h.in file." >>stdint.tmp
138 @echo " *" >>stdint.tmp
139 @echo " * *** DO NOT EDIT THIS FILE DIRECTLY ***" >>stdint.tmp
140 @echo " *" >>stdint.tmp
141 @echo " * Edit ../lib/stdint_.h instead." >>stdint.tmp
142 @echo " */" >>stdint.tmp
143 sed 's/@''HAVE_LONG_64BIT''@/0/g;s/@''HAVE_LONG_LONG_64BIT@/0/g' \
144 <$(top_srcdir)/lib/stdint_.h >>stdint.tmp
145 @cmp -s stdint.tmp $(srcdir)/stdint.h \
146 || (echo "Updating stdint.h"; \
147 cp stdint.tmp $(srcdir)/stdint.h)
149 @cp $(srcdir)/stdint.h $@
150 DISTCLEANFILES += stamp-sh2
152 # for backwards compatibility with the old makefiles
153 realclean: maintainer-clean