483 lines
15 KiB
Makefile
483 lines
15 KiB
Makefile
# -*- makefile -*-
|
|
#
|
|
# Copyright (C) 1994,1995,1996,1997,1998,1999,2000,2001,2002,2004,2005,2006,2007,2008,2009 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.
|
|
|
|
SHELL = /bin/sh
|
|
|
|
@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@
|
|
infodir = @infodir@
|
|
mandir = @mandir@
|
|
includedir = @includedir@
|
|
pkgdatadir = $(datadir)/`echo @PACKAGE_TARNAME@ | sed '$(transform)'`
|
|
pkglibdir = $(libdir)/`echo @PACKAGE_TARNAME@/$(target_cpu)-$(platform) | sed '$(transform)'`
|
|
|
|
LINGUAS = ca
|
|
|
|
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
|
|
|
|
CC = @CC@
|
|
CFLAGS = @CFLAGS@
|
|
ASFLAGS = @ASFLAGS@
|
|
LDFLAGS = @LDFLAGS@
|
|
CPPFLAGS = @CPPFLAGS@ -I$(builddir) -I$(builddir)/include -I$(srcdir)/include -Wall -W \
|
|
-DGRUB_LIBDIR=\"$(pkglibdir)\"
|
|
TARGET_CC = @TARGET_CC@
|
|
TARGET_CFLAGS = @TARGET_CFLAGS@
|
|
TARGET_ASFLAGS = @TARGET_ASFLAGS@
|
|
TARGET_MODULE_FORMAT = @TARGET_MODULE_FORMAT@
|
|
TARGET_APPLE_CC = @TARGET_APPLE_CC@
|
|
OBJCONV = @OBJCONV@
|
|
TARGET_CPPFLAGS = @TARGET_CPPFLAGS@ -nostdinc -isystem $(shell $(TARGET_CC) -print-file-name=include) -I$(srcdir)/include -I$(builddir) -I$(builddir)/include \
|
|
-Wall -W
|
|
TARGET_LDFLAGS = @TARGET_LDFLAGS@
|
|
TARGET_IMG_LDSCRIPT = @TARGET_IMG_LDSCRIPT@
|
|
TARGET_IMG_LDFLAGS = @TARGET_IMG_LDFLAGS@
|
|
TARGET_IMG_CFLAGS = @TARGET_IMG_CFLAGS@
|
|
TARGET_OBJ2ELF = @TARGET_OBJ2ELF@
|
|
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@
|
|
YACC = @YACC@
|
|
UNIFONT_BDF = @UNIFONT_BDF@
|
|
|
|
# Options.
|
|
enable_grub_emu = @enable_grub_emu@
|
|
enable_grub_emu_usb = @enable_grub_emu_usb@
|
|
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 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 include/grub/cpu include/grub/machine \
|
|
gensymlist.sh genkernsyms.sh build_env.mk
|
|
MAINTAINER_CLEANFILES = $(srcdir)/configure $(addprefix $(srcdir)/,$(MKFILES)) \
|
|
$(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
|
|
|
|
include $(srcdir)/conf/$(target_cpu)-$(platform).mk
|
|
|
|
# For external modules.
|
|
-include $(wildcard $(GRUB_CONTRIB)/*/conf/common.mk)
|
|
|
|
### General targets.
|
|
|
|
CLEANFILES += $(pkglib_DATA) $(pkgdata_DATA) po/*.mo
|
|
pkglib_DATA += moddep.lst command.lst fs.lst partmap.lst parttool.lst handler.lst
|
|
moddep.lst: $(DEFSYMFILES) $(UNDSYMFILES) genmoddep.awk
|
|
cat $(DEFSYMFILES) /dev/null \
|
|
| $(AWK) -f $(srcdir)/genmoddep.awk $(UNDSYMFILES) > $@ \
|
|
|| (rm -f $@; exit 1)
|
|
|
|
command.lst: $(COMMANDFILES)
|
|
cat $^ /dev/null | sort > $@
|
|
|
|
fs.lst: $(FSFILES)
|
|
cat $^ /dev/null | sort > $@
|
|
|
|
partmap.lst: $(PARTMAPFILES)
|
|
cat $^ /dev/null | sort > $@
|
|
|
|
handler.lst: $(HANDLERFILES)
|
|
cat $^ /dev/null | sort > $@
|
|
|
|
parttool.lst: $(PARTTOOLFILES)
|
|
cat $^ /dev/null | sort | uniq > $@
|
|
|
|
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 (, $(UNIFONT_BDF))
|
|
else
|
|
|
|
ifeq ($(enable_grub_mkfont),yes)
|
|
|
|
pkgdata_DATA += unicode.pf2 ascii.pf2
|
|
|
|
# Arrows and lines are needed to draw the menu, so we always include them
|
|
UNICODE_ARROWS=0x2190-0x2193
|
|
UNICODE_LINES=0x2501-0x251B
|
|
|
|
unicode.pf2: $(UNIFONT_BDF) grub-mkfont
|
|
$(builddir)/grub-mkfont -o $@ $(UNIFONT_BDF)
|
|
|
|
ascii.pf2: $(UNIFONT_BDF) grub-mkfont
|
|
$(builddir)/grub-mkfont -o $@ $(UNIFONT_BDF) -r 0x0-0x7f,$(UNICODE_ARROWS),$(UNICODE_LINES)
|
|
endif
|
|
endif
|
|
|
|
# Used for building modules externally
|
|
pkglib_BUILDDIR += build_env.mk
|
|
build_env.mk: Makefile
|
|
(\
|
|
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)"\
|
|
) > $@
|
|
pkglib_BUILDDIR += config.h grub_script.tab.h
|
|
|
|
all-local: $(PROGRAMS) $(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,.*/,,'`"; \
|
|
$(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,.*/,,'`"; \
|
|
$(INSTALL_DATA) $$dir$$file $(DESTDIR)$(pkgdatadir)/$$dest; \
|
|
done
|
|
$(SHELL) $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1
|
|
@list='$(bin_UTILITIES)'; for file in $$list; do \
|
|
if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
|
|
dest="`echo $$file | sed 's,.*/,,' | 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,.*/,,' | 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,.*/,,' | 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,.*/,,' | 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)/grub.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,.*/,,' | sed '$(transform)'`"; \
|
|
$(INSTALL_SCRIPT) $$dir$$file $(DESTDIR)$(sysconfdir)/grub.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,.*/,,' | sed '$(transform)'`"; \
|
|
$(INSTALL_DATA) $$dir$$file $(DESTDIR)$(sysconfdir)/grub.d/$$dest; \
|
|
done
|
|
$(SHELL) $(mkinstalldirs) $(DESTDIR)$(libdir)/grub
|
|
@list='$(lib_SCRIPTS)'; \
|
|
for file in $$list; do \
|
|
if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
|
|
dest="`echo $$file | sed 's,.*/,,'`"; \
|
|
$(INSTALL_DATA) $$dir$$file $(DESTDIR)$(libdir)/grub/$$dest; \
|
|
done
|
|
$(foreach lang, $(LINGUAS), \
|
|
$(SHELL) $(mkinstalldirs) $(DESTDIR)/$(datadir)/locale/$(lang)/LC_MESSAGES
|
|
@list='po/$(lang).mo'; \
|
|
for file in $$list; do \
|
|
if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
|
|
$(INSTALL_DATA) $$dir$$file $(DESTDIR)/$(datadir)/locale/$(lang)/LC_MESSAGES/grub.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,.*/,,'`"; \
|
|
$(INSTALL_DATA) $$dir$$file $(DESTDIR)$(infodir); \
|
|
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,.*/,,'`"; \
|
|
rm -f $(DESTDIR)$(pkglibdir)/$$dest; \
|
|
done
|
|
@list='$(PKGDATA)'; \
|
|
for file in $$list; do \
|
|
dest="`echo $$file | sed 's,.*/,,'`"; \
|
|
rm -f $(DESTDIR)$(pkgdatadir)/$$dest; \
|
|
done
|
|
@list='$(bin_UTILITIES) $(bin_SCRIPTS)'; for file in $$list; do \
|
|
dest="`echo $$file | sed 's,.*/,,' | 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,.*/,,' | 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,.*/,,' | sed '$(transform)'`"; \
|
|
rm -f $(DESTDIR)$(sysconfdir)/grub.d/$$dest; \
|
|
done
|
|
@list='$(lib_SCRIPTS)'; \
|
|
for file in $$list; do \
|
|
dest="`echo $$file | sed 's,.*/,,'`"; \
|
|
echo rm -f $(DESTDIR)$(libdir)/$$dest; \
|
|
rm -f $(DESTDIR)$(libdir)/grub/$$dest; \
|
|
done
|
|
@list='$(info_INFOS)'; \
|
|
for file in $$list; do \
|
|
dest="`echo $$file | sed 's,.*/,,'`"; \
|
|
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)
|
|
|
|
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:
|
|
|
|
.SUFFIX:
|
|
.SUFFIX: .c .o .S .d
|
|
|
|
# Regenerate configure and Makefile automatically.
|
|
$(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
|
|
|
|
po/messages.pot: po/POTFILES
|
|
xgettext --from-code=utf-8 --keyword=_ -f $< -o $@
|
|
|
|
po/*.po: po/messages.pot
|
|
msgmerge -U $@ po/messages.pot
|
|
|
|
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:
|