Makefile.in 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555
  1. # -*- makefile -*-
  2. #
  3. # Copyright (C) 1994,1995,1996,1997,1998,1999,2000,2001,2002,2004,2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
  4. #
  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.
  8. #
  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.
  13. ### The configure script will replace these variables.
  14. ifeq (, @shell@)
  15. SHELL = /bin/sh
  16. else
  17. SHELL = @shell@
  18. endif
  19. @SET_MAKE@
  20. transform = @program_transform_name@
  21. srcdir = @srcdir@
  22. builddir = @builddir@
  23. top_srcdir = @top_srcdir@
  24. VPATH = @srcdir@
  25. prefix = @prefix@
  26. exec_prefix = @exec_prefix@
  27. bindir = @bindir@
  28. sbindir = @sbindir@
  29. libexecdir = @libexecdir@
  30. datarootdir = @datarootdir@
  31. datadir = @datadir@
  32. sysconfdir = @sysconfdir@
  33. sharedstatedir = @sharedstatedir@
  34. localstatedir = @localstatedir@
  35. libdir = @libdir@
  36. localedir = @localedir@
  37. infodir = @infodir@
  38. mandir = @mandir@
  39. includedir = @includedir@
  40. localedir = @localedir@
  41. pkgdatadir = $(datadir)/`echo @PACKAGE_TARNAME@ | sed '$(transform)'`
  42. pkglibdir = $(libdir)/`echo @PACKAGE_TARNAME@/$(target_cpu)-$(platform) | sed '$(transform)'`
  43. # Internationalization library.
  44. LIBINTL = @LIBINTL@
  45. TARGET_NO_MODULES = @TARGET_NO_MODULES@
  46. # Util library.
  47. LIBUTIL = @LIBUTIL@
  48. XGETTEXT = @XGETTEXT@
  49. MSGMERGE = @MSGMERGE@
  50. 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,")
  54. PACKAGE = @PACKAGE@
  55. PACKAGE_NAME = @PACKAGE_NAME@
  56. PACKAGE_TARNAME = @PACKAGE_TARNAME@
  57. PACKAGE_VERSION = @PACKAGE_VERSION@
  58. PACKAGE_STRING = @PACKAGE_STRING@
  59. PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
  60. host_os = @host_os@
  61. host_kernel = @host_kernel@
  62. host_cpu = @host_cpu@
  63. target_cpu = @target_cpu@
  64. platform = @platform@
  65. INSTALL = @INSTALL@
  66. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  67. INSTALL_DATA = @INSTALL_DATA@
  68. INSTALL_SCRIPT = @INSTALL_SCRIPT@
  69. INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
  70. MKDIR_P = @MKDIR_P@
  71. mkinstalldirs = $(srcdir)/mkinstalldirs
  72. LIBS = @LIBS@ $(LIBINTL) $(LIBUTIL)
  73. CC = @CC@
  74. AS = @AS@
  75. CFLAGS = @CFLAGS@
  76. POSIX_CFLAGS = -I$(srcdir)/lib/posix_wrap
  77. GNULIB_UTIL_CFLAGS = -Wno-undef -Wno-sign-compare -Wno-unused -D_GL_UNUSED="__attribute__ ((unused))" -I$(srcdir)/gnulib -Wno-error
  78. GNULIB_CFLAGS = $(GNULIB_UTIL_CFLAGS) $(POSIX_CFLAGS)
  79. ASFLAGS = @ASFLAGS@
  80. LDFLAGS = @LDFLAGS@ $(LIBS)
  81. CPPFLAGS = @CPPFLAGS@ -I$(builddir) -I$(builddir)/include -I$(srcdir)/gnulib -I$(srcdir)/include -Wall -W \
  82. -DGRUB_LIBDIR=\"$(pkglibdir)\" -DLOCALEDIR=\"$(localedir)\"
  83. TARGET_CC = @TARGET_CC@
  84. TARGET_CFLAGS = -ffreestanding @TARGET_CFLAGS@
  85. TARGET_ASFLAGS = -nostdinc -fno-builtin @TARGET_ASFLAGS@
  86. TARGET_MODULE_FORMAT = @TARGET_MODULE_FORMAT@
  87. TARGET_APPLE_CC = @TARGET_APPLE_CC@
  88. OBJCONV = @OBJCONV@
  89. TARGET_CPPFLAGS = @TARGET_CPPFLAGS@ -I$(srcdir)/include -I$(builddir) -I$(builddir)/include \
  90. -Wall -W
  91. TARGET_LDFLAGS = -nostdlib -static-libgcc @TARGET_LDFLAGS@
  92. TARGET_IMG_LDSCRIPT = @TARGET_IMG_LDSCRIPT@
  93. TARGET_IMG_LDFLAGS = -nostdlib @TARGET_IMG_LDFLAGS@
  94. TARGET_IMG_CFLAGS = @TARGET_IMG_CFLAGS@
  95. TARGET_OBJ2ELF = @TARGET_OBJ2ELF@
  96. kernel_img_LDFLAGS = -lgcc
  97. EXEEXT = @EXEEXT@
  98. OBJCOPY = @OBJCOPY@
  99. STRIP = @STRIP@
  100. NM = @NM@
  101. RUBY = @RUBY@
  102. MAKEINFO = @MAKEINFO@
  103. ifeq (, $(MAKEINFO))
  104. MAKEINFO = true
  105. endif
  106. HELP2MAN = @HELP2MAN@
  107. ifeq (, $(HELP2MAN))
  108. HELP2MAN = true
  109. else
  110. HELP2MAN := LANG=C $(HELP2MAN) --no-info --source=FSF
  111. endif
  112. AWK = @AWK@
  113. LIBCURSES = @LIBCURSES@
  114. LIBUSB = @LIBUSB@
  115. LIBSDL = @LIBSDL@
  116. INCSDL = @INCSDL@
  117. LIBPCIACCESS = @LIBPCIACCESS@
  118. LEX = @LEX@
  119. YACC = @YACC@
  120. FONT_SOURCE = @FONT_SOURCE@
  121. # Options.
  122. enable_grub_emu_usb = @enable_grub_emu_usb@
  123. enable_grub_emu_sdl = @enable_grub_emu_sdl@
  124. enable_grub_emu_pci = @enable_grub_emu_pci@
  125. enable_grub_fstest = @enable_grub_fstest@
  126. enable_grub_pe2elf = @enable_grub_pe2elf@
  127. enable_grub_mkfont = @enable_grub_mkfont@
  128. freetype_cflags = @freetype_cflags@
  129. freetype_libs = @freetype_libs@
  130. enable_efiemu = @enable_efiemu@
  131. ### General variables.
  132. RMKFILES = $(wildcard $(srcdir)/conf/*.rmk)
  133. MKFILES = $(patsubst %.rmk,%.mk,$(RMKFILES))
  134. PKGLIB = $(pkglib_IMAGES) $(pkglib_MODULES) $(pkglib_PROGRAMS) \
  135. $(pkglib_DATA) $(pkglib_BUILDDIR)
  136. PKGDATA = $(pkgdata_DATA)
  137. PROGRAMS = $(bin_UTILITIES) $(sbin_UTILITIES)
  138. SCRIPTS = $(bin_SCRIPTS) $(sbin_SCRIPTS) $(grub-mkconfig_SCRIPTS) \
  139. $(lib_SCRIPTS)
  140. INFOS = $(info_INFOS)
  141. CLEANFILES =
  142. MOSTLYCLEANFILES =
  143. DISTCLEANFILES = config.status config.cache config.log config.h \
  144. Makefile stamp-h stamp-h1 include/grub/cpu include/grub/machine \
  145. gensymlist.sh genkernsyms.sh build_env.mk \
  146. docs/grub.info docs/version.texi docs/stamp-vti
  147. MAINTAINER_CLEANFILES = $(srcdir)/configure $(srcdir)/aclocal.m4 \
  148. $(MKFILES) $(srcdir)/config.guess \
  149. $(srcdir)/config.sub $(srcdir)/install-sh $(srcdir)/missing \
  150. $(srcdir)/DISTLIST $(srcdir)/config.h.in $(srcdir)/stamp-h.in $(INFOS)
  151. # The default target.
  152. all: all-local
  153. ### Include an arch-specific Makefile.
  154. $(addprefix $(srcdir)/,$(MKFILES)): %.mk: %.rmk genmk.rb
  155. if test "x$(RUBY)" = x; then \
  156. touch $@; \
  157. else \
  158. $(RUBY) $(srcdir)/genmk.rb < $< > $@; \
  159. fi
  160. ifeq ($(platform), emu)
  161. include $(srcdir)/conf/any-emu.mk
  162. else
  163. include $(srcdir)/conf/$(target_cpu)-$(platform).mk
  164. # For tests.
  165. include $(srcdir)/conf/tests.mk
  166. # For external modules.
  167. -include $(wildcard $(GRUB_CONTRIB)/*/conf/common.mk)
  168. endif
  169. ifeq ($(TARGET_NO_MODULES), yes)
  170. TARGET_CFLAGS += -DGRUB_TARGET_NO_MODULES=1
  171. CFLAGS += -DGRUB_TARGET_NO_MODULES=1
  172. endif
  173. ### General targets.
  174. ifneq ($(TARGET_NO_MODULES), yes)
  175. LISTFILES = modsym.lst moddep.lst command.lst fs.lst partmap.lst \
  176. parttool.lst handler.lst video.lst terminal.lst
  177. $(LISTFILES): $(MODFILES) grub-symdb
  178. $(call quiet-command,$(builddir)/grub-symdb -d . update $?," SYMDB")
  179. else
  180. LISTFILES =
  181. endif
  182. CLEANFILES += $(pkglib_DATA) $(pkgdata_DATA) ${LISTFILES} po/*.mo
  183. pkglib_DATA += $(LISTFILES) crypto.lst
  184. crypto.lst: lib/libgcrypt-grub/cipher/crypto.lst
  185. $(call quiet-command,cp $^ $@," CP $@")
  186. ifneq (true, $(MAKEINFO))
  187. info_INFOS += docs/grub.info
  188. endif
  189. MOSTLYCLEANFILES += vti.tmp
  190. MAINTAINER_CLEANFILES += docs/stamp-vti docs/version.texi
  191. docs/version.texi: docs/stamp-vti
  192. docs/stamp-vti: docs/grub.texi configure.ac
  193. $(MKDIR_P) docs
  194. (set `$(SHELL) $(srcdir)/docs/mdate-sh $<`; \
  195. echo "@set UPDATED $$1 $$2 $$3"; \
  196. echo "@set UPDATED-MONTH $$2 $$3"; \
  197. echo "@set EDITION $(PACKAGE_VERSION)"; \
  198. echo "@set VERSION $(PACKAGE_VERSION)") > vti.tmp
  199. @cmp -s vti.tmp $(builddir)/docs/version.texi \
  200. || (echo "Updating $(builddir)/docs/version.texi"; \
  201. cp vti.tmp $(builddir)/docs/version.texi)
  202. -@rm -f vti.tmp
  203. @cp $(builddir)/docs/version.texi $@
  204. # Use --force until such time as the documentation is cleaned up.
  205. docs/grub.info: docs/grub.texi docs/version.texi docs/fdl.texi
  206. $(MKDIR_P) docs
  207. -$(MAKEINFO) -P $(builddir)/docs --no-split --force $< -o $@
  208. ifeq (, $(FONT_SOURCE))
  209. else
  210. ifeq ($(enable_grub_mkfont),yes)
  211. pkgdata_DATA += unicode.pf2 ascii.pf2 ascii.h
  212. CLEANFILES += ascii.bitmaps
  213. # Arrows and lines are needed to draw the menu, so we always include them
  214. UNICODE_ARROWS=0x2190-0x2193
  215. UNICODE_LINES=0x2501-0x251B
  216. unicode.pf2: $(FONT_SOURCE) grub-mkfont
  217. $(builddir)/grub-mkfont -o $@ $(FONT_SOURCE)
  218. ascii.pf2: $(FONT_SOURCE) grub-mkfont
  219. $(builddir)/grub-mkfont -o $@ $(FONT_SOURCE) -r 0x0-0x7f,$(UNICODE_ARROWS),$(UNICODE_LINES)
  220. ascii.bitmaps: $(FONT_SOURCE) grub-mkfont
  221. $(builddir)/grub-mkfont --ascii-bitmaps -o $@ $(FONT_SOURCE)
  222. ascii.h: ascii.bitmaps grub-bin2h
  223. $(builddir)/grub-bin2h ascii_bitmaps < $< > $@
  224. TARGET_CFLAGS += -DUSE_ASCII_FAILBACK=1
  225. endif
  226. endif
  227. # Used for building modules externally
  228. pkglib_BUILDDIR += build_env.mk
  229. build_env.mk: Makefile
  230. $(call quiet-command,(\
  231. echo "TARGET_CC=$(TARGET_CC)" ; \
  232. echo "TARGET_CFLAGS=$(TARGET_CFLAGS)" ; \
  233. echo "TARGET_ASFLAGS=$(TARGET_ASFLAGS)" ; \
  234. echo "TARGET_CPPFLAGS=$(TARGET_CPPFLAGS) -I$(pkglibdir) -I$(includedir)" ; \
  235. echo "STRIP=$(STRIP)" ; \
  236. echo "OBJCONV=$(OBJCONV)" ; \
  237. echo "TARGET_MODULE_FORMAT=$(TARGET_MODULE_FORMAT)" ; \
  238. echo "TARGET_APPLE_CC=$(TARGET_APPLE_CC)" ; \
  239. echo "COMMON_ASFLAGS=$(COMMON_ASFLAGS)" ; \
  240. echo "COMMON_CFLAGS=$(COMMON_CFLAGS)" ; \
  241. echo "COMMON_LDFLAGS=$(COMMON_LDFLAGS)"\
  242. ) > $@," GEN $@")
  243. pkglib_BUILDDIR += config.h grub_script.tab.h
  244. all-local: $(PROGRAMS) $(GRUB_EMU) $(PKGLIB) $(PKGDATA) $(SCRIPTS) $(INFOS) $(MKFILES) $(foreach lang, $(LINGUAS), po/$(lang).mo)
  245. install: install-local
  246. install-local: all
  247. $(SHELL) $(mkinstalldirs) $(DESTDIR)$(pkglibdir)
  248. rm -f $(DESTDIR)$(pkglibdir)/*
  249. @list='$(PKGLIB)'; \
  250. for file in $$list; do \
  251. if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
  252. dest="`echo $$file | sed 's,.*/,,;s,grub,burg,'`"; \
  253. $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(pkglibdir)/$$dest; \
  254. done
  255. $(SHELL) $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
  256. @list='$(PKGDATA)'; \
  257. for file in $$list; do \
  258. if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
  259. dest="`echo $$file | sed 's,.*/,,;s,grub,burg,'`"; \
  260. $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(pkgdatadir)/$$dest; \
  261. done
  262. $(SHELL) $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1
  263. @list='$(bin_UTILITIES) $(GRUB_EMU)'; for file in $$list; do \
  264. if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
  265. dest="`echo $$file | sed 's,.*/,,;s,grub,burg,' | sed '$(transform)'`"; \
  266. $(INSTALL_PROGRAM) $$dir$$file $(DESTDIR)$(bindir)/$$dest; \
  267. $(HELP2MAN) --section=1 -o $(DESTDIR)$(mandir)/man1/$$dest.1 $(builddir)/$$file; \
  268. done
  269. $(SHELL) $(mkinstalldirs) $(DESTDIR)$(sbindir) $(DESTDIR)$(mandir)/man8
  270. @list='$(sbin_UTILITIES)'; for file in $$list; do \
  271. if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
  272. dest="`echo $$file | sed 's,.*/,,;s,grub,burg,' | sed '$(transform)'`"; \
  273. $(INSTALL_PROGRAM) $$dir$$file $(DESTDIR)$(sbindir)/$$dest; \
  274. $(HELP2MAN) --section=8 -o $(DESTDIR)$(mandir)/man8/$$dest.8 $(builddir)/$$file; \
  275. done
  276. @list='$(bin_SCRIPTS)'; for file in $$list; do \
  277. if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
  278. dest="`echo $$file | sed 's,.*/,,;s,grub,burg,' | sed '$(transform)'`"; \
  279. $(INSTALL_SCRIPT) $$dir$$file $(DESTDIR)$(bindir)/$$dest; \
  280. $(HELP2MAN) --section=1 -o $(DESTDIR)$(mandir)/man1/$$dest.1 $(builddir)/$$file; \
  281. done
  282. @list='$(sbin_SCRIPTS)'; for file in $$list; do \
  283. if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
  284. dest="`echo $$file | sed 's,.*/,,;s,grub,burg,' | sed '$(transform)'`"; \
  285. $(INSTALL_SCRIPT) $$dir$$file $(DESTDIR)$(sbindir)/$$dest; \
  286. $(HELP2MAN) --section=8 -o $(DESTDIR)$(mandir)/man8/$$dest.8 $(builddir)/$$file; \
  287. done
  288. $(SHELL) $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/$(PACKAGE_TARNAME).d
  289. @list='$(grub-mkconfig_SCRIPTS)'; for file in $$list; do \
  290. if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
  291. dest="`echo $$file | sed 's,.*/,,;s,grub,burg,' | sed '$(transform)'`"; \
  292. $(INSTALL_SCRIPT) $$dir$$file $(DESTDIR)$(sysconfdir)/$(PACKAGE_TARNAME).d/$$dest; \
  293. done
  294. @list='$(grub-mkconfig_DATA)'; for file in $$list; do \
  295. if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
  296. dest="`echo $$file | sed 's,.*/,,;s,grub,burg,' | sed '$(transform)'`"; \
  297. $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(sysconfdir)/$(PACKAGE_TARNAME).d/$$dest; \
  298. done
  299. $(SHELL) $(mkinstalldirs) $(DESTDIR)$(libdir)/$(PACKAGE_TARNAME)
  300. @list='$(lib_SCRIPTS)'; \
  301. for file in $$list; do \
  302. if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
  303. dest="`echo $$file | sed 's,.*/,,;s,grub,burg,'`"; \
  304. $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(libdir)/$(PACKAGE_TARNAME)/$$dest; \
  305. done
  306. @langs='$(LINGUAS)'; \
  307. for lang in $$langs; do \
  308. $(SHELL) $(mkinstalldirs) $(DESTDIR)/$(datadir)/locale/$$lang/LC_MESSAGES; \
  309. file="po/$$lang.mo"; \
  310. if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
  311. $(INSTALL_DATA) $$dir$$file $(DESTDIR)/$(datadir)/locale/$$lang/LC_MESSAGES/$(PACKAGE).mo; \
  312. done
  313. $(SHELL) $(mkinstalldirs) $(DESTDIR)$(infodir)
  314. @list='$(info_INFOS)'; \
  315. for file in $$list; do \
  316. if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
  317. dest="`echo $$file | sed 's,.*/,,;s,grub,burg,'`"; \
  318. $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(infodir)/$$dest; \
  319. if (install-info --version && \
  320. install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
  321. install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$dest" || :; \
  322. fi; \
  323. done
  324. install-strip:
  325. $(MAKE) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" install
  326. uninstall:
  327. @list='$(PKGLIB)'; \
  328. for file in $$list; do \
  329. dest="`echo $$file | sed 's,.*/,,;s,grub,burg,'`"; \
  330. rm -f $(DESTDIR)$(pkglibdir)/$$dest; \
  331. done
  332. @list='$(PKGDATA)'; \
  333. for file in $$list; do \
  334. dest="`echo $$file | sed 's,.*/,,;s,grub,burg,'`"; \
  335. rm -f $(DESTDIR)$(pkgdatadir)/$$dest; \
  336. done
  337. @list='$(bin_UTILITIES) $(bin_SCRIPTS) $(GRUB_EMU)'; for file in $$list; do \
  338. dest="`echo $$file | sed 's,.*/,,;s,grub,burg,' | sed '$(transform)'`"; \
  339. rm -f $(DESTDIR)$(bindir)/$$dest; \
  340. rm -f $(DESTDIR)$(mandir)/man1/$$dest.1; \
  341. done
  342. @list='$(sbin_UTILITIES) $(sbin_SCRIPTS)'; for file in $$list; do \
  343. dest="`echo $$file | sed 's,.*/,,;s,grub,burg,' | sed '$(transform)'`"; \
  344. rm -f $(DESTDIR)$(sbindir)/$$dest; \
  345. rm -f $(DESTDIR)$(mandir)/man8/$$dest.8; \
  346. done
  347. @list='$(grub-mkconfig_SCRIPTS) $(grub-mkconfig_DATA)'; for file in $$list; do \
  348. dest="`echo $$file | sed 's,.*/,,;s,grub,burg,' | sed '$(transform)'`"; \
  349. rm -f $(DESTDIR)$(sysconfdir)/grub.d/$$dest; \
  350. done
  351. @list='$(lib_SCRIPTS)'; \
  352. for file in $$list; do \
  353. dest="`echo $$file | sed 's,.*/,,;s,grub,burg,'`"; \
  354. rm -f $(DESTDIR)$(libdir)/grub/$$dest; \
  355. done
  356. @list='$(info_INFOS)'; \
  357. for file in $$list; do \
  358. dest="`echo $$file | sed 's,.*/,,;s,grub,burg,'`"; \
  359. if (install-info --version && \
  360. install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
  361. if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$dest"; then \
  362. :; \
  363. else \
  364. test ! -f "$(DESTDIR)$(infodir)/$$dest" || exit 1; \
  365. fi; \
  366. fi; \
  367. rm -f $(DESTDIR)$(infodir)/$$dest; \
  368. done
  369. clean: $(CLEAN_IMAGE_TARGETS) $(CLEAN_MODULE_TARGETS) $(CLEAN_UTILITY_TARGETS)
  370. -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
  371. mostlyclean: clean $(MOSTLYCLEAN_IMAGE_TARGETS) $(MOSTLYCLEAN_MODULE_TARGETS) $(MOSTLYCLEAN_UTILITY_TARGETS)
  372. -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
  373. distclean: mostlyclean
  374. -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
  375. -rm -rf $(srcdir)/autom4te.cache
  376. maintainer-clean: distclean
  377. -test -z "$(MAINTAINER_CLEANFILES)" || rm -f $(MAINTAINER_CLEANFILES)
  378. -rmdir $(srcdir)/lib/libgcrypt-grub/cipher
  379. -rmdir $(srcdir)/lib/libgcrypt-grub
  380. info:
  381. dvi:
  382. distdir=$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
  383. DISTLIST: gendistlist.sh
  384. $(SHELL) $(srcdir)/gendistlist.sh > $(srcdir)/DISTLIST
  385. distdir: DISTLIST
  386. -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
  387. $(SHELL) $(mkinstalldirs) $(distdir)
  388. for i in `cat $(srcdir)/DISTLIST`; do \
  389. dir=`echo "$$i" | sed 's:/[^/]*$$::'`; \
  390. if test -d $(srcdir)/$$dir; then \
  391. $(SHELL) $(mkinstalldirs) $(distdir)/$$dir; \
  392. fi; \
  393. cp -p $(srcdir)/$$i $(distdir)/$$i || exit 1; \
  394. done
  395. chmod -R a+r $(distdir)
  396. GZIP_ENV = --best
  397. dist: distdir
  398. tar chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
  399. -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
  400. distcheck: dist
  401. -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
  402. GZIP=$(GZIP_ENV) gzip -cd $(distdir).tar.gz | tar xf -
  403. chmod -R a-w $(distdir)
  404. chmod a+w $(distdir)
  405. mkdir $(distdir)/=build
  406. mkdir $(distdir)/=inst
  407. chmod a-w $(distdir)
  408. dc_instdir=`CDPATH=: && cd $(distdir)/=inst && pwd` \
  409. && cd $(distdir)/=build \
  410. && $(SHELL) ../configure --srcdir=.. --prefix=$$dc_instdir \
  411. && $(MAKE) all dvi check install && $(MAKE) uninstall \
  412. && (test `find $$dc_instdir -type f -print | wc -l` -le 1 \
  413. || (echo "Error: files left after uninstall" 1>&2; \
  414. exit 1)) \
  415. && $(MAKE) dist && $(MAKE) distclean \
  416. && rm -f $(distdir).tar.gz \
  417. && (test `find . -type f -print | wc -l` -eq 0 \
  418. || (echo "Error: files left after distclean" 1>&2; \
  419. exit 1))
  420. -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
  421. @echo "$(distdir).tar.gz is ready for distribution" | \
  422. sed 'h;s/./=/g;p;x;p;x'
  423. check: all $(UNIT_TESTS) $(FUNCTIONAL_TESTS) $(SCRIPTED_TESTS)
  424. @list="$(UNIT_TESTS)"; \
  425. set -e; \
  426. for file in $$list; do \
  427. $(builddir)/$$file; \
  428. done
  429. @list="$(FUNCTIONAL_TESTS)"; \
  430. set -e; \
  431. for file in $$list; do \
  432. mod=`basename $$file .mod`; \
  433. echo "insmod functional_test; insmod $$mod; functional_test" \
  434. | $(builddir)/grub-shell; \
  435. done
  436. @list="$(SCRIPTED_TESTS)"; \
  437. set -e; \
  438. for file in $$list; do \
  439. $(builddir)/$$file; \
  440. done
  441. .SUFFIX:
  442. .SUFFIX: .c .o .S .d
  443. # Regenerate configure and Makefile automatically.
  444. $(srcdir)/aclocal.m4: configure.ac acinclude.m4
  445. cd $(srcdir) && aclocal
  446. $(srcdir)/configure: configure.ac aclocal.m4
  447. cd $(srcdir) && autoconf
  448. $(srcdir)/config.h.in: stamp-h.in
  449. $(srcdir)/stamp-h.in: configure.ac aclocal.m4
  450. cd $(srcdir) && autoheader
  451. echo timestamp > $(srcdir)/stamp-h.in
  452. config.h: stamp-h
  453. stamp-h: config.h.in config.status
  454. $(SHELL) ./config.status
  455. Makefile: Makefile.in config.status
  456. $(SHELL) ./config.status
  457. config.status: configure
  458. $(SHELL) ./config.status --recheck
  459. gensymlist.sh: gensymlist.sh.in config.status
  460. $(SHELL) ./config.status
  461. genkernsyms.sh: genkernsyms.sh.in config.status
  462. $(SHELL) ./config.status
  463. $(srcdir)/po/$(PACKAGE).pot: po/POTFILES po/POTFILES-shell
  464. cd $(srcdir) && $(XGETTEXT) -ctranslate --from-code=utf-8 -o po/$(PACKAGE).pot -f po/POTFILES --keyword=_ --keyword=N_
  465. cd $(srcdir) && $(XGETTEXT) -ctranslate --from-code=utf-8 -o po/$(PACKAGE).pot -f po/POTFILES-shell -j --language=Shell
  466. $(foreach lang, $(LINGUAS), $(srcdir)/po/$(lang).po): po/$(PACKAGE).pot
  467. $(MSGMERGE) --backup=none -U $@ $^
  468. po/%.mo: po/%.po
  469. $(MKDIR_P) $$(dirname $@)
  470. $(MSGFMT) -c --statistics -o $@ $^
  471. .PHONY: all install install-strip uninstall clean mostlyclean distclean
  472. .PHONY: maintainer-clean info dvi dist check
  473. # Prevent an overflow.
  474. .NOEXPORT:
  475. .DELETE_ON_ERROR:
  476. quiet-command = $(if $(V),$1,$(if $(2),@echo $2 && $1, @$1))