Remove executable flag
[grub2/bean.git] / Makefile.in
blob2121431de34e80ec8d316d1dc1549dc72184fec1
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 platform = @platform@
53 INSTALL = @INSTALL@
54 INSTALL_PROGRAM = @INSTALL_PROGRAM@
55 INSTALL_DATA = @INSTALL_DATA@
56 INSTALL_SCRIPT = @INSTALL_SCRIPT@
57 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
59 mkinstalldirs = $(srcdir)/mkinstalldirs
61 CC = @CC@
62 CFLAGS = @CFLAGS@
63 LDFLAGS = @LDFLAGS@
64 CPPFLAGS = @CPPFLAGS@ -I. -Iinclude -I$(srcdir)/include -Wall -W \
65 -DGRUB_LIBDIR=\"$(pkglibdir)\"
66 TARGET_CC = @TARGET_CC@
67 TARGET_CFLAGS = @TARGET_CFLAGS@
68 TARGET_CPPFLAGS = @TARGET_CPPFLAGS@ -I. -Iinclude -I$(srcdir)/include \
69 -Wall -W
70 TARGET_LDFLAGS = @TARGET_LDFLAGS@
71 TARGET_IMG_LDSCRIPT = @TARGET_IMG_LDSCRIPT@
72 TARGET_IMG_LDFLAGS = @TARGET_IMG_LDFLAGS@
73 TARGET_OBJ2ELF = @TARGET_OBJ2ELF@
74 MODULE_LDFLAGS = @MODULE_LDFLAGS@
75 EXEEXT = @EXEEXT@
76 OBJCOPY = @OBJCOPY@
77 STRIP = @STRIP@
78 NM = @NM@
79 RUBY = @RUBY@
80 HELP2MAN = @HELP2MAN@
81 ifeq (, $(HELP2MAN))
82 HELP2MAN = true
83 else
84 HELP2MAN := LANG=C $(HELP2MAN) --no-info --source=FSF
85 endif
86 AWK = @AWK@
87 LIBCURSES = @LIBCURSES@
88 LIBLZO = @LIBLZO@
89 YACC = @YACC@
90 UNIFONT_HEX = @UNIFONT_HEX@
92 # Options.
93 enable_grub_emu = @enable_grub_emu@
94 enable_grub_fstest = @enable_grub_fstest@
95 enable_lzo = @enable_lzo@
97 ### General variables.
99 RMKFILES = $(addprefix conf/,common.rmk i386-pc.rmk powerpc-ieee1275.rmk \
100 sparc64-ieee1275.rmk i386-efi.rmk i386-ieee1275.rmk i386-coreboot.rmk)
101 MKFILES = $(patsubst %.rmk,%.mk,$(RMKFILES))
103 PKGLIB = $(pkglib_IMAGES) $(pkglib_MODULES) $(pkglib_PROGRAMS) \
104 $(pkglib_DATA) $(lib_DATA)
105 PKGDATA = $(pkgdata_DATA)
106 PROGRAMS = $(bin_UTILITIES) $(sbin_UTILITIES)
107 SCRIPTS = $(bin_SCRIPTS) $(sbin_SCRIPTS) $(update-grub_SCRIPTS)
109 CLEANFILES =
110 MOSTLYCLEANFILES =
111 DISTCLEANFILES = config.status config.cache config.log config.h \
112 Makefile stamp-h include/grub/cpu include/grub/machine \
113 gensymlist.sh genkernsyms.sh
114 MAINTAINER_CLEANFILES = $(srcdir)/configure $(addprefix $(srcdir)/,$(MKFILES))
116 # The default target.
117 all: all-local
119 ### Include an arch-specific Makefile.
120 $(addprefix $(srcdir)/,$(MKFILES)): %.mk: %.rmk genmk.rb
121 if test "x$(RUBY)" = x; then \
122 touch $@; \
123 else \
124 $(RUBY) $(srcdir)/genmk.rb < $< > $@; \
127 include $(srcdir)/conf/$(target_cpu)-$(platform).mk
129 ### General targets.
131 CLEANFILES += $(pkglib_DATA) $(pkgdata_DATA)
132 pkglib_DATA += moddep.lst command.lst fs.lst partmap.lst
133 moddep.lst: $(DEFSYMFILES) $(UNDSYMFILES) genmoddep.awk
134 cat $(DEFSYMFILES) /dev/null \
135 | $(AWK) -f $(srcdir)/genmoddep.awk $(UNDSYMFILES) > $@ \
136 || (rm -f $@; exit 1)
138 command.lst: $(COMMANDFILES)
139 cat $^ /dev/null | sort > $@
141 fs.lst: $(FSFILES)
142 cat $^ /dev/null | sort > $@
144 partmap.lst: $(PARTMAPFILES)
145 cat $^ /dev/null | sort > $@
147 ifeq (, $(UNIFONT_HEX))
148 else
149 pkgdata_DATA += unicode.pff ascii.pff
151 # Arrows and lines are needed to draw the menu, so we always include them
152 UNICODE_ARROWS=0x2190-0x2193
153 UNICODE_LINES=0x2501-0x251B
155 unicode.pff: $(UNIFONT_HEX)
156 ruby $(srcdir)/util/unifont2pff.rb $(UNIFONT_HEX) > $@
158 ascii.pff: $(UNIFONT_HEX)
159 ruby $(srcdir)/util/unifont2pff.rb 0x0-0x7f $(UNICODE_ARROWS) $(UNICODE_LINES) $(UNIFONT_HEX) > $@
160 endif
162 all-local: $(PROGRAMS) $(PKGLIB) $(PKGDATA) $(SCRIPTS) $(MKFILES)
164 install: install-local
166 install-local: all
167 $(mkinstalldirs) $(DESTDIR)$(pkglibdir)
168 @list='$(PKGLIB)'; \
169 for file in $$list; do \
170 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
171 dest="`echo $$file | sed 's,.*/,,'`"; \
172 $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(pkglibdir)/$$dest; \
173 done
174 $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
175 @list='$(PKGDATA)'; \
176 for file in $$list; do \
177 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
178 dest="`echo $$file | sed 's,.*/,,'`"; \
179 $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(pkgdatadir)/$$dest; \
180 done
181 $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1
182 @list='$(bin_UTILITIES)'; for file in $$list; do \
183 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
184 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
185 $(INSTALL_PROGRAM) $$dir$$file $(DESTDIR)$(bindir)/$$dest; \
186 $(HELP2MAN) --section=1 $(builddir)/$$file > $(DESTDIR)$(mandir)/man1/$$dest.1; \
187 done
188 $(mkinstalldirs) $(DESTDIR)$(sbindir) $(DESTDIR)$(mandir)/man8
189 @list='$(sbin_UTILITIES)'; for file in $$list; do \
190 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
191 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
192 $(INSTALL_PROGRAM) $$dir$$file $(DESTDIR)$(sbindir)/$$dest; \
193 $(HELP2MAN) --section=8 $(builddir)/$$file > $(DESTDIR)$(mandir)/man8/$$dest.8; \
194 done
195 @list='$(bin_SCRIPTS)'; for file in $$list; do \
196 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
197 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
198 $(INSTALL_SCRIPT) $$dir$$file $(DESTDIR)$(bindir)/$$dest; \
199 $(HELP2MAN) --section=1 $(builddir)/$$file > $(DESTDIR)$(mandir)/man1/$$dest.1; \
200 done
201 @list='$(sbin_SCRIPTS)'; for file in $$list; do \
202 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
203 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
204 $(INSTALL_SCRIPT) $$dir$$file $(DESTDIR)$(sbindir)/$$dest; \
205 $(HELP2MAN) --section=8 $(builddir)/$$file > $(DESTDIR)$(mandir)/man8/$$dest.8; \
206 done
207 $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/grub.d
208 @list='$(update-grub_SCRIPTS)'; for file in $$list; do \
209 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
210 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
211 $(INSTALL_SCRIPT) $$dir$$file $(DESTDIR)$(sysconfdir)/grub.d/$$dest; \
212 done
213 @list='$(update-grub_DATA)'; for file in $$list; do \
214 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
215 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
216 $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(sysconfdir)/grub.d/$$dest; \
217 done
218 $(mkinstalldirs) $(DESTDIR)$(libdir)/grub
219 @list='$(lib_DATA)'; \
220 for file in $$list; do \
221 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
222 dest="`echo $$file | sed 's,.*/,,'`"; \
223 $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(libdir)/grub/$$dest; \
224 done
226 install-strip:
227 $(MAKE) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" install
229 uninstall:
230 @list='$(PKGLIB)'; \
231 for file in $$list; do \
232 dest="`echo $$file | sed 's,.*/,,'`"; \
233 rm -f $(DESTDIR)$(pkglibdir)/$$dest; \
234 done
235 @list='$(PKGDATA)'; \
236 for file in $$list; do \
237 dest="`echo $$file | sed 's,.*/,,'`"; \
238 rm -f $(DESTDIR)$(pkgdatadir)/$$dest; \
239 done
240 @list='$(bin_UTILITIES) $(bin_SCRIPTS)'; for file in $$list; do \
241 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
242 rm -f $(DESTDIR)$(bindir)/$$dest; \
243 done
244 @list='$(sbin_UTILITIES) $(sbin_SCRIPTS)'; for file in $$list; do \
245 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
246 rm -f $(DESTDIR)$(sbindir)/$$dest; \
247 done
248 @list='$(update-grub_SCRIPTS) $(update-grub_DATA)'; for file in $$list; do \
249 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
250 rm -f $(DESTDIR)$(sysconfdir)/grub.d/$$dest; \
251 done
253 clean:
254 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
256 mostlyclean: clean
257 -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
259 distclean: mostlyclean
260 -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
261 -rm -rf $(srcdir)/autom4te.cache
263 maintainer-clean: distclean
264 -test -z "$(MAINTAINER_CLEANFILES)" || rm -f $(MAINTAINER_CLEANFILES)
266 info:
268 dvi:
270 distdir=$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
272 DISTLIST: gendistlist.sh
273 sh $(srcdir)/gendistlist.sh > $(srcdir)/DISTLIST
275 distdir: DISTLIST
276 -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
277 $(mkinstalldirs) $(distdir)
278 for i in `cat $(srcdir)/DISTLIST`; do \
279 dir=`echo "$$i" | sed 's:/[^/]*$$::'`; \
280 if test -d $(srcdir)/$$dir; then \
281 $(mkinstalldirs) $(distdir)/$$dir; \
282 fi; \
283 cp -p $(srcdir)/$$i $(distdir)/$$i || exit 1; \
284 done
285 chmod -R a+r $(distdir)
287 GZIP_ENV = --best
289 dist: distdir
290 tar chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
291 -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
293 distcheck: dist
294 -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
295 GZIP=$(GZIP_ENV) gzip -cd $(distdir).tar.gz | tar xf -
296 chmod -R a-w $(distdir)
297 chmod a+w $(distdir)
298 mkdir $(distdir)/=build
299 mkdir $(distdir)/=inst
300 chmod a-w $(distdir)
301 dc_instdir=`CDPATH=: && cd $(distdir)/=inst && pwd` \
302 && cd $(distdir)/=build \
303 && ../configure --srcdir=.. --prefix=$$dc_instdir \
304 && $(MAKE) all dvi check install && $(MAKE) uninstall \
305 && (test `find $$dc_instdir -type f -print | wc -l` -le 1 \
306 || (echo "Error: files left after uninstall" 1>&2; \
307 exit 1)) \
308 && $(MAKE) dist && $(MAKE) distclean \
309 && rm -f $(distdir).tar.gz \
310 && (test `find . -type f -print | wc -l` -eq 0 \
311 || (echo "Error: files left after distclean" 1>&2; \
312 exit 1))
313 -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
314 @echo "$(distdir).tar.gz is ready for distribution" | \
315 sed 'h;s/./=/g;p;x;p;x'
317 check:
319 .SUFFIX:
320 .SUFFIX: .c .o .S .d
322 # Regenerate configure and Makefile automatically.
323 $(srcdir)/configure: configure.ac aclocal.m4
324 cd $(srcdir) && autoconf
326 $(srcdir)/config.h.in: stamp-h.in
327 $(srcdir)/stamp-h.in: configure.ac aclocal.m4
328 cd $(srcdir) && autoheader
329 echo timestamp > $(srcdir)/stamp-h.in
331 config.h: stamp-h
332 stamp-h: config.h.in config.status
333 ./config.status
335 Makefile: Makefile.in config.status
336 ./config.status
338 config.status: configure
339 ./config.status --recheck
341 gensymlist.sh: gensymlist.sh.in config.status
342 ./config.status
344 genkernsyms.sh: genkernsyms.sh.in config.status
345 ./config.status
347 .PHONY: all install install-strip uninstall clean mostlyclean distclean
348 .PHONY: maintainer-clean info dvi dist check
350 # Prevent an overflow.
351 .NOEXPORT:
353 .DELETE_ON_ERROR: