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
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@
50 target_cpu
= @target_cpu@
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
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 \
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@
84 HELP2MAN
:= LANG
=C
$(HELP2MAN
) --no-info
--source
=FSF
87 LIBCURSES
= @LIBCURSES@
90 UNIFONT_HEX
= @UNIFONT_HEX@
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
)
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.
119 ### Include an arch-specific Makefile.
120 $(addprefix $(srcdir)/,$(MKFILES
)): %.mk
: %.rmk genmk.rb
121 if
test "x$(RUBY)" = x
; then \
124 $(RUBY
) $(srcdir)/genmk.rb
< $< > $@
; \
127 include $(srcdir)/conf
/$(target_cpu
)-$(platform
).mk
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 > $@
142 cat
$^
/dev
/null |
sort > $@
144 partmap.lst
: $(PARTMAPFILES
)
145 cat
$^
/dev
/null |
sort > $@
147 ifeq (, $(UNIFONT_HEX
))
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
) > $@
162 all-local
: $(PROGRAMS
) $(PKGLIB
) $(PKGDATA
) $(SCRIPTS
) $(MKFILES
)
164 install: install-local
167 $(mkinstalldirs
) $(DESTDIR
)$(pkglibdir
)
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; \
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; \
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; \
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; \
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; \
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; \
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; \
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; \
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; \
227 $(MAKE
) INSTALL_PROGRAM
="$(INSTALL_STRIP_PROGRAM)" install
231 for file in
$$list; do \
232 dest
="`echo $$file | sed 's,.*/,,'`"; \
233 rm -f
$(DESTDIR
)$(pkglibdir
)/$$dest; \
235 @list
='$(PKGDATA)'; \
236 for file in
$$list; do \
237 dest
="`echo $$file | sed 's,.*/,,'`"; \
238 rm -f
$(DESTDIR
)$(pkgdatadir
)/$$dest; \
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; \
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; \
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; \
254 -test -z
"$(CLEANFILES)" ||
rm -f
$(CLEANFILES
)
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
)
270 distdir
=$(PACKAGE_TARNAME
)-$(PACKAGE_VERSION
)
272 DISTLIST
: gendistlist.sh
273 sh
$(srcdir)/gendistlist.sh
> $(srcdir)/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; \
283 cp
-p
$(srcdir)/$$i $(distdir
)/$$i || exit
1; \
285 chmod
-R a
+r
$(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
)
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
)
298 mkdir
$(distdir
)/=build
299 mkdir
$(distdir
)/=inst
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; \
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; \
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'
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
332 stamp-h
: config.h.in config.status
335 Makefile
: Makefile.in config.status
338 config.status
: configure
339 .
/config.status
--recheck
341 gensymlist.sh
: gensymlist.sh.in config.status
344 genkernsyms.sh
: genkernsyms.sh.in config.status
347 .PHONY
: all install install-strip
uninstall clean mostlyclean distclean
348 .PHONY
: maintainer-clean
info dvi dist check
350 # Prevent an overflow.