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