From 610c1efd103a09991eb8123490a812f6900e0f02 Mon Sep 17 00:00:00 2001 From: BVK Chaitanya Date: Thu, 3 Jun 2010 15:30:15 +0530 Subject: [PATCH] more cleanup --- Makefile.am | 5 ++-- configure.common | 6 +++-- grub-core/Makefile.am | 12 ++++++---- grub-core/Makefile.extra-dist | 43 ----------------------------------- grub-core/Makefile.vars | 7 +++--- grub-core/modules.def | 19 ++++++++++------ 6 files changed, 31 insertions(+), 61 deletions(-) delete mode 100644 grub-core/Makefile.extra-dist diff --git a/Makefile.am b/Makefile.am index 6b6f9e10c..9ced44636 100644 --- a/Makefile.am +++ b/Makefile.am @@ -17,8 +17,8 @@ CCASFLAGS_LIBRARY = $(CCASFLAGS_PROGRAM) AM_CFLAGS = AM_LDFLAGS = -AM_CPPFLAGS = $(CPPFLAGS_GRUB) -DGRUB_FILE=\"$(subst $(top_srcdir)/,,$<)\" -AM_CCASFLAGS = -DASM_FILE=1 +AM_CPPFLAGS = $(CPPFLAGS_GRUB) +AM_CCASFLAGS = $(CCASFLAGS_GRUB) include $(srcdir)/modules.am @@ -73,4 +73,5 @@ ascii.h: ascii.bitmaps grub-bin2h cp $@ $(top_builddir)/grub-core/include CLEANFILES += ascii.h $(top_builddir)/grub-core/include/ascii.h +# Install config.h into platformdir platform_HEADERS = config.h diff --git a/configure.common b/configure.common index ecd9ff190..815c76c53 100644 --- a/configure.common +++ b/configure.common @@ -779,12 +779,14 @@ fi if test x"$device_mapper_excuse" = x ; then # Check for device-mapper library. AC_CHECK_LIB([devmapper], [dm_task_create], - [LDFLAGS="$LDFLAGS -ldevmapper" + [HOST_LDFLAGS="$HOST_LDFLAGS -ldevmapper" AC_DEFINE([HAVE_DEVICE_MAPPER], [1], [Define to 1 if you have the devmapper library.])], [device_mapper_excuse="need devmapper library"]) fi -AC_SUBST(ASFLAGS) + +pkglibrootdir='$(libdir)'/`echo $PACKAGE | sed "$program_transform_name"` +AC_SUBST(pkglibrootdir) AC_SUBST([FONT_SOURCE]) AS_IF([test x$target_cpu = xi386 -a x$platform = xpc], diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am index 1f2657656..71abb5a7a 100644 --- a/grub-core/Makefile.am +++ b/grub-core/Makefile.am @@ -1,8 +1,12 @@ AUTOMAKE_OPTIONS = subdir-objects SUBDIRS = po DEPDIR = .deps-core +EXTRA_DIST = gentpl.py modules.def Makefile.tpl genmoddep.awk +EXTRA_DIST += genmodsrc.sh gensymlist.sh genemuinit.sh genemuinitheader.sh +EXTRA_DIST += genfslist.sh gencmdlist.sh genvideolist.sh genhandlerlist.sh +EXTRA_DIST += genpartmaplist.sh genparttoollist.sh genterminallist.sh +EXTRA_DIST += $(shell find $(top_srcdir) -name '*.h') -include $(top_srcdir)/Makefile.extra-dist include $(top_srcdir)/Makefile.vars LDADD_KERNEL = -lgcc @@ -30,10 +34,10 @@ LDFLAGS_PROGRAM = $(TARGET_LDFLAGS) $(LDFLAGS_CPU) $(LDFLAGS_PLATFORM) CPPFLAGS_PROGRAM = $(TARGET_CPPFLAGS) $(CPPFLAGS_CPU) $(CPPFLAGS_PLATFORM) CCASFLAGS_PROGRAM = $(TARGET_CCASFLAGS) $(CCASFLAGS_CPU) $(CCASFLAGS_PLATFORM) -AM_CFLAGS = +AM_CFLAGS = AM_LDFLAGS = -AM_CPPFLAGS = $(CPPFLAGS_GRUB) -DGRUB_FILE=\"$(subst $(top_srcdir)/,,$<)\" -AM_CCASFLAGS = -DASM_FILE=1 +AM_CPPFLAGS = $(CPPFLAGS_GRUB) +AM_CCASFLAGS = $(CCASFLAGS_GRUB) # gentrigtables gentrigtables: $(top_srcdir)/gentrigtables.c diff --git a/grub-core/Makefile.extra-dist b/grub-core/Makefile.extra-dist deleted file mode 100644 index 9979c875b..000000000 --- a/grub-core/Makefile.extra-dist +++ /dev/null @@ -1,43 +0,0 @@ -# -# Extra files that need to be distributed (in .tar.gz) to build -# successfully on user site. -# -# XXX Remove wildcards; See 27.3 in automake.info -# - -EXTRA_DIST = - -EXTRA_DIST += gentpl.py -EXTRA_DIST += Makefile.tpl -EXTRA_DIST += modules.def - -EXTRA_DIST += gentrigtables.c - -EXTRA_DIST += genmoddep.awk -EXTRA_DIST += genmodsrc.sh -EXTRA_DIST += gensymlist.sh - -EXTRA_DIST += genemuinit.sh -EXTRA_DIST += genemuinitheader.sh - -EXTRA_DIST += genfslist.sh -EXTRA_DIST += gencmdlist.sh -EXTRA_DIST += genvideolist.sh -EXTRA_DIST += genhandlerlist.sh -EXTRA_DIST += genpartmaplist.sh -EXTRA_DIST += genparttoollist.sh -EXTRA_DIST += genterminallist.sh - -EXTRA_DIST += lib/libgcrypt_wrap/cipher_wrap.h -EXTRA_DIST += lib/libgcrypt-grub/cipher/crypto.lst - -EXTRA_DIST += kern/i386/loader.S -EXTRA_DIST += kern/i386/realmode.S -EXTRA_DIST += loader/i386/bsdXX.c -EXTRA_DIST += loader/i386/bsd_pagetable.c -EXTRA_DIST += commands/search.c - -EXTRA_DIST += kern/i386/pc/lzma_decode.S - -EXTRA_DIST += $(shell find $(top_srcdir) -name '*.h') - diff --git a/grub-core/Makefile.vars b/grub-core/Makefile.vars index 7d398b4c9..db3c2a7db 100644 --- a/grub-core/Makefile.vars +++ b/grub-core/Makefile.vars @@ -1,8 +1,7 @@ # -*- makefile -*- -pkglibroot = $(libdir)/$(shell echo $(PACKAGE) | sed "$(transform)") grubconfdir = $(sysconfdir)/grub.d -platformdir = $(pkglibroot)/$(target_cpu)-$(platform) +platformdir = $(pkglibrootdir)/$(target_cpu)-$(platform) # Platform specific options if COND_i386_pc @@ -32,9 +31,11 @@ if COND_sparc64_ieee1275 LDFLAGS_PLATFORM = -melf64_sparc -mno-relax endif -CPPFLAGS_GRUB = -I$(builddir) -I$(srcdir) -I$(top_builddir) -I$(top_srcdir) +CPPFLAGS_GRUB = -DGRUB_FILE=\"`basename $<`\" +CPPFLAGS_GRUB += -I$(builddir) -I$(srcdir) -I$(top_builddir) -I$(top_srcdir) CPPFLAGS_GRUB += -I$(top_srcdir)/$(grub_coredir)/include CPPFLAGS_GRUB += -I$(top_builddir)/$(grub_coredir)/include +CCASFLAGS_GRUB = -DASM_FILE=1 CFLAGS_GCRY = -Wno-error -Wno-missing-field-initializers CPPFLAGS_GCRY = -I$(top_srcdir)/$(grub_coredir)/lib/libgcrypt_wrap diff --git a/grub-core/modules.def b/grub-core/modules.def index 348738971..c64217d5d 100644 --- a/grub-core/modules.def +++ b/grub-core/modules.def @@ -215,6 +215,10 @@ kernel = { emu = kern/emu/console.c; emu = disk/host.c; emu = gnulib/progname.c; + + extra_dist = kern/i386/loader.S; + extra_dist = kern/i386/realmode.S; + extra_dist = kern/i386/pc/lzma_decode.S; }; program = { @@ -247,6 +251,7 @@ program = { module = { name = trig; nodist = trigtables.c; + extra_dist = gentrigtables.c; common; }; @@ -349,13 +354,6 @@ library = { name = libgnulib.a; source = gnulib/regex.c; - extra_dist = gnulib/progname.h; - extra_dist = gnulib/alloca.h; - extra_dist = gnulib/error.h; - extra_dist = gnulib/fnmatch.h; - extra_dist = gnulib/getopt.h; - extra_dist = gnulib/getopt_int.h; - extra_dist = gnulib/gettext.h; extra_dist = gnulib/regcomp.c; extra_dist = gnulib/regexec.c; extra_dist = gnulib/fnmatch_loop.c; @@ -633,6 +631,7 @@ module = { common; name = search; source = commands/search_wrap.c; + extra_dist = commands/search.c; }; module = { @@ -1066,6 +1065,8 @@ module = { common; name = crypto; source = lib/crypto.c; + + extra_dist = lib/libgcrypt-grub/cipher/crypto.lst; }; module = { @@ -1273,6 +1274,10 @@ module = { source = loader/i386/bsd64.c; source = loader/i386/bsd_helper.S; source = loader/i386/bsd_trampoline.S; + + extra_dist = loader/i386/bsdXX.c; + extra_dist = loader/i386/bsd_pagetable.c; + i386_pc; i386_qemu; i386_coreboot;