GRUB-1.98 changes
[grub2/jjazz.git] / Makefile.in
blob47584cdde5590e16969522a54c11b0ddd2821c75
1 # -*- makefile -*-
3 # Copyright (C) 1994,1995,1996,1997,1998,1999,2000,2001,2002,2004,2005,2006,2007,2008,2009,2010 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 # Internationalization library.
45 LIBINTL = @LIBINTL@
47 XGETTEXT = @XGETTEXT@
48 MSGMERGE = @MSGMERGE@
49 MSGFMT = @MSGFMT@
51 LINGUAS = $(shell for i in $(srcdir)/po/*.po ; do \
52 if test -e $$i ; then echo $$i ; fi ; \
53 done | sed -e "s,.*/po/\(.*\)\.po$$,\1,")
55 PACKAGE = @PACKAGE@
56 PACKAGE_NAME = @PACKAGE_NAME@
57 PACKAGE_TARNAME = @PACKAGE_TARNAME@
58 PACKAGE_VERSION = @PACKAGE_VERSION@
59 PACKAGE_STRING = @PACKAGE_STRING@
60 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
62 host_os = @host_os@
63 host_kernel = @host_kernel@
64 host_cpu = @host_cpu@
66 target_cpu = @target_cpu@
67 platform = @platform@
69 INSTALL = @INSTALL@
70 INSTALL_PROGRAM = @INSTALL_PROGRAM@
71 INSTALL_DATA = @INSTALL_DATA@
72 INSTALL_SCRIPT = @INSTALL_SCRIPT@
73 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
74 MKDIR_P = @MKDIR_P@
76 mkinstalldirs = $(srcdir)/mkinstalldirs
78 LIBS = @LIBS@ $(LIBINTL)
80 CC = @CC@
81 CFLAGS = @CFLAGS@
82 ASFLAGS = @ASFLAGS@
83 LDFLAGS = @LDFLAGS@ $(LIBS)
84 CPPFLAGS = @CPPFLAGS@ -I$(builddir) -I$(builddir)/include -I$(srcdir)/gnulib -I$(srcdir)/include -Wall -W \
85 -DGRUB_LIBDIR=\"$(pkglibdir)\" -DLOCALEDIR=\"$(localedir)\"
86 TARGET_CC = @TARGET_CC@
87 TARGET_CFLAGS = @TARGET_CFLAGS@
88 TARGET_ASFLAGS = @TARGET_ASFLAGS@
89 TARGET_MODULE_FORMAT = @TARGET_MODULE_FORMAT@
90 TARGET_APPLE_CC = @TARGET_APPLE_CC@
91 OBJCONV = @OBJCONV@
92 TARGET_CPPFLAGS = @TARGET_CPPFLAGS@ -I$(srcdir)/include -I$(builddir) -I$(builddir)/include \
93 -Wall -W
94 TARGET_LDFLAGS = @TARGET_LDFLAGS@
95 TARGET_IMG_LDSCRIPT = @TARGET_IMG_LDSCRIPT@
96 TARGET_IMG_LDFLAGS = @TARGET_IMG_LDFLAGS@
97 TARGET_IMG_CFLAGS = @TARGET_IMG_CFLAGS@
98 TARGET_OBJ2ELF = @TARGET_OBJ2ELF@
99 EXEEXT = @EXEEXT@
100 OBJCOPY = @OBJCOPY@
101 STRIP = @STRIP@
102 NM = @NM@
103 RUBY = @RUBY@
104 MAKEINFO = @MAKEINFO@
105 ifeq (, $(MAKEINFO))
106 MAKEINFO = true
107 endif
108 HELP2MAN = @HELP2MAN@
109 ifeq (, $(HELP2MAN))
110 HELP2MAN = true
111 else
112 HELP2MAN := LANG=C $(HELP2MAN) --no-info --source=FSF
113 endif
114 AWK = @AWK@
115 LIBCURSES = @LIBCURSES@
116 LIBUSB = @LIBUSB@
117 LIBSDL = @LIBSDL@
118 LIBPCIACCESS = @LIBPCIACCESS@
119 YACC = @YACC@
120 FONT_SOURCE = @FONT_SOURCE@
122 # Options.
123 enable_grub_emu_usb = @enable_grub_emu_usb@
124 enable_grub_emu_sdl = @enable_grub_emu_sdl@
125 enable_grub_emu_pci = @enable_grub_emu_pci@
126 enable_grub_fstest = @enable_grub_fstest@
127 enable_grub_pe2elf = @enable_grub_pe2elf@
128 enable_grub_mkfont = @enable_grub_mkfont@
129 freetype_cflags = @freetype_cflags@
130 freetype_libs = @freetype_libs@
131 enable_efiemu = @enable_efiemu@
133 ### General variables.
135 RMKFILES = $(wildcard conf/*.rmk)
137 MKFILES = $(patsubst %.rmk,%.mk,$(RMKFILES))
139 PKGLIB = $(pkglib_IMAGES) $(pkglib_MODULES) $(pkglib_PROGRAMS) \
140 $(pkglib_DATA) $(pkglib_BUILDDIR)
141 PKGDATA = $(pkgdata_DATA)
142 PROGRAMS = $(bin_UTILITIES) $(sbin_UTILITIES)
143 SCRIPTS = $(bin_SCRIPTS) $(sbin_SCRIPTS) $(grub-mkconfig_SCRIPTS) \
144 $(lib_SCRIPTS)
145 INFOS = $(info_INFOS)
147 CLEANFILES =
148 MOSTLYCLEANFILES =
149 DISTCLEANFILES = config.status config.cache config.log config.h \
150 Makefile stamp-h stamp-h1 include/grub/cpu include/grub/machine \
151 gensymlist.sh genkernsyms.sh build_env.mk \
152 docs/grub.info docs/version.texi docs/stamp-vti
154 MAINTAINER_CLEANFILES = $(srcdir)/configure $(addprefix $(srcdir)/,$(MKFILES)) \
155 $(srcdir)/DISTLIST $(srcdir)/config.h.in $(srcdir)/stamp-h.in $(INFOS)
157 # The default target.
158 all: all-local
160 ### Include an arch-specific Makefile.
161 $(addprefix $(srcdir)/,$(MKFILES)): %.mk: %.rmk genmk.rb
162 if test "x$(RUBY)" = x; then \
163 touch $@; \
164 else \
165 $(RUBY) $(srcdir)/genmk.rb < $< > $@; \
168 ifeq ($(platform), emu)
169 include $(srcdir)/conf/any-emu.mk
170 else
171 include $(srcdir)/conf/$(target_cpu)-$(platform).mk
172 # For tests.
173 include $(srcdir)/conf/tests.mk
174 # For external modules.
175 -include $(wildcard $(GRUB_CONTRIB)/*/conf/common.mk)
176 endif
178 ### General targets.
180 CLEANFILES += $(pkglib_DATA) $(pkgdata_DATA) po/*.mo
181 pkglib_DATA += moddep.lst command.lst fs.lst partmap.lst parttool.lst handler.lst video.lst crypto.lst terminal.lst
182 moddep.lst: $(DEFSYMFILES) $(UNDSYMFILES) genmoddep.awk
183 cat $(DEFSYMFILES) /dev/null \
184 | $(AWK) -f $(srcdir)/genmoddep.awk $(UNDSYMFILES) > $@ \
185 || (rm -f $@; exit 1)
187 command.lst: $(COMMANDFILES)
188 cat $^ /dev/null | sort > $@
190 fs.lst: $(FSFILES)
191 cat $^ /dev/null | sort > $@
193 partmap.lst: $(PARTMAPFILES)
194 cat $^ /dev/null | sort > $@
196 handler.lst: $(HANDLERFILES)
197 cat $^ /dev/null | sort > $@
199 terminal.lst: $(TERMINALFILES)
200 cat $^ /dev/null | sort > $@
202 parttool.lst: $(PARTTOOLFILES)
203 cat $^ /dev/null | sort | uniq > $@
205 video.lst: $(VIDEOFILES)
206 cat $^ /dev/null | sort | uniq > $@
208 crypto.lst: lib/libgcrypt-grub/cipher/crypto.lst
209 cp $^ $@
211 ifneq (true, $(MAKEINFO))
212 info_INFOS += docs/grub.info
213 endif
215 MOSTLYCLEANFILES += vti.tmp
216 MAINTAINER_CLEANFILES += docs/stamp-vti docs/version.texi
217 docs/version.texi: docs/stamp-vti
218 docs/stamp-vti: docs/grub.texi configure.ac
219 $(MKDIR_P) docs
220 (set `$(SHELL) $(srcdir)/docs/mdate-sh $<`; \
221 echo "@set UPDATED $$1 $$2 $$3"; \
222 echo "@set UPDATED-MONTH $$2 $$3"; \
223 echo "@set EDITION $(PACKAGE_VERSION)"; \
224 echo "@set VERSION $(PACKAGE_VERSION)") > vti.tmp
225 @cmp -s vti.tmp $(builddir)/docs/version.texi \
226 || (echo "Updating $(builddir)/docs/version.texi"; \
227 cp vti.tmp $(builddir)/docs/version.texi)
228 -@rm -f vti.tmp
229 @cp $(builddir)/docs/version.texi $@
231 # Use --force until such time as the documentation is cleaned up.
232 docs/grub.info: docs/grub.texi docs/version.texi docs/fdl.texi
233 $(MKDIR_P) docs
234 -$(MAKEINFO) -P $(builddir)/docs --no-split --force $< -o $@
236 ifeq (, $(FONT_SOURCE))
237 else
239 ifeq ($(enable_grub_mkfont),yes)
241 pkgdata_DATA += unicode.pf2 ascii.pf2 ascii.h
242 CLEANFILES += ascii.bitmaps
244 # Arrows and lines are needed to draw the menu, so we always include them
245 UNICODE_ARROWS=0x2190-0x2193
246 UNICODE_LINES=0x2501-0x251B
248 unicode.pf2: $(FONT_SOURCE) grub-mkfont
249 $(builddir)/grub-mkfont -o $@ $(FONT_SOURCE)
251 ascii.pf2: $(FONT_SOURCE) grub-mkfont
252 $(builddir)/grub-mkfont -o $@ $(FONT_SOURCE) -r 0x0-0x7f,$(UNICODE_ARROWS),$(UNICODE_LINES)
254 ascii.bitmaps: $(FONT_SOURCE) grub-mkfont
255 $(builddir)/grub-mkfont --ascii-bitmaps -o $@ $(FONT_SOURCE)
257 ascii.h: ascii.bitmaps grub-bin2h
258 $(builddir)/grub-bin2h ascii_bitmaps < $< > $@
260 TARGET_CFLAGS += -DUSE_ASCII_FAILBACK=1
261 endif
262 endif
264 # Used for building modules externally
265 pkglib_BUILDDIR += build_env.mk
266 build_env.mk: Makefile
268 echo "TARGET_CC=$(TARGET_CC)" ; \
269 echo "TARGET_CFLAGS=$(TARGET_CFLAGS)" ; \
270 echo "TARGET_ASFLAGS=$(TARGET_ASFLAGS)" ; \
271 echo "TARGET_CPPFLAGS=$(TARGET_CPPFLAGS) -I$(pkglibdir) -I$(includedir)" ; \
272 echo "STRIP=$(STRIP)" ; \
273 echo "OBJCONV=$(OBJCONV)" ; \
274 echo "TARGET_MODULE_FORMAT=$(TARGET_MODULE_FORMAT)" ; \
275 echo "TARGET_APPLE_CC=$(TARGET_APPLE_CC)" ; \
276 echo "COMMON_ASFLAGS=$(COMMON_ASFLAGS)" ; \
277 echo "COMMON_CFLAGS=$(COMMON_CFLAGS)" ; \
278 echo "COMMON_LDFLAGS=$(COMMON_LDFLAGS)"\
279 ) > $@
280 pkglib_BUILDDIR += config.h grub_script.tab.h
282 all-local: $(PROGRAMS) $(PKGLIB) $(PKGDATA) $(SCRIPTS) $(INFOS) $(MKFILES) $(foreach lang, $(LINGUAS), po/$(lang).mo)
284 install: install-local
286 install-local: all
287 $(SHELL) $(mkinstalldirs) $(DESTDIR)$(pkglibdir)
288 rm -f $(DESTDIR)$(pkglibdir)/*
289 @list='$(PKGLIB)'; \
290 for file in $$list; do \
291 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
292 dest="`echo $$file | sed 's,.*/,,'`"; \
293 $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(pkglibdir)/$$dest; \
294 done
295 $(SHELL) $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
296 @list='$(PKGDATA)'; \
297 for file in $$list; do \
298 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
299 dest="`echo $$file | sed 's,.*/,,'`"; \
300 $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(pkgdatadir)/$$dest; \
301 done
302 $(SHELL) $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1
303 @list='$(bin_UTILITIES)'; for file in $$list; do \
304 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
305 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
306 $(INSTALL_PROGRAM) $$dir$$file $(DESTDIR)$(bindir)/$$dest; \
307 $(HELP2MAN) --section=1 -o $(DESTDIR)$(mandir)/man1/$$dest.1 $(builddir)/$$file; \
308 done
309 $(SHELL) $(mkinstalldirs) $(DESTDIR)$(sbindir) $(DESTDIR)$(mandir)/man8
310 @list='$(sbin_UTILITIES)'; for file in $$list; do \
311 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
312 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
313 $(INSTALL_PROGRAM) $$dir$$file $(DESTDIR)$(sbindir)/$$dest; \
314 $(HELP2MAN) --section=8 -o $(DESTDIR)$(mandir)/man8/$$dest.8 $(builddir)/$$file; \
315 done
316 @list='$(bin_SCRIPTS)'; for file in $$list; do \
317 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
318 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
319 $(INSTALL_SCRIPT) $$dir$$file $(DESTDIR)$(bindir)/$$dest; \
320 $(HELP2MAN) --section=1 -o $(DESTDIR)$(mandir)/man1/$$dest.1 $(builddir)/$$file; \
321 done
322 @list='$(sbin_SCRIPTS)'; for file in $$list; do \
323 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
324 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
325 $(INSTALL_SCRIPT) $$dir$$file $(DESTDIR)$(sbindir)/$$dest; \
326 $(HELP2MAN) --section=8 -o $(DESTDIR)$(mandir)/man8/$$dest.8 $(builddir)/$$file; \
327 done
328 $(SHELL) $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/grub.d
329 @list='$(grub-mkconfig_SCRIPTS)'; for file in $$list; do \
330 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
331 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
332 $(INSTALL_SCRIPT) $$dir$$file $(DESTDIR)$(sysconfdir)/grub.d/$$dest; \
333 done
334 @list='$(grub-mkconfig_DATA)'; for file in $$list; do \
335 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
336 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
337 $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(sysconfdir)/grub.d/$$dest; \
338 done
339 $(SHELL) $(mkinstalldirs) $(DESTDIR)$(libdir)/grub
340 @list='$(lib_SCRIPTS)'; \
341 for file in $$list; do \
342 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
343 dest="`echo $$file | sed 's,.*/,,'`"; \
344 $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(libdir)/grub/$$dest; \
345 done
346 @langs='$(LINGUAS)'; \
347 for lang in $$langs; do \
348 $(SHELL) $(mkinstalldirs) $(DESTDIR)/$(datadir)/locale/$$lang/LC_MESSAGES; \
349 file="po/$$lang.mo"; \
350 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
351 $(INSTALL_DATA) $$dir$$file $(DESTDIR)/$(datadir)/locale/$$lang/LC_MESSAGES/$(PACKAGE).mo; \
352 done
353 $(SHELL) $(mkinstalldirs) $(DESTDIR)$(infodir)
354 @list='$(info_INFOS)'; \
355 for file in $$list; do \
356 if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
357 dest="`echo $$file | sed 's,.*/,,'`"; \
358 $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(infodir); \
359 if (install-info --version && \
360 install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
361 install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$dest" || :; \
362 fi; \
363 done
365 install-strip:
366 $(MAKE) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" install
368 uninstall:
369 @list='$(PKGLIB)'; \
370 for file in $$list; do \
371 dest="`echo $$file | sed 's,.*/,,'`"; \
372 rm -f $(DESTDIR)$(pkglibdir)/$$dest; \
373 done
374 @list='$(PKGDATA)'; \
375 for file in $$list; do \
376 dest="`echo $$file | sed 's,.*/,,'`"; \
377 rm -f $(DESTDIR)$(pkgdatadir)/$$dest; \
378 done
379 @list='$(bin_UTILITIES) $(bin_SCRIPTS)'; for file in $$list; do \
380 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
381 rm -f $(DESTDIR)$(bindir)/$$dest; \
382 rm -f $(DESTDIR)$(mandir)/man1/$$dest.1; \
383 done
384 @list='$(sbin_UTILITIES) $(sbin_SCRIPTS)'; for file in $$list; do \
385 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
386 rm -f $(DESTDIR)$(sbindir)/$$dest; \
387 rm -f $(DESTDIR)$(mandir)/man8/$$dest.8; \
388 done
389 @list='$(grub-mkconfig_SCRIPTS) $(grub-mkconfig_DATA)'; for file in $$list; do \
390 dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
391 rm -f $(DESTDIR)$(sysconfdir)/grub.d/$$dest; \
392 done
393 @list='$(lib_SCRIPTS)'; \
394 for file in $$list; do \
395 dest="`echo $$file | sed 's,.*/,,'`"; \
396 echo rm -f $(DESTDIR)$(libdir)/$$dest; \
397 rm -f $(DESTDIR)$(libdir)/grub/$$dest; \
398 done
399 @list='$(info_INFOS)'; \
400 for file in $$list; do \
401 dest="`echo $$file | sed 's,.*/,,'`"; \
402 if (install-info --version && \
403 install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
404 if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$dest"; then \
405 :; \
406 else \
407 test ! -f "$(DESTDIR)$(infodir)/$$dest" || exit 1; \
408 fi; \
409 fi; \
410 rm -f $(DESTDIR)$(infodir)/$$dest; \
411 done
413 clean: $(CLEAN_IMAGE_TARGETS) $(CLEAN_MODULE_TARGETS) $(CLEAN_UTILITY_TARGETS)
414 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
416 mostlyclean: clean $(MOSTLYCLEAN_IMAGE_TARGETS) $(MOSTLYCLEAN_MODULE_TARGETS) $(MOSTLYCLEAN_UTILITY_TARGETS)
417 -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
419 distclean: mostlyclean
420 -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
421 -rm -rf $(srcdir)/autom4te.cache
423 maintainer-clean: distclean
424 -test -z "$(MAINTAINER_CLEANFILES)" || rm -f $(MAINTAINER_CLEANFILES)
426 info:
428 dvi:
430 distdir=$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
432 DISTLIST: gendistlist.sh
433 $(SHELL) $(srcdir)/gendistlist.sh > $(srcdir)/DISTLIST
435 distdir: DISTLIST
436 -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
437 $(SHELL) $(mkinstalldirs) $(distdir)
438 for i in `cat $(srcdir)/DISTLIST`; do \
439 dir=`echo "$$i" | sed 's:/[^/]*$$::'`; \
440 if test -d $(srcdir)/$$dir; then \
441 $(SHELL) $(mkinstalldirs) $(distdir)/$$dir; \
442 fi; \
443 cp -p $(srcdir)/$$i $(distdir)/$$i || exit 1; \
444 done
445 chmod -R a+r $(distdir)
447 GZIP_ENV = --best
449 dist: distdir
450 tar chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
451 -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
453 distcheck: dist
454 -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
455 GZIP=$(GZIP_ENV) gzip -cd $(distdir).tar.gz | tar xf -
456 chmod -R a-w $(distdir)
457 chmod a+w $(distdir)
458 mkdir $(distdir)/=build
459 mkdir $(distdir)/=inst
460 chmod a-w $(distdir)
461 dc_instdir=`CDPATH=: && cd $(distdir)/=inst && pwd` \
462 && cd $(distdir)/=build \
463 && $(SHELL) ../configure --srcdir=.. --prefix=$$dc_instdir \
464 && $(MAKE) all dvi check install && $(MAKE) uninstall \
465 && (test `find $$dc_instdir -type f -print | wc -l` -le 1 \
466 || (echo "Error: files left after uninstall" 1>&2; \
467 exit 1)) \
468 && $(MAKE) dist && $(MAKE) distclean \
469 && rm -f $(distdir).tar.gz \
470 && (test `find . -type f -print | wc -l` -eq 0 \
471 || (echo "Error: files left after distclean" 1>&2; \
472 exit 1))
473 -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
474 @echo "$(distdir).tar.gz is ready for distribution" | \
475 sed 'h;s/./=/g;p;x;p;x'
477 check: all $(UNIT_TESTS) $(FUNCTIONAL_TESTS) $(SCRIPTED_TESTS)
478 @list="$(UNIT_TESTS)"; \
479 set -e; \
480 for file in $$list; do \
481 $(builddir)/$$file; \
482 done
483 @list="$(FUNCTIONAL_TESTS)"; \
484 set -e; \
485 for file in $$list; do \
486 mod=`basename $$file .mod`; \
487 echo "insmod functional_test; insmod $$mod; functional_test" \
488 | $(builddir)/grub-shell; \
489 done
490 @list="$(SCRIPTED_TESTS)"; \
491 set -e; \
492 for file in $$list; do \
493 $(builddir)/$$file; \
494 done
496 .SUFFIX:
497 .SUFFIX: .c .o .S .d
499 # Regenerate configure and Makefile automatically.
500 $(srcdir)/aclocal.m4: configure.ac acinclude.m4
501 cd $(srcdir) && aclocal
503 $(srcdir)/configure: configure.ac aclocal.m4
504 cd $(srcdir) && autoconf
506 $(srcdir)/config.h.in: stamp-h.in
507 $(srcdir)/stamp-h.in: configure.ac aclocal.m4
508 cd $(srcdir) && autoheader
509 echo timestamp > $(srcdir)/stamp-h.in
511 config.h: stamp-h
512 stamp-h: config.h.in config.status
513 $(SHELL) ./config.status
515 Makefile: Makefile.in config.status
516 $(SHELL) ./config.status
518 config.status: configure
519 $(SHELL) ./config.status --recheck
521 gensymlist.sh: gensymlist.sh.in config.status
522 $(SHELL) ./config.status
524 genkernsyms.sh: genkernsyms.sh.in config.status
525 $(SHELL) ./config.status
527 $(srcdir)/po/$(PACKAGE).pot: po/POTFILES po/POTFILES-shell
528 cd $(srcdir) && $(XGETTEXT) -ctranslate --from-code=utf-8 -o $@ -f $< --keyword=_ --keyword=N_
529 cd $(srcdir) && $(XGETTEXT) -ctranslate --from-code=utf-8 -o $@ -f po/POTFILES-shell -j --language=Shell
531 $(foreach lang, $(LINGUAS), $(srcdir)/po/$(lang).po): po/$(PACKAGE).pot
532 $(MSGMERGE) -U $@ $^
534 po/%.mo: po/%.po
535 $(MKDIR_P) $$(dirname $@)
536 $(MSGFMT) -c --statistics -o $@ $^
538 .PHONY: all install install-strip uninstall clean mostlyclean distclean
539 .PHONY: maintainer-clean info dvi dist check
541 # Prevent an overflow.
542 .NOEXPORT:
544 .DELETE_ON_ERROR: