3 # Copyright (C) 1994,1995,1996,1997,1998,1999,2000,2001,2002,2004,2005,2006,2007,2008,2009 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@
64 mkinstalldirs
= $(srcdir)/mkinstalldirs
70 CPPFLAGS
= @CPPFLAGS@
-I
$(builddir
) -I
$(builddir
)/include -I
$(srcdir)/include -Wall
-W \
71 -DGRUB_LIBDIR
=\"$(pkglibdir
)\"
72 TARGET_CC
= @TARGET_CC@
73 TARGET_CFLAGS
= @TARGET_CFLAGS@
74 TARGET_ASFLAGS
= @TARGET_ASFLAGS@
75 TARGET_MODULE_FORMAT
= @TARGET_MODULE_FORMAT@
76 TARGET_APPLE_CC
= @TARGET_APPLE_CC@
78 TARGET_CPPFLAGS
= @TARGET_CPPFLAGS@
-isystem
=$(srcdir)/include -I
$(srcdir)/include -I
$(builddir
) -I
$(builddir
)/include \
80 TARGET_LDFLAGS
= @TARGET_LDFLAGS@
81 TARGET_IMG_LDSCRIPT
= @TARGET_IMG_LDSCRIPT@
82 TARGET_IMG_LDFLAGS
= @TARGET_IMG_LDFLAGS@
83 TARGET_IMG_CFLAGS
= @TARGET_IMG_CFLAGS@
84 TARGET_OBJ2ELF
= @TARGET_OBJ2ELF@
98 HELP2MAN
:= LANG
=C
$(HELP2MAN
) --no-info
--source
=FSF
101 LIBCURSES
= @LIBCURSES@
104 UNIFONT_BDF
= @UNIFONT_BDF@
107 enable_grub_emu
= @enable_grub_emu@
108 enable_grub_emu_usb
= @enable_grub_emu_usb@
109 enable_grub_fstest
= @enable_grub_fstest@
110 enable_grub_pe2elf
= @enable_grub_pe2elf@
111 enable_grub_mkfont
= @enable_grub_mkfont@
112 freetype_cflags
= @freetype_cflags@
113 freetype_libs
= @freetype_libs@
114 enable_efiemu
= @enable_efiemu@
116 ### General variables.
118 RMKFILES
= $(wildcard conf
/*.rmk
)
120 MKFILES
= $(patsubst %.rmk
,%.mk
,$(RMKFILES
))
122 PKGLIB
= $(pkglib_IMAGES
) $(pkglib_MODULES
) $(pkglib_PROGRAMS
) \
123 $(pkglib_DATA
) $(pkglib_BUILDDIR
)
124 PKGDATA
= $(pkgdata_DATA
)
125 PROGRAMS
= $(bin_UTILITIES
) $(sbin_UTILITIES
)
126 SCRIPTS
= $(bin_SCRIPTS
) $(sbin_SCRIPTS
) $(grub-mkconfig_SCRIPTS
) \
128 INFOS
= $(info_INFOS
)
132 DISTCLEANFILES
= config.status config.cache config.log config.h \
133 Makefile stamp-h
include/grub
/cpu
include/grub
/machine \
134 gensymlist.sh genkernsyms.sh build_env.mk
135 MAINTAINER_CLEANFILES
= $(srcdir)/configure
$(addprefix $(srcdir)/,$(MKFILES
)) \
136 $(srcdir)/DISTLIST
$(srcdir)/config.h.in
$(srcdir)/stamp-h.in
$(INFOS
)
138 # The default target.
141 ### Include an arch-specific Makefile.
142 $(addprefix $(srcdir)/,$(MKFILES
)): %.mk
: %.rmk genmk.rb
143 if
test "x$(RUBY)" = x
; then \
146 $(RUBY
) $(srcdir)/genmk.rb
< $< > $@
; \
149 include $(srcdir)/conf
/$(target_cpu
)-$(platform
).mk
151 # For external modules.
152 -include $(wildcard $(GRUB_CONTRIB
)/*/conf
/common.mk
)
156 CLEANFILES
+= $(pkglib_DATA
) $(pkgdata_DATA
)
157 pkglib_DATA
+= moddep.lst command.lst fs.lst partmap.lst parttool.lst handler.lst
158 moddep.lst
: $(DEFSYMFILES
) $(UNDSYMFILES
) genmoddep.awk
159 cat
$(DEFSYMFILES
) /dev
/null \
160 |
$(AWK
) -f
$(srcdir)/genmoddep.awk
$(UNDSYMFILES
) > $@ \
161 ||
(rm -f
$@
; exit
1)
163 command.lst
: $(COMMANDFILES
)
164 cat
$^
/dev
/null |
sort > $@
167 cat
$^
/dev
/null |
sort > $@
169 partmap.lst
: $(PARTMAPFILES
)
170 cat
$^
/dev
/null |
sort > $@
172 handler.lst
: $(HANDLERFILES
)
173 cat
$^
/dev
/null |
sort > $@
175 parttool.lst
: $(PARTTOOLFILES
)
176 cat
$^
/dev
/null |
sort | uniq
> $@
178 ifneq (true
, $(MAKEINFO
))
179 info_INFOS
+= docs
/grub.
info
182 MOSTLYCLEANFILES
+= vti.tmp
183 MAINTAINER_CLEANFILES
+= docs
/stamp-vti docs
/version.texi
184 docs
/version.texi
: docs
/stamp-vti
185 docs
/stamp-vti
: docs
/grub.texi configure.ac
187 (set
`$(SHELL) $(srcdir)/docs/mdate-sh $<`; \
188 echo
"@set UPDATED $$1 $$2 $$3"; \
189 echo
"@set UPDATED-MONTH $$2 $$3"; \
190 echo
"@set EDITION $(PACKAGE_VERSION)"; \
191 echo
"@set VERSION $(PACKAGE_VERSION)") > vti.tmp
192 @cmp
-s vti.tmp
$(builddir
)/docs
/version.texi \
193 ||
(echo
"Updating $(builddir)/docs/version.texi"; \
194 cp vti.tmp
$(builddir
)/docs
/version.texi
)
196 @cp
$(builddir
)/docs
/version.texi
$@
198 # Use --force until such time as the documentation is cleaned up.
199 docs
/grub.
info: docs
/grub.texi docs
/version.texi docs
/fdl.texi
201 -$(MAKEINFO
) -P
$(builddir
)/docs
--no-split
--force $< -o
$@
203 ifeq (, $(UNIFONT_BDF
))
206 ifeq ($(enable_grub_mkfont
),yes
)
208 pkgdata_DATA
+= unicode.pf2 ascii.pf2
210 # Arrows and lines are needed to draw the menu, so we always include them
211 UNICODE_ARROWS
=0x2190-0x2193
212 UNICODE_LINES
=0x2501-0x251B
214 unicode.pf2
: $(UNIFONT_BDF
) grub-mkfont
215 $(builddir
)/grub-mkfont
-o
$@
$(UNIFONT_BDF
)
217 ascii.pf2
: $(UNIFONT_BDF
) grub-mkfont
218 $(builddir
)/grub-mkfont
-o
$@
$(UNIFONT_BDF
) -r
0x0-0x7f,$(UNICODE_ARROWS
),$(UNICODE_LINES
)
222 # Used for building modules externally
223 pkglib_BUILDDIR
+= build_env.mk
224 build_env.mk
: Makefile
226 echo
"TARGET_CC=$(TARGET_CC)" ; \
227 echo
"TARGET_CFLAGS=$(TARGET_CFLAGS)" ; \
228 echo
"TARGET_ASFLAGS=$(TARGET_ASFLAGS)" ; \
229 echo
"TARGET_CPPFLAGS=$(TARGET_CPPFLAGS) -I$(pkglibdir) -I$(includedir)" ; \
230 echo
"STRIP=$(STRIP)" ; \
231 echo
"OBJCONV=$(OBJCONV)" ; \
232 echo
"TARGET_MODULE_FORMAT=$(TARGET_MODULE_FORMAT)" ; \
233 echo
"TARGET_APPLE_CC=$(TARGET_APPLE_CC)" ; \
234 echo
"COMMON_ASFLAGS=$(COMMON_ASFLAGS)" ; \
235 echo
"COMMON_CFLAGS=$(COMMON_CFLAGS)" ; \
236 echo
"COMMON_LDFLAGS=$(COMMON_LDFLAGS)"\
238 pkglib_BUILDDIR
+= config.h grub_script.tab.h
240 all-local
: $(PROGRAMS
) $(PKGLIB
) $(PKGDATA
) $(SCRIPTS
) $(INFOS
) $(MKFILES
)
242 install: install-local
245 $(SHELL
) $(mkinstalldirs
) $(DESTDIR
)$(pkglibdir
)
246 rm -f
$(DESTDIR
)$(pkglibdir
)/*
248 for file in
$$list; do \
249 if
test -f
"$$file"; then
dir=; else dir="$(srcdir)/"; fi
; \
250 dest
="`echo $$file | sed 's,.*/,,'`"; \
251 $(INSTALL_DATA
) $$dir$$file $(DESTDIR
)$(pkglibdir
)/$$dest; \
253 $(SHELL
) $(mkinstalldirs
) $(DESTDIR
)$(pkgdatadir
)
254 @list
='$(PKGDATA)'; \
255 for file in
$$list; do \
256 if
test -f
"$$file"; then
dir=; else dir="$(srcdir)/"; fi
; \
257 dest
="`echo $$file | sed 's,.*/,,'`"; \
258 $(INSTALL_DATA
) $$dir$$file $(DESTDIR
)$(pkgdatadir
)/$$dest; \
260 $(SHELL
) $(mkinstalldirs
) $(DESTDIR
)$(bindir) $(DESTDIR
)$(mandir)/man1
261 @list
='$(bin_UTILITIES)'; for file in
$$list; do \
262 if
test -f
"$$file"; then
dir=; else dir="$(srcdir)/"; fi
; \
263 dest
="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
264 $(INSTALL_PROGRAM
) $$dir$$file $(DESTDIR
)$(bindir)/$$dest; \
265 $(HELP2MAN
) --section
=1 -o
$(DESTDIR
)$(mandir)/man1
/$$dest.1 $(builddir
)/$$file; \
267 $(SHELL
) $(mkinstalldirs
) $(DESTDIR
)$(sbindir
) $(DESTDIR
)$(mandir)/man8
268 @list
='$(sbin_UTILITIES)'; for file in
$$list; do \
269 if
test -f
"$$file"; then
dir=; else dir="$(srcdir)/"; fi
; \
270 dest
="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
271 $(INSTALL_PROGRAM
) $$dir$$file $(DESTDIR
)$(sbindir
)/$$dest; \
272 $(HELP2MAN
) --section
=8 -o
$(DESTDIR
)$(mandir)/man8
/$$dest.8 $(builddir
)/$$file; \
274 @list
='$(bin_SCRIPTS)'; for file in
$$list; do \
275 if
test -f
"$$file"; then
dir=; else dir="$(srcdir)/"; fi
; \
276 dest
="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
277 $(INSTALL_SCRIPT
) $$dir$$file $(DESTDIR
)$(bindir)/$$dest; \
278 $(HELP2MAN
) --section
=1 -o
$(DESTDIR
)$(mandir)/man1
/$$dest.1 $(builddir
)/$$file; \
280 @list
='$(sbin_SCRIPTS)'; for file in
$$list; do \
281 if
test -f
"$$file"; then
dir=; else dir="$(srcdir)/"; fi
; \
282 dest
="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
283 $(INSTALL_SCRIPT
) $$dir$$file $(DESTDIR
)$(sbindir
)/$$dest; \
284 $(HELP2MAN
) --section
=8 -o
$(DESTDIR
)$(mandir)/man8
/$$dest.8 $(builddir
)/$$file; \
286 $(SHELL
) $(mkinstalldirs
) $(DESTDIR
)$(sysconfdir
)/grub.d
287 @list
='$(grub-mkconfig_SCRIPTS)'; for file in
$$list; do \
288 if
test -f
"$$file"; then
dir=; else dir="$(srcdir)/"; fi
; \
289 dest
="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
290 $(INSTALL_SCRIPT
) $$dir$$file $(DESTDIR
)$(sysconfdir
)/grub.d
/$$dest; \
292 @list
='$(grub-mkconfig_DATA)'; for file in
$$list; do \
293 if
test -f
"$$file"; then
dir=; else dir="$(srcdir)/"; fi
; \
294 dest
="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
295 $(INSTALL_DATA
) $$dir$$file $(DESTDIR
)$(sysconfdir
)/grub.d
/$$dest; \
297 $(SHELL
) $(mkinstalldirs
) $(DESTDIR
)$(libdir)/grub
298 @list
='$(lib_SCRIPTS)'; \
299 for file in
$$list; do \
300 if
test -f
"$$file"; then
dir=; else dir="$(srcdir)/"; fi
; \
301 dest
="`echo $$file | sed 's,.*/,,'`"; \
302 $(INSTALL_DATA
) $$dir$$file $(DESTDIR
)$(libdir)/grub
/$$dest; \
304 $(SHELL
) $(mkinstalldirs
) $(DESTDIR
)$(infodir)
305 @list
='$(info_INFOS)'; \
306 for file in
$$list; do \
307 if
test -f
"$$file"; then
dir=; else dir="$(srcdir)/"; fi
; \
308 dest
="`echo $$file | sed 's,.*/,,'`"; \
309 $(INSTALL_DATA
) $$dir$$file $(DESTDIR
)$(infodir); \
310 if
(install-info
--version
&& \
311 install-info
--version
2>&1 | sed
1q | grep
-i
-v debian
) >/dev
/null
2>&1; then \
312 install-info
--info-dir
="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$dest" ||
:; \
317 $(MAKE
) INSTALL_PROGRAM
="$(INSTALL_STRIP_PROGRAM)" install
321 for file in
$$list; do \
322 dest
="`echo $$file | sed 's,.*/,,'`"; \
323 rm -f
$(DESTDIR
)$(pkglibdir
)/$$dest; \
325 @list
='$(PKGDATA)'; \
326 for file in
$$list; do \
327 dest
="`echo $$file | sed 's,.*/,,'`"; \
328 rm -f
$(DESTDIR
)$(pkgdatadir
)/$$dest; \
330 @list
='$(bin_UTILITIES) $(bin_SCRIPTS)'; for file in
$$list; do \
331 dest
="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
332 rm -f
$(DESTDIR
)$(bindir)/$$dest; \
333 rm -f
$(DESTDIR
)$(mandir)/man1
/$$dest.1; \
335 @list
='$(sbin_UTILITIES) $(sbin_SCRIPTS)'; for file in
$$list; do \
336 dest
="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
337 rm -f
$(DESTDIR
)$(sbindir
)/$$dest; \
338 rm -f
$(DESTDIR
)$(mandir)/man8
/$$dest.8; \
340 @list
='$(grub-mkconfig_SCRIPTS) $(grub-mkconfig_DATA)'; for file in
$$list; do \
341 dest
="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
342 rm -f
$(DESTDIR
)$(sysconfdir
)/grub.d
/$$dest; \
344 @list
='$(lib_SCRIPTS)'; \
345 for file in
$$list; do \
346 dest
="`echo $$file | sed 's,.*/,,'`"; \
347 echo
rm -f
$(DESTDIR
)$(libdir)/$$dest; \
348 rm -f
$(DESTDIR
)$(libdir)/grub
/$$dest; \
350 @list
='$(info_INFOS)'; \
351 for file in
$$list; do \
352 dest
="`echo $$file | sed 's,.*/,,'`"; \
353 if
(install-info
--version
&& \
354 install-info
--version
2>&1 | sed
1q | grep
-i
-v debian
) >/dev
/null
2>&1; then \
355 if install-info
--info-dir
="$(DESTDIR)$(infodir)" --remove
"$(DESTDIR)$(infodir)/$$dest"; then \
358 test ! -f
"$(DESTDIR)$(infodir)/$$dest" || exit
1; \
361 rm -f
$(DESTDIR
)$(infodir)/$$dest; \
364 clean: $(CLEAN_IMAGE_TARGETS
) $(CLEAN_MODULE_TARGETS
) $(CLEAN_UTILITY_TARGETS
)
365 -test -z
"$(CLEANFILES)" ||
rm -f
$(CLEANFILES
)
367 mostlyclean: clean $(MOSTLYCLEAN_IMAGE_TARGETS
) $(MOSTLYCLEAN_MODULE_TARGETS
) $(MOSTLYCLEAN_UTILITY_TARGETS
)
368 -test -z
"$(MOSTLYCLEANFILES)" ||
rm -f
$(MOSTLYCLEANFILES
)
370 distclean: mostlyclean
371 -test -z
"$(DISTCLEANFILES)" ||
rm -f
$(DISTCLEANFILES
)
372 -rm -rf
$(srcdir)/autom4te.cache
374 maintainer-clean
: distclean
375 -test -z
"$(MAINTAINER_CLEANFILES)" ||
rm -f
$(MAINTAINER_CLEANFILES
)
381 distdir
=$(PACKAGE_TARNAME
)-$(PACKAGE_VERSION
)
383 DISTLIST
: gendistlist.sh
384 $(SHELL
) $(srcdir)/gendistlist.sh
> $(srcdir)/DISTLIST
387 -chmod
-R a
+w
$(distdir
) >/dev
/null
2>&1; rm -rf
$(distdir
)
388 $(SHELL
) $(mkinstalldirs
) $(distdir
)
389 for i in
`cat $(srcdir)/DISTLIST`; do \
390 dir=`echo "$$i" | sed 's:/[^/]*$$::'`; \
391 if
test -d
$(srcdir)/$$dir; then \
392 $(SHELL
) $(mkinstalldirs
) $(distdir
)/$$dir; \
394 cp
-p
$(srcdir)/$$i $(distdir
)/$$i || exit
1; \
396 chmod
-R a
+r
$(distdir
)
401 tar chof
- $(distdir
) | GZIP
=$(GZIP_ENV
) gzip
-c
>$(distdir
).
tar.gz
402 -chmod
-R a
+w
$(distdir
) >/dev
/null
2>&1; rm -rf
$(distdir
)
405 -chmod
-R a
+w
$(distdir
) >/dev
/null
2>&1; rm -rf
$(distdir
)
406 GZIP
=$(GZIP_ENV
) gzip
-cd
$(distdir
).
tar.gz |
tar xf
-
407 chmod
-R a-w
$(distdir
)
409 mkdir
$(distdir
)/=build
410 mkdir
$(distdir
)/=inst
412 dc_instdir
=`CDPATH=: && cd $(distdir)/=inst && pwd` \
413 && cd
$(distdir
)/=build \
414 && $(SHELL
) ..
/configure
--srcdir=..
--prefix=$$dc_instdir \
415 && $(MAKE
) all dvi check install && $(MAKE
) uninstall \
416 && (test `find $$dc_instdir -type f -print | wc -l` -le
1 \
417 ||
(echo
"Error: files left after uninstall" 1>&2; \
419 && $(MAKE
) dist && $(MAKE
) distclean \
420 && rm -f
$(distdir
).
tar.gz \
421 && (test `find . -type f -print | wc -l` -eq
0 \
422 ||
(echo
"Error: files left after distclean" 1>&2; \
424 -chmod
-R a
+w
$(distdir
) > /dev
/null
2>&1; rm -rf
$(distdir
)
425 @echo
"$(distdir).tar.gz is ready for distribution" | \
426 sed
'h;s/./=/g;p;x;p;x'
433 # Regenerate configure and Makefile automatically.
434 $(srcdir)/configure
: configure.ac aclocal.m4
435 cd
$(srcdir) && autoconf
437 $(srcdir)/config.h.in
: stamp-h.in
438 $(srcdir)/stamp-h.in
: configure.ac aclocal.m4
439 cd
$(srcdir) && autoheader
440 echo timestamp
> $(srcdir)/stamp-h.in
443 stamp-h
: config.h.in config.status
444 $(SHELL
) .
/config.status
446 Makefile
: Makefile.in config.status
447 $(SHELL
) .
/config.status
449 config.status
: configure
450 $(SHELL
) .
/config.status
--recheck
452 gensymlist.sh
: gensymlist.sh.in config.status
453 $(SHELL
) .
/config.status
455 genkernsyms.sh
: genkernsyms.sh.in config.status
456 $(SHELL
) .
/config.status
458 .PHONY
: all install install-strip
uninstall clean mostlyclean distclean
459 .PHONY
: maintainer-clean
info dvi dist check
461 # Prevent an overflow.