2008-08-31 Robert Millan <rmh@aybabtu.com>
[grub2/phcoder.git] / Makefile.in
blob6137974426c9ff7891e4c95e0ee780467552f265
1 # -*- makefile -*-
3 # Copyright (C) 1994,1995,1996,1997,1998,1999,2000,2001,2002,2004,2005,2006,2007 Free Software Foundation, Inc.
5 # This Makefile.in is free software; the author
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
14 ### The configure script will replace these variables.
16 SHELL = /bin/sh
18 @SET_MAKE@
20 transform = @program_transform_name@
22 srcdir = @srcdir@
23 builddir = @builddir@
24 top_srcdir = @top_srcdir@
25 VPATH = @srcdir@
26 prefix = @prefix@
27 exec_prefix = @exec_prefix@
29 bindir = @bindir@
30 sbindir = @sbindir@
31 libexecdir = @libexecdir@
32 datarootdir = @datarootdir@
33 datadir = @datadir@
34 sysconfdir = @sysconfdir@
35 sharedstatedir = @sharedstatedir@
36 localstatedir = @localstatedir@
37 libdir = @libdir@
38 infodir = @infodir@
39 mandir = @mandir@
40 includedir = @includedir@
41 pkgdatadir = $(datadir)/`echo @PACKAGE_TARNAME@ | sed '$(transform)'`
42 pkglibdir = $(libdir)/`echo @PACKAGE_TARNAME@/$(target_cpu)-$(platform) | sed '$(transform)'`
44 PACKAGE_NAME = @PACKAGE_NAME@
45 PACKAGE_TARNAME = @PACKAGE_TARNAME@
46 PACKAGE_VERSION = @PACKAGE_VERSION@
47 PACKAGE_STRING = @PACKAGE_STRING@
48 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
50 target_cpu = @target_cpu@
51 target_os = @target_os@
52 platform = @platform@
54 INSTALL = @INSTALL@
55 INSTALL_PROGRAM = @INSTALL_PROGRAM@
56 INSTALL_DATA = @INSTALL_DATA@
57 INSTALL_SCRIPT = @INSTALL_SCRIPT@
58 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
60 mkinstalldirs = $(srcdir)/mkinstalldirs
62 CC = @CC@
63 CFLAGS = @CFLAGS@
64 LDFLAGS = @LDFLAGS@
65 CPPFLAGS = @CPPFLAGS@ -I. -Iinclude -I$(srcdir)/include -Wall -W \
66 -DGRUB_LIBDIR=\"$(pkglibdir)\"
67 TARGET_CC = @TARGET_CC@
68 TARGET_CFLAGS = @TARGET_CFLAGS@
69 TARGET_CPPFLAGS = @TARGET_CPPFLAGS@ -I. -Iinclude -I$(srcdir)/include \
70 -Wall -W
71 TARGET_LDFLAGS = @TARGET_LDFLAGS@
72 TARGET_IMG_LDSCRIPT = @TARGET_IMG_LDSCRIPT@
73 TARGET_IMG_LDFLAGS = @TARGET_IMG_LDFLAGS@
74 TARGET_OBJ2ELF = @TARGET_OBJ2ELF@
75 MODULE_LDFLAGS = @MODULE_LDFLAGS@
76 EXEEXT = @EXEEXT@
77 OBJCOPY = @OBJCOPY@
78 STRIP = @STRIP@
79 NM = @NM@
80 RUBY = @RUBY@
81 HELP2MAN = @HELP2MAN@
82 ifeq (, $(HELP2MAN))
83 HELP2MAN = true
84 else
85 HELP2MAN := LANG=C $(HELP2MAN) --no-info --source=FSF
86 endif
87 AWK = @AWK@
88 LIBCURSES = @LIBCURSES@
89 LIBLZO = @LIBLZO@
90 YACC = @YACC@
91 UNIFONT_HEX = @UNIFONT_HEX@
93 # Options.
94 enable_grub_emu = @enable_grub_emu@
95 enable_grub_fstest = @enable_grub_fstest@
96 enable_grub_pe2elf = @enable_grub_pe2elf@
97 enable_lzo = @enable_lzo@
99 ### General variables.
101 RMKFILES = $(addprefix conf/,common.rmk i386-pc.rmk powerpc-ieee1275.rmk \
102 sparc64-ieee1275.rmk i386-efi.rmk i386-ieee1275.rmk i386-coreboot.rmk)
103 MKFILES = $(patsubst %.rmk,%.mk,$(RMKFILES))
105 PKGLIB = $(pkglib_IMAGES) $(pkglib_MODULES) $(pkglib_PROGRAMS) \
106 $(pkglib_DATA) $(lib_DATA)
107 PKGDATA = $(pkgdata_DATA)
108 PROGRAMS = $(bin_UTILITIES) $(sbin_UTILITIES)
109 SCRIPTS = $(bin_SCRIPTS) $(sbin_SCRIPTS) $(update-grub_SCRIPTS)
111 CLEANFILES =
112 MOSTLYCLEANFILES =
113 DISTCLEANFILES = config.status config.cache config.log config.h \
114 Makefile stamp-h include/grub/cpu include/grub/machine \
115 gensymlist.sh genkernsyms.sh
116 MAINTAINER_CLEANFILES = $(srcdir)/configure $(addprefix $(srcdir)/,$(MKFILES))
118 # The default target.
119 all: all-local
121 ### Include an arch-specific Makefile.
122 $(addprefix $(srcdir)/,$(MKFILES)): %.mk: %.rmk genmk.rb
123 if test "x$(RUBY)" = x; then \
124 touch $@; \
125 else \
126 $(RUBY) $(srcdir)/genmk.rb < $< > $@; \
129 include $(srcdir)/conf/$(target_cpu)-$(platform).mk
131 ### General targets.
133 CLEANFILES += $(pkglib_DATA) $(pkgdata_DATA)
134 pkglib_DATA += moddep.lst command.lst fs.lst partmap.lst
135 moddep.lst: $(DEFSYMFILES) $(UNDSYMFILES) genmoddep.awk
136 cat $(DEFSYMFILES) /dev/null \
137 | $(AWK) -f $(srcdir)/genmoddep.awk $(UNDSYMFILES) > $@ \
138 || (rm -f $@; exit 1)
140 command.lst: $(COMMANDFILES)
141 cat $^ /dev/null | sort > $@
143 fs.lst: $(FSFILES)
144 cat $^ /dev/null | sort > $@
146 partmap.lst: $(PARTMAPFILES)
147 cat $^ /dev/null | sort > $@
149 ifeq (, $(UNIFONT_HEX))
150 else
151 pkgdata_DATA += unicode.pff ascii.pff
153 # Arrows and lines are needed to draw the menu, so we always include them
154 UNICODE_ARROWS=0x2190-0x2193
155 UNICODE_LINES=0x2501-0x251B
157 unicode.pff: $(UNIFONT_HEX)
158 ruby $(srcdir)/util/unifont2pff.rb $(UNIFONT_HEX) > $@
160 ascii.pff: $(UNIFONT_HEX)
161 ruby $(srcdir)/util/unifont2pff.rb 0x0-0x7f $(UNICODE_ARROWS) $(UNICODE_LINES) $(UNIFONT_HEX) > $@
162 endif
164 all-local: $(PROGRAMS) $(PKGLIB) $(PKGDATA) $(SCRIPTS) $(MKFILES)
166 install: install-local
168 install-local: all
169 $(mkinstalldirs) $(DESTDIR)$(pkglibdir)
170 @list='$(PKGLIB)'; \
171 for file in $$list; do \
172 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
173 dest="`echo $$file | sed 's,.*/,,'`"; \
174 $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(pkglibdir)/$$dest; \
175 done
176 $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
177 @list='$(PKGDATA)'; \
178 for file in $$list; do \
179 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
180 dest="`echo $$file | sed 's,.*/,,'`"; \
181 $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(pkgdatadir)/$$dest; \
182 done
183 $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1
184 @list='$(bin_UTILITIES)'; for file in $$list; do \
185 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
186 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
187 $(INSTALL_PROGRAM) $$dir$$file $(DESTDIR)$(bindir)/$$dest; \
188 $(HELP2MAN) --section=1 $(builddir)/$$file > $(DESTDIR)$(mandir)/man1/$$dest.1; \
189 done
190 $(mkinstalldirs) $(DESTDIR)$(sbindir) $(DESTDIR)$(mandir)/man8
191 @list='$(sbin_UTILITIES)'; for file in $$list; do \
192 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
193 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
194 $(INSTALL_PROGRAM) $$dir$$file $(DESTDIR)$(sbindir)/$$dest; \
195 $(HELP2MAN) --section=8 $(builddir)/$$file > $(DESTDIR)$(mandir)/man8/$$dest.8; \
196 done
197 @list='$(bin_SCRIPTS)'; for file in $$list; do \
198 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
199 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
200 $(INSTALL_SCRIPT) $$dir$$file $(DESTDIR)$(bindir)/$$dest; \
201 $(HELP2MAN) --section=1 $(builddir)/$$file > $(DESTDIR)$(mandir)/man1/$$dest.1; \
202 done
203 @list='$(sbin_SCRIPTS)'; for file in $$list; do \
204 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
205 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
206 $(INSTALL_SCRIPT) $$dir$$file $(DESTDIR)$(sbindir)/$$dest; \
207 $(HELP2MAN) --section=8 $(builddir)/$$file > $(DESTDIR)$(mandir)/man8/$$dest.8; \
208 done
209 $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/grub.d
210 @list='$(update-grub_SCRIPTS)'; for file in $$list; do \
211 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
212 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
213 $(INSTALL_SCRIPT) $$dir$$file $(DESTDIR)$(sysconfdir)/grub.d/$$dest; \
214 done
215 @list='$(update-grub_DATA)'; for file in $$list; do \
216 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
217 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
218 $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(sysconfdir)/grub.d/$$dest; \
219 done
220 $(mkinstalldirs) $(DESTDIR)$(libdir)/grub
221 @list='$(lib_DATA)'; \
222 for file in $$list; do \
223 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
224 dest="`echo $$file | sed 's,.*/,,'`"; \
225 $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(libdir)/grub/$$dest; \
226 done
228 install-strip:
229 $(MAKE) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" install
231 uninstall:
232 @list='$(PKGLIB)'; \
233 for file in $$list; do \
234 dest="`echo $$file | sed 's,.*/,,'`"; \
235 rm -f $(DESTDIR)$(pkglibdir)/$$dest; \
236 done
237 @list='$(PKGDATA)'; \
238 for file in $$list; do \
239 dest="`echo $$file | sed 's,.*/,,'`"; \
240 rm -f $(DESTDIR)$(pkgdatadir)/$$dest; \
241 done
242 @list='$(bin_UTILITIES) $(bin_SCRIPTS)'; for file in $$list; do \
243 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
244 rm -f $(DESTDIR)$(bindir)/$$dest; \
245 done
246 @list='$(sbin_UTILITIES) $(sbin_SCRIPTS)'; for file in $$list; do \
247 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
248 rm -f $(DESTDIR)$(sbindir)/$$dest; \
249 done
250 @list='$(update-grub_SCRIPTS) $(update-grub_DATA)'; for file in $$list; do \
251 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
252 rm -f $(DESTDIR)$(sysconfdir)/grub.d/$$dest; \
253 done
255 clean:
256 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
258 mostlyclean: clean
259 -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
261 distclean: mostlyclean
262 -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
263 -rm -rf $(srcdir)/autom4te.cache
265 maintainer-clean: distclean
266 -test -z "$(MAINTAINER_CLEANFILES)" || rm -f $(MAINTAINER_CLEANFILES)
268 info:
270 dvi:
272 distdir=$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
274 DISTLIST: gendistlist.sh
275 sh $(srcdir)/gendistlist.sh > $(srcdir)/DISTLIST
277 distdir: DISTLIST
278 -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
279 $(mkinstalldirs) $(distdir)
280 for i in `cat $(srcdir)/DISTLIST`; do \
281 dir=`echo "$$i" | sed 's:/[^/]*$$::'`; \
282 if test -d $(srcdir)/$$dir; then \
283 $(mkinstalldirs) $(distdir)/$$dir; \
284 fi; \
285 cp -p $(srcdir)/$$i $(distdir)/$$i || exit 1; \
286 done
287 chmod -R a+r $(distdir)
289 GZIP_ENV = --best
291 dist: distdir
292 tar chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
293 -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
295 distcheck: dist
296 -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
297 GZIP=$(GZIP_ENV) gzip -cd $(distdir).tar.gz | tar xf -
298 chmod -R a-w $(distdir)
299 chmod a+w $(distdir)
300 mkdir $(distdir)/=build
301 mkdir $(distdir)/=inst
302 chmod a-w $(distdir)
303 dc_instdir=`CDPATH=: && cd $(distdir)/=inst && pwd` \
304 && cd $(distdir)/=build \
305 && ../configure --srcdir=.. --prefix=$$dc_instdir \
306 && $(MAKE) all dvi check install && $(MAKE) uninstall \
307 && (test `find $$dc_instdir -type f -print | wc -l` -le 1 \
308 || (echo "Error: files left after uninstall" 1>&2; \
309 exit 1)) \
310 && $(MAKE) dist && $(MAKE) distclean \
311 && rm -f $(distdir).tar.gz \
312 && (test `find . -type f -print | wc -l` -eq 0 \
313 || (echo "Error: files left after distclean" 1>&2; \
314 exit 1))
315 -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
316 @echo "$(distdir).tar.gz is ready for distribution" | \
317 sed 'h;s/./=/g;p;x;p;x'
319 check:
321 .SUFFIX:
322 .SUFFIX: .c .o .S .d
324 # Regenerate configure and Makefile automatically.
325 $(srcdir)/configure: configure.ac aclocal.m4
326 cd $(srcdir) && autoconf
328 $(srcdir)/config.h.in: stamp-h.in
329 $(srcdir)/stamp-h.in: configure.ac aclocal.m4
330 cd $(srcdir) && autoheader
331 echo timestamp > $(srcdir)/stamp-h.in
333 config.h: stamp-h
334 stamp-h: config.h.in config.status
335 ./config.status
337 Makefile: Makefile.in config.status
338 ./config.status
340 config.status: configure
341 ./config.status --recheck
343 gensymlist.sh: gensymlist.sh.in config.status
344 ./config.status
346 genkernsyms.sh: genkernsyms.sh.in config.status
347 ./config.status
349 .PHONY: all install install-strip uninstall clean mostlyclean distclean
350 .PHONY: maintainer-clean info dvi dist check
352 # Prevent an overflow.
353 .NOEXPORT:
355 .DELETE_ON_ERROR: