2009-01-19 Robert Millan <rmh@aybabtu.com>
[grub2/jjazz.git] / Makefile.in
blobea193d8b6ff585d315ad319bf8f9de2f4596fbcf
1 # -*- makefile -*-
3 # Copyright (C) 1994,1995,1996,1997,1998,1999,2000,2001,2002,2004,2005,2006,2007,2008,2009,2008 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$(builddir) -I$(builddir)/include -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$(builddir) -I$(builddir)/include -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_BDF = @UNIFONT_BDF@
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@
98 enable_grub_mkfont = @enable_grub_mkfont@
99 freetype_cflags = @freetype_cflags@
100 freetype_libs = @freetype_libs@
102 ### General variables.
104 RMKFILES = $(addprefix conf/,common.rmk i386-coreboot.rmk i386-efi.rmk \
105 i386-ieee1275.rmk i386-pc.rmk i386.rmk powerpc-ieee1275.rmk \
106 sparc64-ieee1275.rmk x86_64-efi.rmk)
108 MKFILES = $(patsubst %.rmk,%.mk,$(RMKFILES))
110 PKGLIB = $(pkglib_IMAGES) $(pkglib_MODULES) $(pkglib_PROGRAMS) \
111 $(pkglib_DATA) $(lib_DATA) $(pkglib_BUILDDIR)
112 PKGDATA = $(pkgdata_DATA) $(pkgdata_SRCDIR)
113 PROGRAMS = $(bin_UTILITIES) $(sbin_UTILITIES)
114 SCRIPTS = $(bin_SCRIPTS) $(sbin_SCRIPTS) $(grub-mkconfig_SCRIPTS)
116 CLEANFILES =
117 MOSTLYCLEANFILES =
118 DISTCLEANFILES = config.status config.cache config.log config.h \
119 Makefile stamp-h include/grub/cpu include/grub/machine \
120 gensymlist.sh genkernsyms.sh build_env.mk
121 MAINTAINER_CLEANFILES = $(srcdir)/configure $(addprefix $(srcdir)/,$(MKFILES))
123 # The default target.
124 all: all-local
126 ### Include an arch-specific Makefile.
127 $(addprefix $(srcdir)/,$(MKFILES)): %.mk: %.rmk genmk.rb
128 if test "x$(RUBY)" = x; then \
129 touch $@; \
130 else \
131 $(RUBY) $(srcdir)/genmk.rb < $< > $@; \
134 include $(srcdir)/conf/$(target_cpu)-$(platform).mk
136 ### General targets.
138 CLEANFILES += $(pkglib_DATA) $(pkgdata_DATA)
139 pkglib_DATA += moddep.lst command.lst fs.lst partmap.lst
140 moddep.lst: $(DEFSYMFILES) $(UNDSYMFILES) genmoddep.awk
141 cat $(DEFSYMFILES) /dev/null \
142 | $(AWK) -f $(srcdir)/genmoddep.awk $(UNDSYMFILES) > $@ \
143 || (rm -f $@; exit 1)
145 command.lst: $(COMMANDFILES)
146 cat $^ /dev/null | sort > $@
148 fs.lst: $(FSFILES)
149 cat $^ /dev/null | sort > $@
151 partmap.lst: $(PARTMAPFILES)
152 cat $^ /dev/null | sort > $@
154 ifeq (, $(UNIFONT_BDF))
155 else
157 ifeq ($(enable_grub_mkfont),yes)
159 pkgdata_DATA += unicode.pf2 ascii.pf2
161 # Arrows and lines are needed to draw the menu, so we always include them
162 UNICODE_ARROWS=0x2190-0x2193
163 UNICODE_LINES=0x2501-0x251B
165 unicode.pf2: $(UNIFONT_BDF) grub-mkfont
166 $(builddir)/grub-mkfont -o $@ $(UNIFONT_BDF)
168 ascii.pf2: $(UNIFONT_BDF) grub-mkfont
169 $(builddir)/grub-mkfont -o $@ $(UNIFONT_BDF) -r 0x0-0x7f,$(UNICODE_ARROWS),$(UNICODE_LINES)
170 endif
171 endif
173 # Used for building modules externally
174 pkglib_BUILDDIR += build_env.mk
175 build_env.mk: Makefile
177 echo "TARGET_CC=$(TARGET_CC)" ; \
178 echo "TARGET_CFLAGS=$(TARGET_CFLAGS)" ; \
179 echo "TARGET_CPPFLAGS=$(TARGET_CPPFLAGS) -I$(pkglibdir)" ; \
180 echo "STRIP=$(STRIP)" ; \
181 echo "COMMON_ASFLAGS=$(COMMON_ASFLAGS)" ; \
182 echo "COMMON_CFLAGS=$(COMMON_CFLAGS)" ; \
183 echo "COMMON_LDFLAGS=$(COMMON_LDFLAGS)"\
184 ) > $@
185 pkglib_BUILDDIR += config.h grub_script.tab.h
186 pkgdata_SRCDIR += genmodsrc.sh genmk.rb
187 include_DATA += $(shell find $(srcdir)/include -name \*.h | sed -e "s,^$(srcdir)/,,g") include/grub/cpu
189 all-local: $(PROGRAMS) $(PKGLIB) $(PKGDATA) $(SCRIPTS) $(MKFILES)
191 install: install-local
193 install-local: all
194 $(mkinstalldirs) $(DESTDIR)$(pkglibdir)
195 @list='$(PKGLIB)'; \
196 for file in $$list; do \
197 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
198 dest="`echo $$file | sed 's,.*/,,'`"; \
199 $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(pkglibdir)/$$dest; \
200 done
201 $(mkinstalldirs) $(DESTDIR)$(includedir)
202 @list='$(include_DATA)'; \
203 for file in $$list; do \
204 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
205 dest="`echo $$file | sed 's,include/,,'`"; \
206 destdir="`echo $$dest | sed 's,\(^\|/\)[^/]*$$,,g'`"; \
207 $(mkinstalldirs) $(DESTDIR)$(includedir)/$$destdir; \
208 if test -f "$$dir$$file"; then \
209 $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(includedir)/$$dest; \
210 elif test -L "$$dir$$file"; then \
211 cp -d $$dir$$file $(DESTDIR)$(includedir)/$$dest; \
212 fi; \
213 done
214 $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
215 @list='$(PKGDATA)'; \
216 for file in $$list; do \
217 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
218 dest="`echo $$file | sed 's,.*/,,'`"; \
219 $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(pkgdatadir)/$$dest; \
220 done
221 $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1
222 @list='$(bin_UTILITIES)'; for file in $$list; do \
223 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
224 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
225 $(INSTALL_PROGRAM) $$dir$$file $(DESTDIR)$(bindir)/$$dest; \
226 $(HELP2MAN) --section=1 $(builddir)/$$file > $(DESTDIR)$(mandir)/man1/$$dest.1; \
227 done
228 $(mkinstalldirs) $(DESTDIR)$(sbindir) $(DESTDIR)$(mandir)/man8
229 @list='$(sbin_UTILITIES)'; for file in $$list; do \
230 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
231 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
232 $(INSTALL_PROGRAM) $$dir$$file $(DESTDIR)$(sbindir)/$$dest; \
233 $(HELP2MAN) --section=8 $(builddir)/$$file > $(DESTDIR)$(mandir)/man8/$$dest.8; \
234 done
235 @list='$(bin_SCRIPTS)'; for file in $$list; do \
236 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
237 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
238 $(INSTALL_SCRIPT) $$dir$$file $(DESTDIR)$(bindir)/$$dest; \
239 $(HELP2MAN) --section=1 $(builddir)/$$file > $(DESTDIR)$(mandir)/man1/$$dest.1; \
240 done
241 @list='$(sbin_SCRIPTS)'; for file in $$list; do \
242 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
243 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
244 $(INSTALL_SCRIPT) $$dir$$file $(DESTDIR)$(sbindir)/$$dest; \
245 $(HELP2MAN) --section=8 $(builddir)/$$file > $(DESTDIR)$(mandir)/man8/$$dest.8; \
246 done
247 $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/grub.d
248 @list='$(grub-mkconfig_SCRIPTS)'; for file in $$list; do \
249 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
250 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
251 $(INSTALL_SCRIPT) $$dir$$file $(DESTDIR)$(sysconfdir)/grub.d/$$dest; \
252 done
253 @list='$(grub-mkconfig_DATA)'; for file in $$list; do \
254 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
255 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
256 $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(sysconfdir)/grub.d/$$dest; \
257 done
258 $(mkinstalldirs) $(DESTDIR)$(libdir)/grub
259 @list='$(lib_DATA)'; \
260 for file in $$list; do \
261 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
262 dest="`echo $$file | sed 's,.*/,,'`"; \
263 $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(libdir)/grub/$$dest; \
264 done
266 install-strip:
267 $(MAKE) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" install
269 uninstall:
270 @list='$(PKGLIB)'; \
271 for file in $$list; do \
272 dest="`echo $$file | sed 's,.*/,,'`"; \
273 rm -f $(DESTDIR)$(pkglibdir)/$$dest; \
274 done
275 @list='$(PKGDATA)'; \
276 for file in $$list; do \
277 dest="`echo $$file | sed 's,.*/,,'`"; \
278 rm -f $(DESTDIR)$(pkgdatadir)/$$dest; \
279 done
280 @list='$(bin_UTILITIES) $(bin_SCRIPTS)'; for file in $$list; do \
281 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
282 rm -f $(DESTDIR)$(bindir)/$$dest; \
283 done
284 @list='$(sbin_UTILITIES) $(sbin_SCRIPTS)'; for file in $$list; do \
285 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
286 rm -f $(DESTDIR)$(sbindir)/$$dest; \
287 done
288 @list='$(grub-mkconfig_SCRIPTS) $(grub-mkconfig_DATA)'; for file in $$list; do \
289 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
290 rm -f $(DESTDIR)$(sysconfdir)/grub.d/$$dest; \
291 done
293 clean:
294 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
296 mostlyclean: clean
297 -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
299 distclean: mostlyclean
300 -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
301 -rm -rf $(srcdir)/autom4te.cache
303 maintainer-clean: distclean
304 -test -z "$(MAINTAINER_CLEANFILES)" || rm -f $(MAINTAINER_CLEANFILES)
306 info:
308 dvi:
310 distdir=$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
312 DISTLIST: gendistlist.sh
313 sh $(srcdir)/gendistlist.sh > $(srcdir)/DISTLIST
315 distdir: DISTLIST
316 -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
317 $(mkinstalldirs) $(distdir)
318 for i in `cat $(srcdir)/DISTLIST`; do \
319 dir=`echo "$$i" | sed 's:/[^/]*$$::'`; \
320 if test -d $(srcdir)/$$dir; then \
321 $(mkinstalldirs) $(distdir)/$$dir; \
322 fi; \
323 cp -p $(srcdir)/$$i $(distdir)/$$i || exit 1; \
324 done
325 chmod -R a+r $(distdir)
327 GZIP_ENV = --best
329 dist: distdir
330 tar chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
331 -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
333 distcheck: dist
334 -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
335 GZIP=$(GZIP_ENV) gzip -cd $(distdir).tar.gz | tar xf -
336 chmod -R a-w $(distdir)
337 chmod a+w $(distdir)
338 mkdir $(distdir)/=build
339 mkdir $(distdir)/=inst
340 chmod a-w $(distdir)
341 dc_instdir=`CDPATH=: && cd $(distdir)/=inst && pwd` \
342 && cd $(distdir)/=build \
343 && ../configure --srcdir=.. --prefix=$$dc_instdir \
344 && $(MAKE) all dvi check install && $(MAKE) uninstall \
345 && (test `find $$dc_instdir -type f -print | wc -l` -le 1 \
346 || (echo "Error: files left after uninstall" 1>&2; \
347 exit 1)) \
348 && $(MAKE) dist && $(MAKE) distclean \
349 && rm -f $(distdir).tar.gz \
350 && (test `find . -type f -print | wc -l` -eq 0 \
351 || (echo "Error: files left after distclean" 1>&2; \
352 exit 1))
353 -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
354 @echo "$(distdir).tar.gz is ready for distribution" | \
355 sed 'h;s/./=/g;p;x;p;x'
357 check:
359 .SUFFIX:
360 .SUFFIX: .c .o .S .d
362 # Regenerate configure and Makefile automatically.
363 $(srcdir)/configure: configure.ac aclocal.m4
364 cd $(srcdir) && autoconf
366 $(srcdir)/config.h.in: stamp-h.in
367 $(srcdir)/stamp-h.in: configure.ac aclocal.m4
368 cd $(srcdir) && autoheader
369 echo timestamp > $(srcdir)/stamp-h.in
371 config.h: stamp-h
372 stamp-h: config.h.in config.status
373 ./config.status
375 Makefile: Makefile.in config.status
376 ./config.status
378 config.status: configure
379 ./config.status --recheck
381 gensymlist.sh: gensymlist.sh.in config.status
382 ./config.status
384 genkernsyms.sh: genkernsyms.sh.in config.status
385 ./config.status
387 .PHONY: all install install-strip uninstall clean mostlyclean distclean
388 .PHONY: maintainer-clean info dvi dist check
390 # Prevent an overflow.
391 .NOEXPORT:
393 .DELETE_ON_ERROR: