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@
51 target_os
= @target_os@
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
65 CPPFLAGS
= @CPPFLAGS@
-I.
-Iinclude
-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.
-Iinclude
-I
$(srcdir)/include \
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@
85 HELP2MAN
:= LANG
=C
$(HELP2MAN
) --no-info
--source
=FSF
88 LIBCURSES
= @LIBCURSES@
91 UNIFONT_HEX
= @UNIFONT_HEX@
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@
99 ### General variables.
101 RMKFILES
= $(addprefix conf
/,common.rmk i386-pc.rmk powerpc-ieee1275.rmk \
102 sparc64-ieee1275.rmk i386-efi.rmk i386-ieee1275.rmk i386-coreboot.rmk
)
103 MKFILES
= $(patsubst %.rmk
,%.mk
,$(RMKFILES
))
105 PKGLIB
= $(pkglib_IMAGES
) $(pkglib_MODULES
) $(pkglib_PROGRAMS
) \
106 $(pkglib_DATA
) $(lib_DATA
)
107 PKGDATA
= $(pkgdata_DATA
)
108 PROGRAMS
= $(bin_UTILITIES
) $(sbin_UTILITIES
)
109 SCRIPTS
= $(bin_SCRIPTS
) $(sbin_SCRIPTS
) $(update-grub_SCRIPTS
)
113 DISTCLEANFILES
= config.status config.cache config.log config.h \
114 Makefile stamp-h
include/grub
/cpu
include/grub
/machine \
115 gensymlist.sh genkernsyms.sh
116 MAINTAINER_CLEANFILES
= $(srcdir)/configure
$(addprefix $(srcdir)/,$(MKFILES
))
118 # The default target.
121 ### Include an arch-specific Makefile.
122 $(addprefix $(srcdir)/,$(MKFILES
)): %.mk
: %.rmk genmk.rb
123 if
test "x$(RUBY)" = x
; then \
126 $(RUBY
) $(srcdir)/genmk.rb
< $< > $@
; \
129 include $(srcdir)/conf
/$(target_cpu
)-$(platform
).mk
133 CLEANFILES
+= $(pkglib_DATA
) $(pkgdata_DATA
)
134 pkglib_DATA
+= moddep.lst command.lst fs.lst partmap.lst
135 moddep.lst
: $(DEFSYMFILES
) $(UNDSYMFILES
) genmoddep.awk
136 cat
$(DEFSYMFILES
) /dev
/null \
137 |
$(AWK
) -f
$(srcdir)/genmoddep.awk
$(UNDSYMFILES
) > $@ \
138 ||
(rm -f
$@
; exit
1)
140 command.lst
: $(COMMANDFILES
)
141 cat
$^
/dev
/null |
sort > $@
144 cat
$^
/dev
/null |
sort > $@
146 partmap.lst
: $(PARTMAPFILES
)
147 cat
$^
/dev
/null |
sort > $@
149 ifeq (, $(UNIFONT_HEX
))
151 pkgdata_DATA
+= unicode.pff ascii.pff
153 # Arrows and lines are needed to draw the menu, so we always include them
154 UNICODE_ARROWS
=0x2190-0x2193
155 UNICODE_LINES
=0x2501-0x251B
157 unicode.pff
: $(UNIFONT_HEX
)
158 ruby
$(srcdir)/util
/unifont2pff.rb
$(UNIFONT_HEX
) > $@
160 ascii.pff
: $(UNIFONT_HEX
)
161 ruby
$(srcdir)/util
/unifont2pff.rb
0x0-0x7f $(UNICODE_ARROWS
) $(UNICODE_LINES
) $(UNIFONT_HEX
) > $@
164 all-local
: $(PROGRAMS
) $(PKGLIB
) $(PKGDATA
) $(SCRIPTS
) $(MKFILES
)
166 install: install-local
169 $(mkinstalldirs
) $(DESTDIR
)$(pkglibdir
)
171 for file in
$$list; do \
172 if
test -f
"$$file"; then
dir=; else dir="$(srcdir)/"; fi
; \
173 dest
="`echo $$file | sed 's,.*/,,'`"; \
174 $(INSTALL_DATA
) $$dir$$file $(DESTDIR
)$(pkglibdir
)/$$dest; \
176 $(mkinstalldirs
) $(DESTDIR
)$(pkgdatadir
)
177 @list
='$(PKGDATA)'; \
178 for file in
$$list; do \
179 if
test -f
"$$file"; then
dir=; else dir="$(srcdir)/"; fi
; \
180 dest
="`echo $$file | sed 's,.*/,,'`"; \
181 $(INSTALL_DATA
) $$dir$$file $(DESTDIR
)$(pkgdatadir
)/$$dest; \
183 $(mkinstalldirs
) $(DESTDIR
)$(bindir) $(DESTDIR
)$(mandir)/man1
184 @list
='$(bin_UTILITIES)'; for file in
$$list; do \
185 if
test -f
"$$file"; then
dir=; else dir="$(srcdir)/"; fi
; \
186 dest
="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
187 $(INSTALL_PROGRAM
) $$dir$$file $(DESTDIR
)$(bindir)/$$dest; \
188 $(HELP2MAN
) --section
=1 $(builddir
)/$$file > $(DESTDIR
)$(mandir)/man1
/$$dest.1; \
190 $(mkinstalldirs
) $(DESTDIR
)$(sbindir
) $(DESTDIR
)$(mandir)/man8
191 @list
='$(sbin_UTILITIES)'; for file in
$$list; do \
192 if
test -f
"$$file"; then
dir=; else dir="$(srcdir)/"; fi
; \
193 dest
="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
194 $(INSTALL_PROGRAM
) $$dir$$file $(DESTDIR
)$(sbindir
)/$$dest; \
195 $(HELP2MAN
) --section
=8 $(builddir
)/$$file > $(DESTDIR
)$(mandir)/man8
/$$dest.8; \
197 @list
='$(bin_SCRIPTS)'; for file in
$$list; do \
198 if
test -f
"$$file"; then
dir=; else dir="$(srcdir)/"; fi
; \
199 dest
="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
200 $(INSTALL_SCRIPT
) $$dir$$file $(DESTDIR
)$(bindir)/$$dest; \
201 $(HELP2MAN
) --section
=1 $(builddir
)/$$file > $(DESTDIR
)$(mandir)/man1
/$$dest.1; \
203 @list
='$(sbin_SCRIPTS)'; for file in
$$list; do \
204 if
test -f
"$$file"; then
dir=; else dir="$(srcdir)/"; fi
; \
205 dest
="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
206 $(INSTALL_SCRIPT
) $$dir$$file $(DESTDIR
)$(sbindir
)/$$dest; \
207 $(HELP2MAN
) --section
=8 $(builddir
)/$$file > $(DESTDIR
)$(mandir)/man8
/$$dest.8; \
209 $(mkinstalldirs
) $(DESTDIR
)$(sysconfdir
)/grub.d
210 @list
='$(update-grub_SCRIPTS)'; for file in
$$list; do \
211 if
test -f
"$$file"; then
dir=; else dir="$(srcdir)/"; fi
; \
212 dest
="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
213 $(INSTALL_SCRIPT
) $$dir$$file $(DESTDIR
)$(sysconfdir
)/grub.d
/$$dest; \
215 @list
='$(update-grub_DATA)'; for file in
$$list; do \
216 if
test -f
"$$file"; then
dir=; else dir="$(srcdir)/"; fi
; \
217 dest
="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
218 $(INSTALL_DATA
) $$dir$$file $(DESTDIR
)$(sysconfdir
)/grub.d
/$$dest; \
220 $(mkinstalldirs
) $(DESTDIR
)$(libdir)/grub
221 @list
='$(lib_DATA)'; \
222 for file in
$$list; do \
223 if
test -f
"$$file"; then
dir=; else dir="$(srcdir)/"; fi
; \
224 dest
="`echo $$file | sed 's,.*/,,'`"; \
225 $(INSTALL_DATA
) $$dir$$file $(DESTDIR
)$(libdir)/grub
/$$dest; \
229 $(MAKE
) INSTALL_PROGRAM
="$(INSTALL_STRIP_PROGRAM)" install
233 for file in
$$list; do \
234 dest
="`echo $$file | sed 's,.*/,,'`"; \
235 rm -f
$(DESTDIR
)$(pkglibdir
)/$$dest; \
237 @list
='$(PKGDATA)'; \
238 for file in
$$list; do \
239 dest
="`echo $$file | sed 's,.*/,,'`"; \
240 rm -f
$(DESTDIR
)$(pkgdatadir
)/$$dest; \
242 @list
='$(bin_UTILITIES) $(bin_SCRIPTS)'; for file in
$$list; do \
243 dest
="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
244 rm -f
$(DESTDIR
)$(bindir)/$$dest; \
246 @list
='$(sbin_UTILITIES) $(sbin_SCRIPTS)'; for file in
$$list; do \
247 dest
="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
248 rm -f
$(DESTDIR
)$(sbindir
)/$$dest; \
250 @list
='$(update-grub_SCRIPTS) $(update-grub_DATA)'; for file in
$$list; do \
251 dest
="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
252 rm -f
$(DESTDIR
)$(sysconfdir
)/grub.d
/$$dest; \
256 -test -z
"$(CLEANFILES)" ||
rm -f
$(CLEANFILES
)
259 -test -z
"$(MOSTLYCLEANFILES)" ||
rm -f
$(MOSTLYCLEANFILES
)
261 distclean: mostlyclean
262 -test -z
"$(DISTCLEANFILES)" ||
rm -f
$(DISTCLEANFILES
)
263 -rm -rf
$(srcdir)/autom4te.cache
265 maintainer-clean
: distclean
266 -test -z
"$(MAINTAINER_CLEANFILES)" ||
rm -f
$(MAINTAINER_CLEANFILES
)
272 distdir
=$(PACKAGE_TARNAME
)-$(PACKAGE_VERSION
)
274 DISTLIST
: gendistlist.sh
275 sh
$(srcdir)/gendistlist.sh
> $(srcdir)/DISTLIST
278 -chmod
-R a
+w
$(distdir
) >/dev
/null
2>&1; rm -rf
$(distdir
)
279 $(mkinstalldirs
) $(distdir
)
280 for i in
`cat $(srcdir)/DISTLIST`; do \
281 dir=`echo "$$i" | sed 's:/[^/]*$$::'`; \
282 if
test -d
$(srcdir)/$$dir; then \
283 $(mkinstalldirs
) $(distdir
)/$$dir; \
285 cp
-p
$(srcdir)/$$i $(distdir
)/$$i || exit
1; \
287 chmod
-R a
+r
$(distdir
)
292 tar chof
- $(distdir
) | GZIP
=$(GZIP_ENV
) gzip
-c
>$(distdir
).
tar.gz
293 -chmod
-R a
+w
$(distdir
) >/dev
/null
2>&1; rm -rf
$(distdir
)
296 -chmod
-R a
+w
$(distdir
) >/dev
/null
2>&1; rm -rf
$(distdir
)
297 GZIP
=$(GZIP_ENV
) gzip
-cd
$(distdir
).
tar.gz |
tar xf
-
298 chmod
-R a-w
$(distdir
)
300 mkdir
$(distdir
)/=build
301 mkdir
$(distdir
)/=inst
303 dc_instdir
=`CDPATH=: && cd $(distdir)/=inst && pwd` \
304 && cd
$(distdir
)/=build \
305 && ..
/configure
--srcdir=..
--prefix=$$dc_instdir \
306 && $(MAKE
) all dvi check install && $(MAKE
) uninstall \
307 && (test `find $$dc_instdir -type f -print | wc -l` -le
1 \
308 ||
(echo
"Error: files left after uninstall" 1>&2; \
310 && $(MAKE
) dist && $(MAKE
) distclean \
311 && rm -f
$(distdir
).
tar.gz \
312 && (test `find . -type f -print | wc -l` -eq
0 \
313 ||
(echo
"Error: files left after distclean" 1>&2; \
315 -chmod
-R a
+w
$(distdir
) > /dev
/null
2>&1; rm -rf
$(distdir
)
316 @echo
"$(distdir).tar.gz is ready for distribution" | \
317 sed
'h;s/./=/g;p;x;p;x'
324 # Regenerate configure and Makefile automatically.
325 $(srcdir)/configure
: configure.ac aclocal.m4
326 cd
$(srcdir) && autoconf
328 $(srcdir)/config.h.in
: stamp-h.in
329 $(srcdir)/stamp-h.in
: configure.ac aclocal.m4
330 cd
$(srcdir) && autoheader
331 echo timestamp
> $(srcdir)/stamp-h.in
334 stamp-h
: config.h.in config.status
337 Makefile
: Makefile.in config.status
340 config.status
: configure
341 .
/config.status
--recheck
343 gensymlist.sh
: gensymlist.sh.in config.status
346 genkernsyms.sh
: genkernsyms.sh.in config.status
349 .PHONY
: all install install-strip
uninstall clean mostlyclean distclean
350 .PHONY
: maintainer-clean
info dvi dist check
352 # Prevent an overflow.