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
14 ### The configure script will replace these variables.
20 transform
= @program_transform_name@
24 top_srcdir
= @top_srcdir@
27 exec_prefix = @
exec_prefix@
31 libexecdir
= @libexecdir@
32 datarootdir
= @datarootdir@
34 sysconfdir
= @sysconfdir@
35 sharedstatedir
= @sharedstatedir@
36 localstatedir
= @localstatedir@
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@
51 host_kernel
= @host_kernel@
54 target_cpu
= @target_cpu@
58 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
59 INSTALL_DATA
= @INSTALL_DATA@
60 INSTALL_SCRIPT
= @INSTALL_SCRIPT@
61 INSTALL_STRIP_PROGRAM
= @INSTALL_STRIP_PROGRAM@
63 mkinstalldirs
= $(srcdir)/mkinstalldirs
68 CPPFLAGS
= @CPPFLAGS@
-I
$(builddir
) -I
$(builddir
)/include -I
$(srcdir)/include -Wall
-W \
69 -DGRUB_LIBDIR
=\"$(pkglibdir
)\"
70 TARGET_CC
= @TARGET_CC@
71 TARGET_CFLAGS
= @TARGET_CFLAGS@
72 TARGET_CPPFLAGS
= @TARGET_CPPFLAGS@
-I
$(builddir
) -I
$(builddir
)/include -I
$(srcdir)/include \
74 TARGET_LDFLAGS
= @TARGET_LDFLAGS@
75 TARGET_IMG_LDSCRIPT
= @TARGET_IMG_LDSCRIPT@
76 TARGET_IMG_LDFLAGS
= @TARGET_IMG_LDFLAGS@
77 TARGET_OBJ2ELF
= @TARGET_OBJ2ELF@
87 HELP2MAN
:= LANG
=C
$(HELP2MAN
) --no-info
--source
=FSF
90 LIBCURSES
= @LIBCURSES@
93 UNIFONT_BDF
= @UNIFONT_BDF@
96 enable_grub_emu
= @enable_grub_emu@
97 enable_grub_emu_usb
= @enable_grub_emu_usb@
98 enable_grub_fstest
= @enable_grub_fstest@
99 enable_grub_pe2elf
= @enable_grub_pe2elf@
100 enable_lzo
= @enable_lzo@
101 enable_grub_mkfont
= @enable_grub_mkfont@
102 freetype_cflags
= @freetype_cflags@
103 freetype_libs
= @freetype_libs@
105 ### General variables.
107 RMKFILES
= $(addprefix conf
/,common.rmk i386-coreboot.rmk i386-efi.rmk \
108 i386-ieee1275.rmk i386-pc.rmk i386.rmk powerpc-ieee1275.rmk \
109 sparc64-ieee1275.rmk x86_64-efi.rmk
)
111 MKFILES
= $(patsubst %.rmk
,%.mk
,$(RMKFILES
))
113 PKGLIB
= $(pkglib_IMAGES
) $(pkglib_MODULES
) $(pkglib_PROGRAMS
) \
114 $(pkglib_DATA
) $(lib_DATA
) $(pkglib_BUILDDIR
)
115 PKGDATA
= $(pkgdata_DATA
) $(pkgdata_SRCDIR
)
116 PROGRAMS
= $(bin_UTILITIES
) $(sbin_UTILITIES
)
117 SCRIPTS
= $(bin_SCRIPTS
) $(sbin_SCRIPTS
) $(grub-mkconfig_SCRIPTS
)
121 DISTCLEANFILES
= config.status config.cache config.log config.h \
122 Makefile stamp-h
include/grub
/cpu
include/grub
/machine \
123 gensymlist.sh genkernsyms.sh build_env.mk
124 MAINTAINER_CLEANFILES
= $(srcdir)/configure
$(addprefix $(srcdir)/,$(MKFILES
))
126 # The default target.
129 ### Include an arch-specific Makefile.
130 $(addprefix $(srcdir)/,$(MKFILES
)): %.mk
: %.rmk genmk.rb
131 if
test "x$(RUBY)" = x
; then \
134 $(RUBY
) $(srcdir)/genmk.rb
< $< > $@
; \
137 include $(srcdir)/conf
/$(target_cpu
)-$(platform
).mk
141 CLEANFILES
+= $(pkglib_DATA
) $(pkgdata_DATA
)
142 pkglib_DATA
+= moddep.lst command.lst fs.lst partmap.lst
143 moddep.lst
: $(DEFSYMFILES
) $(UNDSYMFILES
) genmoddep.awk
144 cat
$(DEFSYMFILES
) /dev
/null \
145 |
$(AWK
) -f
$(srcdir)/genmoddep.awk
$(UNDSYMFILES
) > $@ \
146 ||
(rm -f
$@
; exit
1)
148 command.lst
: $(COMMANDFILES
)
149 cat
$^
/dev
/null |
sort > $@
152 cat
$^
/dev
/null |
sort > $@
154 partmap.lst
: $(PARTMAPFILES
)
155 cat
$^
/dev
/null |
sort > $@
157 ifeq (, $(UNIFONT_BDF
))
160 ifeq ($(enable_grub_mkfont
),yes
)
162 pkgdata_DATA
+= unicode.pf2 ascii.pf2
164 # Arrows and lines are needed to draw the menu, so we always include them
165 UNICODE_ARROWS
=0x2190-0x2193
166 UNICODE_LINES
=0x2501-0x251B
168 unicode.pf2
: $(UNIFONT_BDF
) grub-mkfont
169 $(builddir
)/grub-mkfont
-o
$@
$(UNIFONT_BDF
)
171 ascii.pf2
: $(UNIFONT_BDF
) grub-mkfont
172 $(builddir
)/grub-mkfont
-o
$@
$(UNIFONT_BDF
) -r
0x0-0x7f,$(UNICODE_ARROWS
),$(UNICODE_LINES
)
176 # Used for building modules externally
177 pkglib_BUILDDIR
+= build_env.mk
178 build_env.mk
: Makefile
180 echo
"TARGET_CC=$(TARGET_CC)" ; \
181 echo
"TARGET_CFLAGS=$(TARGET_CFLAGS)" ; \
182 echo
"TARGET_CPPFLAGS=$(TARGET_CPPFLAGS) -I$(pkglibdir)" ; \
183 echo
"STRIP=$(STRIP)" ; \
184 echo
"COMMON_ASFLAGS=$(COMMON_ASFLAGS)" ; \
185 echo
"COMMON_CFLAGS=$(COMMON_CFLAGS)" ; \
186 echo
"COMMON_LDFLAGS=$(COMMON_LDFLAGS)"\
188 pkglib_BUILDDIR
+= config.h grub_script.tab.h
189 pkgdata_SRCDIR
+= genmodsrc.sh genmk.rb
190 include_DATA
+= $(shell find
$(srcdir)/include -name \
*.h | sed
-e
"s,^$(srcdir)/,,g") include/grub
/cpu
192 all-local
: $(PROGRAMS
) $(PKGLIB
) $(PKGDATA
) $(SCRIPTS
) $(MKFILES
)
194 install: install-local
197 $(mkinstalldirs
) $(DESTDIR
)$(pkglibdir
)
199 for file in
$$list; do \
200 if
test -f
"$$file"; then
dir=; else dir="$(srcdir)/"; fi
; \
201 dest
="`echo $$file | sed 's,.*/,,'`"; \
202 $(INSTALL_DATA
) $$dir$$file $(DESTDIR
)$(pkglibdir
)/$$dest; \
204 $(mkinstalldirs
) $(DESTDIR
)$(includedir)
205 @list
='$(include_DATA)'; \
206 for file in
$$list; do \
207 if
test -f
"$$file"; then
dir=; else dir="$(srcdir)/"; fi
; \
208 dest
="`echo $$file | sed 's,include/,,'`"; \
209 destdir
="`echo $$dest | sed 's,\(^\|/\)[^/]*$$,,g'`"; \
210 $(mkinstalldirs
) $(DESTDIR
)$(includedir)/$$destdir; \
211 if
test -f
"$$dir$$file"; then \
212 $(INSTALL_DATA
) $$dir$$file $(DESTDIR
)$(includedir)/$$dest; \
213 elif
test -L
"$$dir$$file"; then \
214 cp
-d
$$dir$$file $(DESTDIR
)$(includedir)/$$dest; \
217 $(mkinstalldirs
) $(DESTDIR
)$(pkgdatadir
)
218 @list
='$(PKGDATA)'; \
219 for file in
$$list; do \
220 if
test -f
"$$file"; then
dir=; else dir="$(srcdir)/"; fi
; \
221 dest
="`echo $$file | sed 's,.*/,,'`"; \
222 $(INSTALL_DATA
) $$dir$$file $(DESTDIR
)$(pkgdatadir
)/$$dest; \
224 $(mkinstalldirs
) $(DESTDIR
)$(bindir) $(DESTDIR
)$(mandir)/man1
225 @list
='$(bin_UTILITIES)'; for file in
$$list; do \
226 if
test -f
"$$file"; then
dir=; else dir="$(srcdir)/"; fi
; \
227 dest
="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
228 $(INSTALL_PROGRAM
) $$dir$$file $(DESTDIR
)$(bindir)/$$dest; \
229 $(HELP2MAN
) --section
=1 $(builddir
)/$$file > $(DESTDIR
)$(mandir)/man1
/$$dest.1; \
231 $(mkinstalldirs
) $(DESTDIR
)$(sbindir
) $(DESTDIR
)$(mandir)/man8
232 @list
='$(sbin_UTILITIES)'; for file in
$$list; do \
233 if
test -f
"$$file"; then
dir=; else dir="$(srcdir)/"; fi
; \
234 dest
="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
235 $(INSTALL_PROGRAM
) $$dir$$file $(DESTDIR
)$(sbindir
)/$$dest; \
236 $(HELP2MAN
) --section
=8 $(builddir
)/$$file > $(DESTDIR
)$(mandir)/man8
/$$dest.8; \
238 @list
='$(bin_SCRIPTS)'; for file in
$$list; do \
239 if
test -f
"$$file"; then
dir=; else dir="$(srcdir)/"; fi
; \
240 dest
="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
241 $(INSTALL_SCRIPT
) $$dir$$file $(DESTDIR
)$(bindir)/$$dest; \
242 $(HELP2MAN
) --section
=1 $(builddir
)/$$file > $(DESTDIR
)$(mandir)/man1
/$$dest.1; \
244 @list
='$(sbin_SCRIPTS)'; for file in
$$list; do \
245 if
test -f
"$$file"; then
dir=; else dir="$(srcdir)/"; fi
; \
246 dest
="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
247 $(INSTALL_SCRIPT
) $$dir$$file $(DESTDIR
)$(sbindir
)/$$dest; \
248 $(HELP2MAN
) --section
=8 $(builddir
)/$$file > $(DESTDIR
)$(mandir)/man8
/$$dest.8; \
250 $(mkinstalldirs
) $(DESTDIR
)$(sysconfdir
)/grub.d
251 @list
='$(grub-mkconfig_SCRIPTS)'; for file in
$$list; do \
252 if
test -f
"$$file"; then
dir=; else dir="$(srcdir)/"; fi
; \
253 dest
="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
254 $(INSTALL_SCRIPT
) $$dir$$file $(DESTDIR
)$(sysconfdir
)/grub.d
/$$dest; \
256 @list
='$(grub-mkconfig_DATA)'; for file in
$$list; do \
257 if
test -f
"$$file"; then
dir=; else dir="$(srcdir)/"; fi
; \
258 dest
="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
259 $(INSTALL_DATA
) $$dir$$file $(DESTDIR
)$(sysconfdir
)/grub.d
/$$dest; \
261 $(mkinstalldirs
) $(DESTDIR
)$(libdir)/grub
262 @list
='$(lib_DATA)'; \
263 for file in
$$list; do \
264 if
test -f
"$$file"; then
dir=; else dir="$(srcdir)/"; fi
; \
265 dest
="`echo $$file | sed 's,.*/,,'`"; \
266 $(INSTALL_DATA
) $$dir$$file $(DESTDIR
)$(libdir)/grub
/$$dest; \
270 $(MAKE
) INSTALL_PROGRAM
="$(INSTALL_STRIP_PROGRAM)" install
274 for file in
$$list; do \
275 dest
="`echo $$file | sed 's,.*/,,'`"; \
276 rm -f
$(DESTDIR
)$(pkglibdir
)/$$dest; \
278 @list
='$(PKGDATA)'; \
279 for file in
$$list; do \
280 dest
="`echo $$file | sed 's,.*/,,'`"; \
281 rm -f
$(DESTDIR
)$(pkgdatadir
)/$$dest; \
283 @list
='$(bin_UTILITIES) $(bin_SCRIPTS)'; for file in
$$list; do \
284 dest
="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
285 rm -f
$(DESTDIR
)$(bindir)/$$dest; \
287 @list
='$(sbin_UTILITIES) $(sbin_SCRIPTS)'; for file in
$$list; do \
288 dest
="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
289 rm -f
$(DESTDIR
)$(sbindir
)/$$dest; \
291 @list
='$(grub-mkconfig_SCRIPTS) $(grub-mkconfig_DATA)'; for file in
$$list; do \
292 dest
="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
293 rm -f
$(DESTDIR
)$(sysconfdir
)/grub.d
/$$dest; \
297 -test -z
"$(CLEANFILES)" ||
rm -f
$(CLEANFILES
)
300 -test -z
"$(MOSTLYCLEANFILES)" ||
rm -f
$(MOSTLYCLEANFILES
)
302 distclean: mostlyclean
303 -test -z
"$(DISTCLEANFILES)" ||
rm -f
$(DISTCLEANFILES
)
304 -rm -rf
$(srcdir)/autom4te.cache
306 maintainer-clean
: distclean
307 -test -z
"$(MAINTAINER_CLEANFILES)" ||
rm -f
$(MAINTAINER_CLEANFILES
)
313 distdir
=$(PACKAGE_TARNAME
)-$(PACKAGE_VERSION
)
315 DISTLIST
: gendistlist.sh
316 sh
$(srcdir)/gendistlist.sh
> $(srcdir)/DISTLIST
319 -chmod
-R a
+w
$(distdir
) >/dev
/null
2>&1; rm -rf
$(distdir
)
320 $(mkinstalldirs
) $(distdir
)
321 for i in
`cat $(srcdir)/DISTLIST`; do \
322 dir=`echo "$$i" | sed 's:/[^/]*$$::'`; \
323 if
test -d
$(srcdir)/$$dir; then \
324 $(mkinstalldirs
) $(distdir
)/$$dir; \
326 cp
-p
$(srcdir)/$$i $(distdir
)/$$i || exit
1; \
328 chmod
-R a
+r
$(distdir
)
333 tar chof
- $(distdir
) | GZIP
=$(GZIP_ENV
) gzip
-c
>$(distdir
).
tar.gz
334 -chmod
-R a
+w
$(distdir
) >/dev
/null
2>&1; rm -rf
$(distdir
)
337 -chmod
-R a
+w
$(distdir
) >/dev
/null
2>&1; rm -rf
$(distdir
)
338 GZIP
=$(GZIP_ENV
) gzip
-cd
$(distdir
).
tar.gz |
tar xf
-
339 chmod
-R a-w
$(distdir
)
341 mkdir
$(distdir
)/=build
342 mkdir
$(distdir
)/=inst
344 dc_instdir
=`CDPATH=: && cd $(distdir)/=inst && pwd` \
345 && cd
$(distdir
)/=build \
346 && ..
/configure
--srcdir=..
--prefix=$$dc_instdir \
347 && $(MAKE
) all dvi check install && $(MAKE
) uninstall \
348 && (test `find $$dc_instdir -type f -print | wc -l` -le
1 \
349 ||
(echo
"Error: files left after uninstall" 1>&2; \
351 && $(MAKE
) dist && $(MAKE
) distclean \
352 && rm -f
$(distdir
).
tar.gz \
353 && (test `find . -type f -print | wc -l` -eq
0 \
354 ||
(echo
"Error: files left after distclean" 1>&2; \
356 -chmod
-R a
+w
$(distdir
) > /dev
/null
2>&1; rm -rf
$(distdir
)
357 @echo
"$(distdir).tar.gz is ready for distribution" | \
358 sed
'h;s/./=/g;p;x;p;x'
365 # Regenerate configure and Makefile automatically.
366 $(srcdir)/configure
: configure.ac aclocal.m4
367 cd
$(srcdir) && autoconf
369 $(srcdir)/config.h.in
: stamp-h.in
370 $(srcdir)/stamp-h.in
: configure.ac aclocal.m4
371 cd
$(srcdir) && autoheader
372 echo timestamp
> $(srcdir)/stamp-h.in
375 stamp-h
: config.h.in config.status
378 Makefile
: Makefile.in config.status
381 config.status
: configure
382 .
/config.status
--recheck
384 gensymlist.sh
: gensymlist.sh.in config.status
387 genkernsyms.sh
: genkernsyms.sh.in config.status
390 .PHONY
: all install install-strip
uninstall clean mostlyclean distclean
391 .PHONY
: maintainer-clean
info dvi dist check
393 # Prevent an overflow.