build process is cleaned up

This commit is contained in:
okuji 1999-06-24 00:03:29 +00:00
parent bd6d015f8e
commit 9350d46a2a
54 changed files with 1479 additions and 1649 deletions

140
ChangeLog
View file

@ -1,3 +1,143 @@
1999-06-24 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
Build process is cleaned up. Stage 2 and Stage 1.5's are all
built in the directory stage2.
From Pavel Roskin <pavel_roskin@geocities.com>:
* Makefile.am (SUBDIRS): e2fs_stage1_5, ffs_stage1_5,
fat_stage1_5 and shared_src are removed.
(DISTCLEANFILES): Deleted.
* configure.in: Call AC_PROG_RANLIB.
(AC_INIT): Change the argument to stage2/stage2.c.
(LIBS): Renamed to ...
(GRUB_LIBS): ... this, and call AC_SUBST for this.
Our own rules are removed.
(AC_OUTPUT): e2fs_stage1_5/Makefile, ffs_stage1_5/Makefile,
fat_stage1_5/Makefile and shared_src/Makefile are removed.
* docs/Makefile.am (HELP2MAN): The prefix $(srcdir) is removed.
[GRUB_MAINT]: Prepend $(srcdir) to $(HELP2MAN).
* e2fs_stage1_5/Makefile.am: Deleted.
* e2fs_stage1_5/Makefile.in: Likewise.
* fat_stage1_5/Makefile.am: Likewise.
* fat_stage1_5/Makefile.in: Likewise.
* ffs_stage1_5/Makefile.am: Likewise.
* ffs_stage1_5/Makefile.in: Likewise.
* grub/Makefile.am (CLEANFILES): Likewise.
(COMPILE): Likewise.
(INCLUDES): Likewise.
(DEP_FILES): Likewise.
(@SHARED_SRC_RULES@): Likewise.
(AM_CFLAGS): New variable.
(grub_LDADD): Set to the library libgrub.a and @GRUB_LIBS@.
* shared_src/Makefile.am: Deleted.
* shared_src/Makefile.in: Likewise.
* shared_src/apic.h: Moved to ...
* stage2/apic.h: ... here.
* shared_src/asm.S: Moved to ...
* stage2/asm.S: ... here.
* shared_src/bios.c: Moved to ...
* stage2/bios.c: ... here.
* shared_src/boot.c: Moved to ...
* stage2/boot.c: ... here.
* shared_src/char_io.c: Moved to ...
* stage2/char_io.c: ... here.
* shared_src/cmdline.c: Moved to ...
* stage2/cmdline.c: ... here.
* shared_src/common.c: Moved to ...
* stage2/common.c: ... here.
* shared_src/defs.h: Moved to ...
* stage2/defs.h: ... here.
* shared_src/dir.h: Moved to ...
* stage2/dir.h: ... here.
* shared_src/disk_inode.h: Moved to ...
* stage2/disk_inode.h: ... here.
* shared_src/disk_inode_ffs.h: Moved to ...
* stage2/disk_inode_ffs.h: ... here.
* shared_src/disk_io.c: Moved to ...
* stage2/disk_io.c: ... here.
* shared_src/fat.h: Moved to ...
* stage2/fat.h: ... here.
* shared_src/filesys.h: Moved to ...
* stage2/filesys.h: ... here.
* shared_src/freebsd.h: Moved to ...
* stage2/freebsd.h: ... here.
* shared_src/fs.h: Moved to ...
* stage2/fs.h: ... here.
* shared_src/fsys_ext2fs.c: Moved to ...
* stage2/fsys_ext2fs.c: ... here.
* shared_src/fsys_fat.c: Moved to ...
* stage2/fsys_fat.c: ... here.
* shared_src/fsys_ffs.c: Moved to ...
* stage2/fsys_ffs.c: ... here.
* shared_src/gunzip.c: Moved to ...
* stage2/gunzip.c: ... here.
* shared_src/i386-elf.h: Moved to ...
* stage2/i386-elf.h: ... here.
* shared_src/imgact_aout.h: Moved to ...
* stage2/imgact_aout.h: ... here.
* shared_src/mb_header.h: Moved to ...
* stage2/mb_header.h: ... here.
* shared_src/mb_info.h: Moved to ...
* stage2/mb_info.h: ... here.
* shared_src/pc_slice.h: Moved to ...
* stage2/pc_slice.h: ... here.
* shared_src/shared.h: Moved to ...
* stage2/shared.h: ... here.
* shared_src/smp-imps.c: Moved to ...
* stage2/smp-imps.c: ... here.
* shared_src/smp-imps.h: Moved to ...
* stage2/smp-imps.h: ... here.
* shared_src/stage1_5.c: Moved to ...
* stage2/stage1_5.c: ... here.
* shared_src/stage2.c: Moved to ...
* stage2/stage2.c: ... here.
* stage1/Makefile.am (pkgdata_DATA): Renamed to ...
(nodist_pkgdata_DATA): ... this.
(COMPILE): Deleted.
(AM_CFLAGS): New variable.
* stage2/Makefile.am: Completely rewritten from scratch.
(TESTS): New variable.
(noinst_SCRIPTS): Likewise.
(noinst_HEADERS): Likewise.
(EXTRA_DIST): Set to smp-imps.c and $(noinst_SCRIPTS).
(noinst_LIBRARIES): New variable.
(libgrub_a_SOURCES): Likewise.
(libgrub_a_CFLAGS): Likewise.
(pkgdata_DATA): Deleted.
(nodist_pkgdata_DATA): New variable.
(MOSTLYCLEANFILES): Set to $(noinst_PROGRAMS).
(COMPILE): Deleted.
(INCLUDES): Likewise.
(stage2_exec_LDADD): Likewise.
(DEP_FILES): Likewise.
(stage2_exec_SOURCES): Set to the actual source files instead of
dummy.
(DISTFILES): Deleted.
(stage2.exec): Likewise.
(stage2): Likewise.
(@SHARED_SRC_RULES@): Likewise.
(noinst_PROGRAMS): Set to executable formats of Stage 2 and
Stage 1.5's.
(STAGE2_LINK): New variable.
(STAGE2_COMPILE): Likewise.
(STAGE1_5_LINK): Likewise.
(STAGE1_5_COMPILE): Likewise.
(stage2_exec_CFLAGS): Likewise.
(stage2_exec_LDFLAGS): Likewise.
(e2fs_stage1_5_exec_SOURCES): Likewise.
(e2fs_stage1_5_exec_CFLAGS): Likewise.
(e2fs_stage1_5_exec_LDFLAGS): Likewise.
(fat_stage1_5_exec_SOURCES): Likewise.
(fat_stage1_5_exec_CFLAGS): Likewise.
(fat_stage1_5_exec_LDFLAGS): Likewise.
(ffs_stage1_5_exec_SOURCES): Likewise.
(ffs_stage1_5_exec_CFLAGS): Likewise.
(ffs_stage1_5_exec_LDFLAGS): Likewise.
(% : %.exec): New rule.
* stage2/size_test: New file, for checking for the sizes of
Stage 2 and Stage 1.5's.
1999-06-24 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
* stage1/stage1.S: Call testb instead of andb when checking if

View file

@ -1,7 +1,4 @@
SUBDIRS = grub stage1 stage2 \
e2fs_stage1_5 fat_stage1_5 ffs_stage1_5 \
docs shared_src debian
DISTCLEANFILES = ssrcrules.mk
SUBDIRS = stage1 stage2 docs debian grub
EXTRA_DIST = BUGS
# We get $(PACKAGE) and $(VERSION) from debian/changelog.

View file

@ -62,21 +62,19 @@ host_triplet = @host@
AMTAR = @AMTAR@
AMTARFLAGS = @AMTARFLAGS@
CC = @CC@
GRUB_LIBS = @GRUB_LIBS@
LD = @LD@
MAKEINFO = @MAKEINFO@
OBJCOPY = @OBJCOPY@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
VERSION = @VERSION@
host_cpu = @host_cpu@
host_vendor = @host_vendor@
install_sh = @install_sh@
SUBDIRS = grub stage1 stage2 \
e2fs_stage1_5 fat_stage1_5 ffs_stage1_5 \
docs shared_src debian
DISTCLEANFILES = ssrcrules.mk
SUBDIRS = stage1 stage2 docs debian grub
EXTRA_DIST = BUGS
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@ -302,7 +300,6 @@ clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
mostlyclean-am: mostlyclean-tags mostlyclean-generic

116
configure vendored
View file

@ -454,7 +454,7 @@ echo > confdefs.h
# A filename unique to this package, relative to the directory that
# configure is in, which we can look for to find out if srcdir is correct.
ac_unique_file=shared_src/fsys_ext2fs.c
ac_unique_file=stage2/stage2.c
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
@ -1208,6 +1208,36 @@ else
fi
fi
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1215: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_RANLIB="ranlib"
break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
fi
fi
RANLIB="$ac_cv_prog_RANLIB"
if test -n "$RANLIB"; then
echo "$ac_t""$RANLIB" 1>&6
else
echo "$ac_t""no" 1>&6
fi
# Enforce coding standards.
CPPFLAGS="$CPPFLAGS -Wall -Wmissing-prototypes -Wunused"
@ -1215,7 +1245,7 @@ CPPFLAGS="$CPPFLAGS -Wall -Wmissing-prototypes -Wunused"
# Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
set dummy ${ac_tool_prefix}ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1219: checking for $ac_word" >&5
echo "configure:1249: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_LD+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1247,7 +1277,7 @@ fi
# Extract the first word of "${ac_tool_prefix}objcopy", so it can be a program name with args.
set dummy ${ac_tool_prefix}objcopy; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1251: checking for $ac_word" >&5
echo "configure:1281: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_OBJCOPY+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1280,7 +1310,7 @@ fi
# Defined in acinclude.m4.
echo $ac_n "checking symbol names produced by ${CC-cc}""... $ac_c" 1>&6
echo "configure:1284: checking symbol names produced by ${CC-cc}" >&5
echo "configure:1314: checking symbol names produced by ${CC-cc}" >&5
if eval "test \"\${grub_cv_asm_ext_c+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1293,7 +1323,7 @@ func (int *list)
}
EOF
if { ac_try='${CC-cc} -S conftest.c'; { (eval echo configure:1297: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.s; then :
if { ac_try='${CC-cc} -S conftest.c'; { (eval echo configure:1327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.s; then :
else
{ echo "configure: error: ${CC-cc} failed to produce assembly code" 1>&2; exit 1; }
fi
@ -1322,7 +1352,7 @@ EOF
echo $ac_n "checking whether ${OBJCOPY} works for absolute addresses""... $ac_c" 1>&6
echo "configure:1326: checking whether ${OBJCOPY} works for absolute addresses" >&5
echo "configure:1356: checking whether ${OBJCOPY} works for absolute addresses" >&5
if eval "test \"\${grub_cv_prog_objcopy_absolute+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1334,21 +1364,21 @@ blah (void)
}
EOF
if { (eval echo configure:1338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then :
if { (eval echo configure:1368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then :
else
{ echo "configure: error: ${CC-cc} cannot compile C source code" 1>&2; exit 1; }
fi
grub_cv_prog_objcopy_absolute=yes
for link_addr in 2000 8000 7C00; do
if { ac_try='${LD-ld} -N -Ttext $link_addr conftest.o -o conftest.exec'; { (eval echo configure:1344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then :
if { ac_try='${LD-ld} -N -Ttext $link_addr conftest.o -o conftest.exec'; { (eval echo configure:1374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then :
else
{ echo "configure: error: ${LD-ld} cannot link at address $link_addr" 1>&2; exit 1; }
fi
if { ac_try='${OBJCOPY-objcopy} -O binary conftest.exec conftest'; { (eval echo configure:1348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then :
if { ac_try='${OBJCOPY-objcopy} -O binary conftest.exec conftest'; { (eval echo configure:1378: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then :
else
{ echo "configure: error: ${OBJCOPY-objcopy} cannot create binary files" 1>&2; exit 1; }
fi
if test ! -f conftest.old || { ac_try='cmp -s conftest.old conftest'; { (eval echo configure:1352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
if test ! -f conftest.old || { ac_try='cmp -s conftest.old conftest'; { (eval echo configure:1382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
mv -f conftest conftest.old
else
grub_cv_prog_objcopy_absolute=no
@ -1365,7 +1395,7 @@ fi
echo $ac_n "checking for .code16 addr32 assembler support""... $ac_c" 1>&6
echo "configure:1369: checking for .code16 addr32 assembler support" >&5
echo "configure:1399: checking for .code16 addr32 assembler support" >&5
if eval "test \"\${grub_cv_asm_addr32+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1375,7 +1405,7 @@ l1: addr32
movb %al, l1
EOF
if { ac_try='${CC-cc} -c conftest.s'; { (eval echo configure:1379: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then
if { ac_try='${CC-cc} -c conftest.s'; { (eval echo configure:1409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then
grub_cv_asm_addr32=yes
else
grub_cv_asm_addr32=no
@ -1390,7 +1420,7 @@ fi
# Check for curses libraries.
echo $ac_n "checking for getch in -lncurses""... $ac_c" 1>&6
echo "configure:1394: checking for getch in -lncurses" >&5
echo "configure:1424: checking for getch in -lncurses" >&5
ac_lib_var=`echo ncurses'_'getch | sed 'y%./+-%__p_%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -1398,7 +1428,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lncurses $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1402 "configure"
#line 1432 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -1409,7 +1439,7 @@ int main() {
getch()
; return 0; }
EOF
if { (eval echo configure:1413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -1424,7 +1454,7 @@ LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
LIBS="$LIBS -lncurses"
GRUB_LIBS="$GRUB_LIBS -lncurses"
cat >> confdefs.h <<\EOF
#define HAVE_LIBCURSES 1
EOF
@ -1432,7 +1462,7 @@ EOF
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for getch in -lcurses""... $ac_c" 1>&6
echo "configure:1436: checking for getch in -lcurses" >&5
echo "configure:1466: checking for getch in -lcurses" >&5
ac_lib_var=`echo curses'_'getch | sed 'y%./+-%__p_%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -1440,7 +1470,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcurses $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1444 "configure"
#line 1474 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -1451,7 +1481,7 @@ int main() {
getch()
; return 0; }
EOF
if { (eval echo configure:1455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -1466,7 +1496,7 @@ LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
LIBS="$LIBS -lcurses"
GRUB_LIBS="$GRUB_LIBS -lcurses"
cat >> confdefs.h <<\EOF
#define HAVE_LIBCURSES 1
EOF
@ -1478,36 +1508,6 @@ fi
fi
# Create rules for our shared sources.
SHARED_SRC_RULES=./ssrcrules.mk
echo creating $SHARED_SRC_RULES
rm -f $SHARED_SRC_RULES
cat > $SHARED_SRC_RULES <<EOF
# $SHARED_SRC_RULES - Rules for building objects from files in shared_src.
# Generated automatically by configure.
asm.o: \$(top_srcdir)/shared_src/asm.S
@echo '\$(COMPILE) -c \$(top_srcdir)/shared_src/asm.S'; \\
if test -d .deps; then \\
\$(COMPILE) -Wp,-MD,.deps/asm.P -c \$(top_srcdir)/shared_src/asm.S; \\
else \\
\$(COMPILE) -c \$(top_srcdir)/shared_src/asm.S; \\
fi
EOF
for f in boot common char_io cmdline disk_io gunzip fsys_ffs \
fsys_ext2fs fsys_fat stage1_5 stage2 bios; do
cat >> $SHARED_SRC_RULES <<EOF
$f.o: \$(top_srcdir)/shared_src/$f.c
@echo '\$(COMPILE) -c \$(top_srcdir)/shared_src/$f.c'; \\
if test -d .deps; then \\
\$(COMPILE) -Wp,-MD,.deps/$f.P -c \$(top_srcdir)/shared_src/$f.c; \\
else \\
\$(COMPILE) -c \$(top_srcdir)/shared_src/$f.c; \\
fi
EOF
done
trap '' 1 2 15
cat > confcache <<\EOF
@ -1622,10 +1622,8 @@ done
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
trap 'rm -fr `echo "Makefile grub/Makefile stage1/Makefile stage2/Makefile \
e2fs_stage1_5/Makefile fat_stage1_5/Makefile \
ffs_stage1_5/Makefile docs/Makefile shared_src/Makefile \
debian/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
trap 'rm -fr `echo "Makefile stage1/Makefile stage2/Makefile docs/Makefile \
debian/Makefile grub/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
@ -1684,10 +1682,10 @@ s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
s%@CC@%$CC%g
s%@RANLIB@%$RANLIB%g
s%@LD@%$LD%g
s%@OBJCOPY@%$OBJCOPY%g
/@SHARED_SRC_RULES@/r $SHARED_SRC_RULES
s%@SHARED_SRC_RULES@%%g
s%@GRUB_LIBS@%$GRUB_LIBS%g
CEOF
EOF
@ -1729,10 +1727,8 @@ EOF
cat >> $CONFIG_STATUS <<EOF
CONFIG_FILES=\${CONFIG_FILES-"Makefile grub/Makefile stage1/Makefile stage2/Makefile \
e2fs_stage1_5/Makefile fat_stage1_5/Makefile \
ffs_stage1_5/Makefile docs/Makefile shared_src/Makefile \
debian/Makefile"}
CONFIG_FILES=\${CONFIG_FILES-"Makefile stage1/Makefile stage2/Makefile docs/Makefile \
debian/Makefile grub/Makefile"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then

View file

@ -12,7 +12,7 @@ dnl "AS IS" CONDITION. THE FREE SOFTWARE FOUNDATION DISCLAIMS ANY
dnl LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE
dnl USE OF THIS SOFTWARE.
AC_INIT(shared_src/fsys_ext2fs.c)
AC_INIT(stage2/stage2.c)
dnl Grab the package and version from the top debian/changelog entry.
AM_INIT_AUTOMAKE(
esyscmd([sed 's/ .*$//; q' debian/changelog]),
@ -49,6 +49,7 @@ AM_CONDITIONAL(GRUB_MAINT, test "x${maintainermode}" = xyes)
AC_CHECK_TOOL(CC, gcc)
AC_PROG_CC
AC_PROG_RANLIB
# Enforce coding standards.
CPPFLAGS="$CPPFLAGS -Wall -Wmissing-prototypes -Wunused"
@ -69,44 +70,11 @@ if test "x$grub_cv_asm_addr32" != xyes; then
fi
# Check for curses libraries.
AC_CHECK_LIB(ncurses, getch, [LIBS="$LIBS -lncurses"
AC_CHECK_LIB(ncurses, getch, [GRUB_LIBS="$GRUB_LIBS -lncurses"
AC_DEFINE(HAVE_LIBCURSES)],
[AC_CHECK_LIB(curses, getch, [LIBS="$LIBS -lcurses"
[AC_CHECK_LIB(curses, getch, [GRUB_LIBS="$GRUB_LIBS -lcurses"
AC_DEFINE(HAVE_LIBCURSES)])])
AC_SUBST(GRUB_LIBS)
# Create rules for our shared sources.
AC_SUBST_FILE(SHARED_SRC_RULES)dnl
SHARED_SRC_RULES=./ssrcrules.mk
echo creating $SHARED_SRC_RULES
rm -f $SHARED_SRC_RULES
cat > $SHARED_SRC_RULES <<EOF
# $SHARED_SRC_RULES - Rules for building objects from files in shared_src.
# Generated automatically by configure.
asm.o: \$(top_srcdir)/shared_src/asm.S
@echo '\$(COMPILE) -c \$(top_srcdir)/shared_src/asm.S'; \\
if test -d .deps; then \\
\$(COMPILE) -Wp,-MD,.deps/asm.P -c \$(top_srcdir)/shared_src/asm.S; \\
else \\
\$(COMPILE) -c \$(top_srcdir)/shared_src/asm.S; \\
fi
EOF
for f in boot common char_io cmdline disk_io gunzip fsys_ffs \
fsys_ext2fs fsys_fat stage1_5 stage2 bios; do
cat >> $SHARED_SRC_RULES <<EOF
$f.o: \$(top_srcdir)/shared_src/$f.c
@echo '\$(COMPILE) -c \$(top_srcdir)/shared_src/$f.c'; \\
if test -d .deps; then \\
\$(COMPILE) -Wp,-MD,.deps/$f.P -c \$(top_srcdir)/shared_src/$f.c; \\
else \\
\$(COMPILE) -c \$(top_srcdir)/shared_src/$f.c; \\
fi
EOF
done
AC_OUTPUT([Makefile grub/Makefile stage1/Makefile stage2/Makefile \
e2fs_stage1_5/Makefile fat_stage1_5/Makefile \
ffs_stage1_5/Makefile docs/Makefile shared_src/Makefile \
debian/Makefile])
AC_OUTPUT([Makefile stage1/Makefile stage2/Makefile docs/Makefile \
debian/Makefile grub/Makefile])

2
debian/Makefile.in vendored
View file

@ -62,10 +62,12 @@ host_triplet = @host@
AMTAR = @AMTAR@
AMTARFLAGS = @AMTARFLAGS@
CC = @CC@
GRUB_LIBS = @GRUB_LIBS@
LD = @LD@
MAKEINFO = @MAKEINFO@
OBJCOPY = @OBJCOPY@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
VERSION = @VERSION@
host_cpu = @host_cpu@
host_vendor = @host_vendor@

View file

@ -1,12 +1,12 @@
info_TEXINFOS = grub.texi multiboot.texi
man_MANS = grub.8
HELP2MAN = $(srcdir)/help2man
HELP2MAN = help2man
noinst_SCRIPTS = $(HELP2MAN)
EXTRA_DIST = menu.lst $(man_MANS) $(noinst_SCRIPTS)
if GRUB_MAINT
$(srcdir)/grub.8: ../grub/grub $(HELP2MAN)
$(HELP2MAN) --name="the stage2 emulator shell" --section=8 \
--output=$@ $<
$(srcdir)/grub.8: ../grub/grub $(srcdir)/$(HELP2MAN)
$(srcdir)/$(HELP2MAN) --name="the stage2 emulator shell" \
--section=8 --output=$@ $<
endif

View file

@ -62,10 +62,12 @@ host_triplet = @host@
AMTAR = @AMTAR@
AMTARFLAGS = @AMTARFLAGS@
CC = @CC@
GRUB_LIBS = @GRUB_LIBS@
LD = @LD@
MAKEINFO = @MAKEINFO@
OBJCOPY = @OBJCOPY@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
VERSION = @VERSION@
host_cpu = @host_cpu@
host_vendor = @host_vendor@
@ -74,7 +76,7 @@ install_sh = @install_sh@
info_TEXINFOS = grub.texi multiboot.texi
man_MANS = grub.8
HELP2MAN = $(srcdir)/help2man
HELP2MAN = help2man
noinst_SCRIPTS = $(HELP2MAN)
EXTRA_DIST = menu.lst $(man_MANS) $(noinst_SCRIPTS)
@ -314,7 +316,6 @@ distdir: $(DISTFILES)
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu docs/Makefile
$(mkinstalldirs) $(distdir)/$(srcdir)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
@ -392,9 +393,9 @@ distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
@GRUB_MAINT_TRUE@$(srcdir)/grub.8: ../grub/grub $(HELP2MAN)
@GRUB_MAINT_TRUE@ $(HELP2MAN) --name="the stage2 emulator shell" --section=8 \
@GRUB_MAINT_TRUE@ --output=$@ $<
@GRUB_MAINT_TRUE@$(srcdir)/grub.8: ../grub/grub $(srcdir)/$(HELP2MAN)
@GRUB_MAINT_TRUE@ $(srcdir)/$(HELP2MAN) --name="the stage2 emulator shell" \
@GRUB_MAINT_TRUE@ --section=8 --output=$@ $<
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.

View file

@ -1,40 +0,0 @@
# Stage 1.5 can be installed into the first cylinder after MBR, so the
# limit is (63 - 1) * 512 = 31744.
IMPORTANT_SIZE_LIMIT = 31744
pkgdatadir = $(datadir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
pkgdata_DATA = e2fs_stage1_5
CLEANFILES = $(pkgdata_DATA) $(pkgdata_DATA)T
noinst_PROGRAMS = e2fs_stage1_5.exec
# We can't use builtins or standard includes.
COMPILE = $(CC) -fno-builtin -nostdinc -DFSYS_EXT2FS=1 -DNO_DECOMPRESSION=1 \
-DSTAGE1_5=1 -DNO_BLOCK_FILES=1 \
-DCONFIG_FILE_ASM='.string "/boot/grub/stage2"' \
$(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
INCLUDES = -I$(top_srcdir)/shared_src
# asm.o absolutely needs to come first!
e2fs_stage1_5_exec_LDADD = asm.o common.o char_io.o disk_io.o \
stage1_5.o fsys_ext2fs.o bios.o
# FIXME: Automake hackery.
DEP_FILES = .deps/dummy.P $(wildcard .deps/*.P)
e2fs_stage1_5_exec_SOURCES = dummy.c # needed to drag in C Makefile variables
DISTFILES = $(DIST_COMMON)
e2fs_stage1_5.exec: $(e2fs_stage1_5_exec_LDADD)
$(LD) -N -Ttext 2000 -o $@ $(e2fs_stage1_5_exec_LDADD)
e2fs_stage1_5: e2fs_stage1_5.exec
rm -f $@T $@
$(OBJCOPY) -O binary e2fs_stage1_5.exec $@T
@set dummy `ls -l $@T`; size=$$6; \
if test $$size -le $(IMPORTANT_SIZE_LIMIT); then \
:; \
else \
echo "WARNING: stage 1.5 is too big for boot block area ($$size > $(IMPORTANT_SIZE_LIMIT))."; \
fi
mv -f $@T $@
@SHARED_SRC_RULES@

View file

@ -1,354 +0,0 @@
# Makefile.in generated automatically by automake 1.4a from Makefile.am
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# 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.
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_FLAG =
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
AMTAR = @AMTAR@
AMTARFLAGS = @AMTARFLAGS@
CC = @CC@
LD = @LD@
MAKEINFO = @MAKEINFO@
OBJCOPY = @OBJCOPY@
PACKAGE = @PACKAGE@
VERSION = @VERSION@
host_cpu = @host_cpu@
host_vendor = @host_vendor@
install_sh = @install_sh@
# Stage 1.5 can be installed into the first cylinder after MBR, so the
# limit is (63 - 1) * 512 = 31744.
IMPORTANT_SIZE_LIMIT = 31744
pkgdatadir = $(datadir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
pkgdata_DATA = e2fs_stage1_5
CLEANFILES = $(pkgdata_DATA) $(pkgdata_DATA)T
noinst_PROGRAMS = e2fs_stage1_5.exec
# We can't use builtins or standard includes.
COMPILE = $(CC) -fno-builtin -nostdinc -DFSYS_EXT2FS=1 -DNO_DECOMPRESSION=1 \
-DSTAGE1_5=1 -DNO_BLOCK_FILES=1 \
-DCONFIG_FILE_ASM='.string "/boot/grub/stage2"' \
$(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
INCLUDES = -I$(top_srcdir)/shared_src
# asm.o absolutely needs to come first!
e2fs_stage1_5_exec_LDADD = asm.o common.o char_io.o disk_io.o \
stage1_5.o fsys_ext2fs.o bios.o
# FIXME: Automake hackery.
DEP_FILES = .deps/dummy.P $(wildcard .deps/*.P)
e2fs_stage1_5_exec_SOURCES = dummy.c # needed to drag in C Makefile variables
DISTFILES = $(DIST_COMMON)
subdir = e2fs_stage1_5
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES =
PROGRAMS = $(noinst_PROGRAMS)
DEFS = @DEFS@ -I. -I$(srcdir)
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
am_e2fs_stage1_5_exec_OBJECTS = dummy.o
e2fs_stage1_5_exec_OBJECTS = $(am_e2fs_stage1_5_exec_OBJECTS)
e2fs_stage1_5_exec_DEPENDENCIES = asm.o common.o char_io.o disk_io.o \
stage1_5.o fsys_ext2fs.o bios.o
e2fs_stage1_5_exec_LDFLAGS =
CFLAGS = @CFLAGS@
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
DIST_SOURCES = $(e2fs_stage1_5_exec_SOURCES)
DATA = $(pkgdata_DATA)
DIST_COMMON = $(pkgdata_DATA) Makefile.am Makefile.in
GZIP_ENV = --best
SOURCES = $(e2fs_stage1_5_exec_SOURCES)
OBJECTS = $(am_e2fs_stage1_5_exec_OBJECTS)
all: all-redirect
.SUFFIXES:
.SUFFIXES: .c .o
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu e2fs_stage1_5/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
mostlyclean-noinstPROGRAMS:
clean-noinstPROGRAMS:
-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
distclean-noinstPROGRAMS:
maintainer-clean-noinstPROGRAMS:
mostlyclean-compile:
-rm -f *.o core *.core
clean-compile:
distclean-compile:
-rm -f *.tab.c
maintainer-clean-compile:
.c.o:
$(COMPILE) -c $<
install-pkgdataDATA: $(pkgdata_DATA)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
@list='$(pkgdata_DATA)'; for p in $$list; do \
if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f"; \
$(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f; \
done
uninstall-pkgdataDATA:
@$(NORMAL_UNINSTALL)
@list='$(pkgdata_DATA)'; for p in $$list; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " rm -f $(DESTDIR)$(pkgdatadir)/$$f"; \
rm -f $(DESTDIR)$(pkgdatadir)/$$f; \
done
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -f$$here/ID $$unique $(LISP)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
mostlyclean-tags:
clean-tags:
distclean-tags:
-rm -f TAGS ID
maintainer-clean-tags:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
distdir: $(DISTFILES)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(top_distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu e2fs_stage1_5/Makefile
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-include $(DEP_FILES)
mostlyclean-depend:
clean-depend:
distclean-depend:
-rm -rf .deps
maintainer-clean-depend:
%.o: %.c
@echo '$(COMPILE) -c -o $@ $<'; \
$(COMPILE) -Wp,-MD,.deps/$(*D)/$(*F).pp -c -o $@ $<
@-cp .deps/$(*D)/$(*F).pp .deps/$(*D)/$(*F).P; \
tr ' ' '\012' < .deps/$(*D)/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*D)/$(*F).P; \
rm .deps/$(*D)/$(*F).pp
%.lo: %.c
@echo '$(LTCOMPILE) -c -o $@ $<'; \
$(LTCOMPILE) -Wp,-MD,.deps/$(*D)/$(*F).pp -c -o $@ $<
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
< .deps/$(*D)/$(*F).pp > .deps/$(*D)/$(*F).P; \
tr ' ' '\012' < .deps/$(*D)/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*D)/$(*F).P; \
rm -f .deps/$(*D)/$(*F).pp
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am
check: check-am
installcheck-am:
installcheck: installcheck-am
install-exec-am:
install-exec: install-exec-am
install-data-am: install-pkgdataDATA
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am: uninstall-pkgdataDATA
uninstall: uninstall-am
all-am: Makefile $(PROGRAMS) $(DATA)
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
installdirs:
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
mostlyclean-am: mostlyclean-noinstPROGRAMS mostlyclean-compile \
mostlyclean-tags mostlyclean-depend mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-noinstPROGRAMS clean-compile clean-tags clean-depend \
clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-noinstPROGRAMS distclean-compile distclean-tags \
distclean-depend distclean-generic clean-am
distclean: distclean-am
maintainer-clean-am: maintainer-clean-noinstPROGRAMS \
maintainer-clean-compile maintainer-clean-tags \
maintainer-clean-depend maintainer-clean-generic \
distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am
.PHONY: mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \
clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \
mostlyclean-compile distclean-compile clean-compile \
maintainer-clean-compile uninstall-pkgdataDATA install-pkgdataDATA tags \
mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \
distdir mostlyclean-depend distclean-depend clean-depend \
maintainer-clean-depend info-am info dvi-am dvi check check-am \
installcheck-am installcheck install-exec-am install-exec \
install-data-am install-data install-am install uninstall-am uninstall \
all-redirect all-am all install-strip installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
e2fs_stage1_5.exec: $(e2fs_stage1_5_exec_LDADD)
$(LD) -N -Ttext 2000 -o $@ $(e2fs_stage1_5_exec_LDADD)
e2fs_stage1_5: e2fs_stage1_5.exec
rm -f $@T $@
$(OBJCOPY) -O binary e2fs_stage1_5.exec $@T
@set dummy `ls -l $@T`; size=$$6; \
if test $$size -le $(IMPORTANT_SIZE_LIMIT); then \
:; \
else \
echo "WARNING: stage 1.5 is too big for boot block area ($$size > $(IMPORTANT_SIZE_LIMIT))."; \
fi
mv -f $@T $@
@SHARED_SRC_RULES@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View file

@ -1,39 +0,0 @@
# Stage 1.5 can be installed into the first cylinder after MBR, so the
# limit is (63 - 1) * 512 = 31744.
IMPORTANT_SIZE_LIMIT = 31744
pkgdatadir = $(datadir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
pkgdata_DATA = fat_stage1_5
CLEANFILES = $(pkgdata_DATA) $(pkgdata_DATA)T
noinst_PROGRAMS = fat_stage1_5.exec
# We can't use builtins or standard includes.
COMPILE = $(CC) -fno-builtin -nostdinc -DFSYS_FAT=1 -DNO_DECOMPRESSION=1 \
-DSTAGE1_5=1 -DCONFIG_FILE_ASM='.string "/boot/grub/stage2"' \
$(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
INCLUDES = -I$(top_srcdir)/shared_src
# asm.o absolutely needs to come first!
fat_stage1_5_exec_LDADD = asm.o common.o char_io.o disk_io.o \
stage1_5.o fsys_fat.o bios.o
# FIXME: Automake hackery.
DEP_FILES = .deps/dummy.P $(wildcard .deps/*.P)
fat_stage1_5_exec_SOURCES = dummy.c # needed to drag in C Makefile variables
DISTFILES = $(DIST_COMMON)
fat_stage1_5.exec: $(fat_stage1_5_exec_LDADD)
$(LD) -N -Ttext 2000 -o $@ $(fat_stage1_5_exec_LDADD)
fat_stage1_5: fat_stage1_5.exec
rm -f $@T $@
$(OBJCOPY) -O binary fat_stage1_5.exec $@T
@set dummy `ls -l $@T`; size=$$6; \
if test $$size -le $(IMPORTANT_SIZE_LIMIT); then \
:; \
else \
echo "WARNING: stage 1.5 is too big for boot block area ($$size > $(IMPORTANT_SIZE_LIMIT))."; \
fi
mv -f $@T $@
@SHARED_SRC_RULES@

View file

@ -1,353 +0,0 @@
# Makefile.in generated automatically by automake 1.4a from Makefile.am
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# 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.
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_FLAG =
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
AMTAR = @AMTAR@
AMTARFLAGS = @AMTARFLAGS@
CC = @CC@
LD = @LD@
MAKEINFO = @MAKEINFO@
OBJCOPY = @OBJCOPY@
PACKAGE = @PACKAGE@
VERSION = @VERSION@
host_cpu = @host_cpu@
host_vendor = @host_vendor@
install_sh = @install_sh@
# Stage 1.5 can be installed into the first cylinder after MBR, so the
# limit is (63 - 1) * 512 = 31744.
IMPORTANT_SIZE_LIMIT = 31744
pkgdatadir = $(datadir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
pkgdata_DATA = fat_stage1_5
CLEANFILES = $(pkgdata_DATA) $(pkgdata_DATA)T
noinst_PROGRAMS = fat_stage1_5.exec
# We can't use builtins or standard includes.
COMPILE = $(CC) -fno-builtin -nostdinc -DFSYS_FAT=1 -DNO_DECOMPRESSION=1 \
-DSTAGE1_5=1 -DCONFIG_FILE_ASM='.string "/boot/grub/stage2"' \
$(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
INCLUDES = -I$(top_srcdir)/shared_src
# asm.o absolutely needs to come first!
fat_stage1_5_exec_LDADD = asm.o common.o char_io.o disk_io.o \
stage1_5.o fsys_fat.o bios.o
# FIXME: Automake hackery.
DEP_FILES = .deps/dummy.P $(wildcard .deps/*.P)
fat_stage1_5_exec_SOURCES = dummy.c # needed to drag in C Makefile variables
DISTFILES = $(DIST_COMMON)
subdir = fat_stage1_5
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES =
PROGRAMS = $(noinst_PROGRAMS)
DEFS = @DEFS@ -I. -I$(srcdir)
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
am_fat_stage1_5_exec_OBJECTS = dummy.o
fat_stage1_5_exec_OBJECTS = $(am_fat_stage1_5_exec_OBJECTS)
fat_stage1_5_exec_DEPENDENCIES = asm.o common.o char_io.o disk_io.o \
stage1_5.o fsys_fat.o bios.o
fat_stage1_5_exec_LDFLAGS =
CFLAGS = @CFLAGS@
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
DIST_SOURCES = $(fat_stage1_5_exec_SOURCES)
DATA = $(pkgdata_DATA)
DIST_COMMON = $(pkgdata_DATA) Makefile.am Makefile.in
GZIP_ENV = --best
SOURCES = $(fat_stage1_5_exec_SOURCES)
OBJECTS = $(am_fat_stage1_5_exec_OBJECTS)
all: all-redirect
.SUFFIXES:
.SUFFIXES: .c .o
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu fat_stage1_5/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
mostlyclean-noinstPROGRAMS:
clean-noinstPROGRAMS:
-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
distclean-noinstPROGRAMS:
maintainer-clean-noinstPROGRAMS:
mostlyclean-compile:
-rm -f *.o core *.core
clean-compile:
distclean-compile:
-rm -f *.tab.c
maintainer-clean-compile:
.c.o:
$(COMPILE) -c $<
install-pkgdataDATA: $(pkgdata_DATA)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
@list='$(pkgdata_DATA)'; for p in $$list; do \
if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f"; \
$(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f; \
done
uninstall-pkgdataDATA:
@$(NORMAL_UNINSTALL)
@list='$(pkgdata_DATA)'; for p in $$list; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " rm -f $(DESTDIR)$(pkgdatadir)/$$f"; \
rm -f $(DESTDIR)$(pkgdatadir)/$$f; \
done
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -f$$here/ID $$unique $(LISP)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
mostlyclean-tags:
clean-tags:
distclean-tags:
-rm -f TAGS ID
maintainer-clean-tags:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
distdir: $(DISTFILES)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(top_distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu fat_stage1_5/Makefile
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-include $(DEP_FILES)
mostlyclean-depend:
clean-depend:
distclean-depend:
-rm -rf .deps
maintainer-clean-depend:
%.o: %.c
@echo '$(COMPILE) -c -o $@ $<'; \
$(COMPILE) -Wp,-MD,.deps/$(*D)/$(*F).pp -c -o $@ $<
@-cp .deps/$(*D)/$(*F).pp .deps/$(*D)/$(*F).P; \
tr ' ' '\012' < .deps/$(*D)/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*D)/$(*F).P; \
rm .deps/$(*D)/$(*F).pp
%.lo: %.c
@echo '$(LTCOMPILE) -c -o $@ $<'; \
$(LTCOMPILE) -Wp,-MD,.deps/$(*D)/$(*F).pp -c -o $@ $<
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
< .deps/$(*D)/$(*F).pp > .deps/$(*D)/$(*F).P; \
tr ' ' '\012' < .deps/$(*D)/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*D)/$(*F).P; \
rm -f .deps/$(*D)/$(*F).pp
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am
check: check-am
installcheck-am:
installcheck: installcheck-am
install-exec-am:
install-exec: install-exec-am
install-data-am: install-pkgdataDATA
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am: uninstall-pkgdataDATA
uninstall: uninstall-am
all-am: Makefile $(PROGRAMS) $(DATA)
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
installdirs:
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
mostlyclean-am: mostlyclean-noinstPROGRAMS mostlyclean-compile \
mostlyclean-tags mostlyclean-depend mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-noinstPROGRAMS clean-compile clean-tags clean-depend \
clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-noinstPROGRAMS distclean-compile distclean-tags \
distclean-depend distclean-generic clean-am
distclean: distclean-am
maintainer-clean-am: maintainer-clean-noinstPROGRAMS \
maintainer-clean-compile maintainer-clean-tags \
maintainer-clean-depend maintainer-clean-generic \
distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am
.PHONY: mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \
clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \
mostlyclean-compile distclean-compile clean-compile \
maintainer-clean-compile uninstall-pkgdataDATA install-pkgdataDATA tags \
mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \
distdir mostlyclean-depend distclean-depend clean-depend \
maintainer-clean-depend info-am info dvi-am dvi check check-am \
installcheck-am installcheck install-exec-am install-exec \
install-data-am install-data install-am install uninstall-am uninstall \
all-redirect all-am all install-strip installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
fat_stage1_5.exec: $(fat_stage1_5_exec_LDADD)
$(LD) -N -Ttext 2000 -o $@ $(fat_stage1_5_exec_LDADD)
fat_stage1_5: fat_stage1_5.exec
rm -f $@T $@
$(OBJCOPY) -O binary fat_stage1_5.exec $@T
@set dummy `ls -l $@T`; size=$$6; \
if test $$size -le $(IMPORTANT_SIZE_LIMIT); then \
:; \
else \
echo "WARNING: stage 1.5 is too big for boot block area ($$size > $(IMPORTANT_SIZE_LIMIT))."; \
fi
mv -f $@T $@
@SHARED_SRC_RULES@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View file

@ -1,38 +0,0 @@
IMPORTANT_SIZE_LIMIT = 7168
pkgdatadir = $(datadir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
pkgdata_DATA = ffs_stage1_5
CLEANFILES = $(pkgdata_DATA) $(pkgdata_DATA)T
noinst_PROGRAMS = ffs_stage1_5.exec
# We can't use builtins or standard includes.
COMPILE = $(CC) -fno-builtin -nostdinc -DFSYS_FFS=1 -DNO_DECOMPRESSION=1 \
-DSTAGE1_5=1 -DNO_BLOCK_FILES=1 \
-DCONFIG_FILE_ASM='.string "/boot/grub/stage2"' \
$(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
INCLUDES = -I$(top_srcdir)/shared_src
# asm.o absolutely needs to come first!
ffs_stage1_5_exec_LDADD = asm.o common.o char_io.o disk_io.o \
stage1_5.o fsys_ffs.o bios.o
# FIXME: Automake hackery.
DEP_FILES = .deps/dummy.c $(wildcard .deps/*.P)
ffs_stage1_5_exec_SOURCES = dummy.c # needed to drag in C Makefile variables
DISTFILES = $(DIST_COMMON)
ffs_stage1_5.exec: $(ffs_stage1_5_exec_LDADD)
$(LD) -N -Ttext 2000 -o $@ $(ffs_stage1_5_exec_LDADD)
ffs_stage1_5: ffs_stage1_5.exec
rm -f $@T $@
$(OBJCOPY) -O binary ffs_stage1_5.exec $@T
@set dummy `ls -l $@T`; size=$$6; \
if test $$size -le $(IMPORTANT_SIZE_LIMIT); then \
:; \
else \
echo "WARNING: stage 1.5 is too big for boot block area ($$size > $(IMPORTANT_SIZE_LIMIT))."; \
fi
mv -f $@T $@
@SHARED_SRC_RULES@

View file

@ -1,351 +0,0 @@
# Makefile.in generated automatically by automake 1.4a from Makefile.am
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# 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.
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_FLAG =
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
AMTAR = @AMTAR@
AMTARFLAGS = @AMTARFLAGS@
CC = @CC@
LD = @LD@
MAKEINFO = @MAKEINFO@
OBJCOPY = @OBJCOPY@
PACKAGE = @PACKAGE@
VERSION = @VERSION@
host_cpu = @host_cpu@
host_vendor = @host_vendor@
install_sh = @install_sh@
IMPORTANT_SIZE_LIMIT = 7168
pkgdatadir = $(datadir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
pkgdata_DATA = ffs_stage1_5
CLEANFILES = $(pkgdata_DATA) $(pkgdata_DATA)T
noinst_PROGRAMS = ffs_stage1_5.exec
# We can't use builtins or standard includes.
COMPILE = $(CC) -fno-builtin -nostdinc -DFSYS_FFS=1 -DNO_DECOMPRESSION=1 \
-DSTAGE1_5=1 -DNO_BLOCK_FILES=1 \
-DCONFIG_FILE_ASM='.string "/boot/grub/stage2"' \
$(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
INCLUDES = -I$(top_srcdir)/shared_src
# asm.o absolutely needs to come first!
ffs_stage1_5_exec_LDADD = asm.o common.o char_io.o disk_io.o \
stage1_5.o fsys_ffs.o bios.o
# FIXME: Automake hackery.
DEP_FILES = .deps/dummy.c $(wildcard .deps/*.P)
ffs_stage1_5_exec_SOURCES = dummy.c # needed to drag in C Makefile variables
DISTFILES = $(DIST_COMMON)
subdir = ffs_stage1_5
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES =
PROGRAMS = $(noinst_PROGRAMS)
DEFS = @DEFS@ -I. -I$(srcdir)
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
am_ffs_stage1_5_exec_OBJECTS = dummy.o
ffs_stage1_5_exec_OBJECTS = $(am_ffs_stage1_5_exec_OBJECTS)
ffs_stage1_5_exec_DEPENDENCIES = asm.o common.o char_io.o disk_io.o \
stage1_5.o fsys_ffs.o bios.o
ffs_stage1_5_exec_LDFLAGS =
CFLAGS = @CFLAGS@
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
DIST_SOURCES = $(ffs_stage1_5_exec_SOURCES)
DATA = $(pkgdata_DATA)
DIST_COMMON = $(pkgdata_DATA) Makefile.am Makefile.in
GZIP_ENV = --best
SOURCES = $(ffs_stage1_5_exec_SOURCES)
OBJECTS = $(am_ffs_stage1_5_exec_OBJECTS)
all: all-redirect
.SUFFIXES:
.SUFFIXES: .c .o
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu ffs_stage1_5/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
mostlyclean-noinstPROGRAMS:
clean-noinstPROGRAMS:
-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
distclean-noinstPROGRAMS:
maintainer-clean-noinstPROGRAMS:
mostlyclean-compile:
-rm -f *.o core *.core
clean-compile:
distclean-compile:
-rm -f *.tab.c
maintainer-clean-compile:
.c.o:
$(COMPILE) -c $<
install-pkgdataDATA: $(pkgdata_DATA)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
@list='$(pkgdata_DATA)'; for p in $$list; do \
if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f"; \
$(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f; \
done
uninstall-pkgdataDATA:
@$(NORMAL_UNINSTALL)
@list='$(pkgdata_DATA)'; for p in $$list; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " rm -f $(DESTDIR)$(pkgdatadir)/$$f"; \
rm -f $(DESTDIR)$(pkgdatadir)/$$f; \
done
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -f$$here/ID $$unique $(LISP)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
mostlyclean-tags:
clean-tags:
distclean-tags:
-rm -f TAGS ID
maintainer-clean-tags:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
distdir: $(DISTFILES)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(top_distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu ffs_stage1_5/Makefile
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-include $(DEP_FILES)
mostlyclean-depend:
clean-depend:
distclean-depend:
-rm -rf .deps
maintainer-clean-depend:
%.o: %.c
@echo '$(COMPILE) -c -o $@ $<'; \
$(COMPILE) -Wp,-MD,.deps/$(*D)/$(*F).pp -c -o $@ $<
@-cp .deps/$(*D)/$(*F).pp .deps/$(*D)/$(*F).P; \
tr ' ' '\012' < .deps/$(*D)/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*D)/$(*F).P; \
rm .deps/$(*D)/$(*F).pp
%.lo: %.c
@echo '$(LTCOMPILE) -c -o $@ $<'; \
$(LTCOMPILE) -Wp,-MD,.deps/$(*D)/$(*F).pp -c -o $@ $<
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
< .deps/$(*D)/$(*F).pp > .deps/$(*D)/$(*F).P; \
tr ' ' '\012' < .deps/$(*D)/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*D)/$(*F).P; \
rm -f .deps/$(*D)/$(*F).pp
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am
check: check-am
installcheck-am:
installcheck: installcheck-am
install-exec-am:
install-exec: install-exec-am
install-data-am: install-pkgdataDATA
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am: uninstall-pkgdataDATA
uninstall: uninstall-am
all-am: Makefile $(PROGRAMS) $(DATA)
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
installdirs:
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
mostlyclean-am: mostlyclean-noinstPROGRAMS mostlyclean-compile \
mostlyclean-tags mostlyclean-depend mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-noinstPROGRAMS clean-compile clean-tags clean-depend \
clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-noinstPROGRAMS distclean-compile distclean-tags \
distclean-depend distclean-generic clean-am
distclean: distclean-am
maintainer-clean-am: maintainer-clean-noinstPROGRAMS \
maintainer-clean-compile maintainer-clean-tags \
maintainer-clean-depend maintainer-clean-generic \
distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am
.PHONY: mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \
clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \
mostlyclean-compile distclean-compile clean-compile \
maintainer-clean-compile uninstall-pkgdataDATA install-pkgdataDATA tags \
mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \
distdir mostlyclean-depend distclean-depend clean-depend \
maintainer-clean-depend info-am info dvi-am dvi check check-am \
installcheck-am installcheck install-exec-am install-exec \
install-data-am install-data install-am install uninstall-am uninstall \
all-redirect all-am all install-strip installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
ffs_stage1_5.exec: $(ffs_stage1_5_exec_LDADD)
$(LD) -N -Ttext 2000 -o $@ $(ffs_stage1_5_exec_LDADD)
ffs_stage1_5: ffs_stage1_5.exec
rm -f $@T $@
$(OBJCOPY) -O binary ffs_stage1_5.exec $@T
@set dummy `ls -l $@T`; size=$$6; \
if test $$size -le $(IMPORTANT_SIZE_LIMIT); then \
:; \
else \
echo "WARNING: stage 1.5 is too big for boot block area ($$size > $(IMPORTANT_SIZE_LIMIT))."; \
fi
mv -f $@T $@
@SHARED_SRC_RULES@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View file

@ -1,14 +1,6 @@
sbin_PROGRAMS = grub
CLEANFILES = $(EXTRA_PROGRAMS)
COMPILE = $(CC) -DGRUB_UTIL=1 -fwritable-strings $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
INCLUDES = -I$(top_srcdir)/shared_src
AM_CFLAGS = -DGRUB_UTIL=1 -fwritable-strings -I$(top_srcdir)/stage2
grub_SOURCES = main.c asmstub.c
grub_LDADD = boot.o common.o char_io.o cmdline.o disk_io.o gunzip.o \
fsys_ffs.o fsys_ext2fs.o fsys_fat.o stage2.o
# FIXME: Automake hackery.
DEP_FILES = .deps/main.P .deps/asmstub.P $(wildcard .deps/*.P)
@SHARED_SRC_RULES@
grub_LDADD = ../stage2/libgrub.a @GRUB_LIBS@

View file

@ -62,10 +62,12 @@ host_triplet = @host@
AMTAR = @AMTAR@
AMTARFLAGS = @AMTARFLAGS@
CC = @CC@
GRUB_LIBS = @GRUB_LIBS@
LD = @LD@
MAKEINFO = @MAKEINFO@
OBJCOPY = @OBJCOPY@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
VERSION = @VERSION@
host_cpu = @host_cpu@
host_vendor = @host_vendor@
@ -73,18 +75,11 @@ install_sh = @install_sh@
sbin_PROGRAMS = grub
CLEANFILES = $(EXTRA_PROGRAMS)
COMPILE = $(CC) -DGRUB_UTIL=1 -fwritable-strings $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
INCLUDES = -I$(top_srcdir)/shared_src
AM_CFLAGS = -DGRUB_UTIL=1 -fwritable-strings -I$(top_srcdir)/stage2
grub_SOURCES = main.c asmstub.c
grub_LDADD = boot.o common.o char_io.o cmdline.o disk_io.o gunzip.o \
fsys_ffs.o fsys_ext2fs.o fsys_fat.o stage2.o
# FIXME: Automake hackery.
DEP_FILES = .deps/main.P .deps/asmstub.P $(wildcard .deps/*.P)
grub_LDADD = ../stage2/libgrub.a @GRUB_LIBS@
subdir = grub
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES =
@ -97,9 +92,9 @@ LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
am_grub_OBJECTS = main.o asmstub.o
grub_OBJECTS = $(am_grub_OBJECTS)
grub_DEPENDENCIES = boot.o common.o char_io.o cmdline.o disk_io.o \
gunzip.o fsys_ffs.o fsys_ext2fs.o fsys_fat.o stage2.o
grub_DEPENDENCIES = ../stage2/libgrub.a
grub_LDFLAGS =
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CFLAGS = @CFLAGS@
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
@ -110,6 +105,7 @@ DIST_COMMON = Makefile.am Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
GZIP_ENV = --best
DEP_FILES = .deps/asmstub.P .deps/main.P
SOURCES = $(grub_SOURCES)
OBJECTS = $(am_grub_OBJECTS)
@ -281,7 +277,6 @@ installdirs:
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
@ -326,8 +321,6 @@ distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
@SHARED_SRC_RULES@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View file

@ -1,7 +0,0 @@
noinst_HEADERS = apic.h defs.h dir.h disk_inode.h disk_inode_ffs.h \
fat.h filesys.h freebsd.h fs.h i386-elf.h imgact_aout.h \
mb_header.h mb_info.h pc_slice.h shared.h smp-imps.h
EXTRA_DIST = asm.S bios.c boot.c char_io.c cmdline.c common.c \
disk_io.c fsys_ext2fs.c fsys_fat.c fsys_ffs.c gunzip.c \
smp-imps.c stage1_5.c stage2.c

View file

@ -1,222 +0,0 @@
# Makefile.in generated automatically by automake 1.4a from Makefile.am
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# 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.
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_FLAG =
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
AMTAR = @AMTAR@
AMTARFLAGS = @AMTARFLAGS@
CC = @CC@
LD = @LD@
MAKEINFO = @MAKEINFO@
OBJCOPY = @OBJCOPY@
PACKAGE = @PACKAGE@
VERSION = @VERSION@
host_cpu = @host_cpu@
host_vendor = @host_vendor@
install_sh = @install_sh@
noinst_HEADERS = apic.h defs.h dir.h disk_inode.h disk_inode_ffs.h \
fat.h filesys.h freebsd.h fs.h i386-elf.h imgact_aout.h \
mb_header.h mb_info.h pc_slice.h shared.h smp-imps.h
EXTRA_DIST = asm.S bios.c boot.c char_io.c cmdline.c common.c \
disk_io.c fsys_ext2fs.c fsys_fat.c fsys_ffs.c gunzip.c \
smp-imps.c stage1_5.c stage2.c
subdir = shared_src
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES =
DIST_SOURCES =
HEADERS = $(noinst_HEADERS)
DIST_COMMON = $(noinst_HEADERS) Makefile.am Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu shared_src/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -f$$here/ID $$unique $(LISP)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
mostlyclean-tags:
clean-tags:
distclean-tags:
-rm -f TAGS ID
maintainer-clean-tags:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
distdir: $(DISTFILES)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(top_distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu shared_src/Makefile
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am
check: check-am
installcheck-am:
installcheck: installcheck-am
install-exec-am:
install-exec: install-exec-am
install-data-am:
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am:
uninstall: uninstall-am
all-am: Makefile $(HEADERS)
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
installdirs:
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
mostlyclean-am: mostlyclean-tags mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-tags clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-tags distclean-generic clean-am
distclean: distclean-am
maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \
distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am
.PHONY: tags mostlyclean-tags distclean-tags clean-tags \
maintainer-clean-tags distdir info-am info dvi-am dvi check check-am \
installcheck-am installcheck install-exec-am install-exec \
install-data-am install-data install-am install uninstall-am uninstall \
all-redirect all-am all install-strip installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View file

@ -1,9 +1,9 @@
pkgdatadir = $(datadir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
pkgdata_DATA = stage1
nodist_pkgdata_DATA = stage1
CLEANFILES = $(pkgdata_DATA)
# We can't use builtins or standard includes.
COMPILE = $(CC) -fno-builtin -nostdinc $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
AM_CFLAGS = -fno-builtin -nostdinc
noinst_PROGRAMS = stage1.exec
stage1_exec_SOURCES = stage1.S

View file

@ -60,10 +60,12 @@ host_triplet = @host@
AMTAR = @AMTAR@
AMTARFLAGS = @AMTARFLAGS@
CC = @CC@
GRUB_LIBS = @GRUB_LIBS@
LD = @LD@
MAKEINFO = @MAKEINFO@
OBJCOPY = @OBJCOPY@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
VERSION = @VERSION@
host_cpu = @host_cpu@
host_vendor = @host_vendor@
@ -71,11 +73,11 @@ install_sh = @install_sh@
pkgdatadir = $(datadir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
pkgdata_DATA = stage1
nodist_pkgdata_DATA = stage1
CLEANFILES = $(pkgdata_DATA)
# We can't use builtins or standard includes.
COMPILE = $(CC) -fno-builtin -nostdinc $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
AM_CFLAGS = -fno-builtin -nostdinc
noinst_PROGRAMS = stage1.exec
stage1_exec_SOURCES = stage1.S
@ -94,13 +96,14 @@ stage1_exec_OBJECTS = $(am_stage1_exec_OBJECTS)
stage1_exec_LDADD = $(LDADD)
stage1_exec_DEPENDENCIES =
stage1_exec_LDFLAGS =
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CFLAGS = @CFLAGS@
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
DIST_SOURCES = $(stage1_exec_SOURCES)
DATA = $(pkgdata_DATA)
DATA = $(nodist_pkgdata_DATA)
DIST_COMMON = $(pkgdata_DATA) Makefile.am Makefile.in
DIST_COMMON = Makefile.am Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@ -142,19 +145,19 @@ maintainer-clean-compile:
.S.o:
$(COMPILE) -c $<
install-pkgdataDATA: $(pkgdata_DATA)
install-nodist_pkgdataDATA: $(nodist_pkgdata_DATA)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
@list='$(pkgdata_DATA)'; for p in $$list; do \
@list='$(nodist_pkgdata_DATA)'; for p in $$list; do \
if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f"; \
$(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f; \
done
uninstall-pkgdataDATA:
uninstall-nodist_pkgdataDATA:
@$(NORMAL_UNINSTALL)
@list='$(pkgdata_DATA)'; for p in $$list; do \
@list='$(nodist_pkgdata_DATA)'; for p in $$list; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " rm -f $(DESTDIR)$(pkgdatadir)/$$f"; \
rm -f $(DESTDIR)$(pkgdatadir)/$$f; \
@ -235,20 +238,20 @@ installcheck: installcheck-am
install-exec-am:
install-exec: install-exec-am
install-data-am: install-pkgdataDATA
install-data-am: install-nodist_pkgdataDATA
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am: uninstall-pkgdataDATA
uninstall-am: uninstall-nodist_pkgdataDATA
uninstall: uninstall-am
all-am: Makefile $(PROGRAMS) $(DATA)
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
installdirs:
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
$(mkinstalldirs) $(DESTDIR)$(nodist_pkgdatadir)
mostlyclean-generic:
@ -288,15 +291,15 @@ maintainer-clean: maintainer-clean-am
.PHONY: mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \
clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \
mostlyclean-compile distclean-compile clean-compile \
maintainer-clean-compile uninstall-pkgdataDATA install-pkgdataDATA tags \
mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \
distdir mostlyclean-depend distclean-depend clean-depend \
maintainer-clean-depend info-am info dvi-am dvi check check-am \
installcheck-am installcheck install-exec-am install-exec \
install-data-am install-data install-am install uninstall-am uninstall \
all-redirect all-am all install-strip installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
maintainer-clean-compile uninstall-nodist_pkgdataDATA \
install-nodist_pkgdataDATA tags mostlyclean-tags distclean-tags \
clean-tags maintainer-clean-tags distdir mostlyclean-depend \
distclean-depend clean-depend maintainer-clean-depend info-am info \
dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
install-exec install-data-am install-data install-am install \
uninstall-am uninstall all-redirect all-am all install-strip \
installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
stage1.exec: stage1.o

View file

@ -1,27 +1,63 @@
# For test target.
TESTS = size_test
noinst_SCRIPTS = $(TESTS)
# For dist target.
noinst_HEADERS = apic.h defs.h dir.h disk_inode.h disk_inode_ffs.h \
fat.h filesys.h freebsd.h fs.h i386-elf.h imgact_aout.h \
mb_header.h mb_info.h pc_slice.h shared.h smp-imps.h
EXTRA_DIST = smp-imps.c $(noinst_SCRIPTS)
# The library for /sbin/grub.
noinst_LIBRARIES = libgrub.a
libgrub_a_SOURCES = boot.c common.c char_io.c cmdline.c disk_io.c \
gunzip.c fsys_ffs.c fsys_ext2fs.c fsys_fat.c stage2.c
libgrub_a_CFLAGS = -DGRUB_UTIL=1 -fwritable-strings
# Stage 2 and Stage 1.5's.
pkgdatadir = $(datadir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
pkgdata_DATA = stage2
nodist_pkgdata_DATA = stage2 e2fs_stage1_5 fat_stage1_5 ffs_stage1_5
CLEANFILES = $(pkgdata_DATA)
MOSTLYCLEANFILES = stage2.exec
noinst_PROGRAMS = stage2.exec e2fs_stage1_5.exec fat_stage1_5.exec \
ffs_stage1_5.exec
MOSTLYCLEANFILES = $(noinst_PROGRAMS)
# We can't use builtins or standard includes.
COMPILE = $(CC) -fno-builtin -nostdinc $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
INCLUDES = -I$(top_srcdir)/shared_src
STAGE2_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,8000
STAGE2_COMPILE = -fno-builtin -nostdinc
# asm.o absolutely needs to come first!
stage2_exec_LDADD = asm.o boot.o common.o char_io.o cmdline.o disk_io.o \
gunzip.o fsys_ffs.o fsys_ext2fs.o fsys_fat.o stage2.o bios.o
STAGE1_5_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,2000
STAGE1_5_COMPILE = $(STAGE2_COMPILE) -DNO_DECOMPRESSION=1 -DSTAGE1_5=1 \
-DCONFIG_FILE_ASM='.string "/boot/grub/stage2"'
noinst_PROGRAMS = stage2.exec
# asm.S absolutely needs to come first!
# For stage2 target.
stage2_exec_SOURCES = asm.S boot.c common.c char_io.c cmdline.c \
disk_io.c gunzip.c fsys_ffs.c fsys_ext2fs.c fsys_fat.c stage2.c \
bios.c
stage2_exec_CFLAGS = $(STAGE2_COMPILE)
stage2_exec_LDFLAGS = $(STAGE2_LINK)
# FIXME: Automake hackery.
DEP_FILES = .deps/dummy.P $(wildcard .deps/*.P)
stage2_exec_SOURCES = dummy.c # needed to drag in C Makefile variables
DISTFILES = $(DIST_COMMON)
# For e2fs_stage1_5 target.
e2fs_stage1_5_exec_SOURCES = asm.S common.c char_io.c disk_io.c \
stage1_5.c fsys_ext2fs.c bios.c
e2fs_stage1_5_exec_CFLAGS = $(STAGE1_5_COMPILE) -DFSYS_EXT2FS=1 \
-DNO_BLOCK_FILES=1
e2fs_stage1_5_exec_LDFLAGS = $(STAGE1_5_LINK)
stage2.exec: $(stage2_exec_LDADD)
$(LD) -N -Ttext 8000 -o stage2.exec $(stage2_exec_LDADD)
# For fat_stage1_5 target.
fat_stage1_5_exec_SOURCES = asm.S common.c char_io.c disk_io.c \
stage1_5.c fsys_fat.c bios.c
fat_stage1_5_exec_CFLAGS = $(STAGE1_5_COMPILE) -DFSYS_FAT=1
fat_stage1_5_exec_LDFLAGS = $(STAGE1_5_LINK)
stage2: stage2.exec
$(OBJCOPY) -O binary stage2.exec stage2
# For ffs_stage1_5 target.
ffs_stage1_5_exec_SOURCES = asm.S common.c char_io.c disk_io.c \
stage1_5.c fsys_ffs.c bios.c
@SHARED_SRC_RULES@
ffs_stage1_5_exec_CFLAGS = $(STAGE1_5_COMPILE) -DFSYS_FFS=1 \
-DNO_BLOCK_FILES=1
ffs_stage1_5_exec_LDFLAGS = $(STAGE1_5_LINK)
# General rule for making a raw binary.
%: %.exec
$(OBJCOPY) -O binary $< $@

File diff suppressed because it is too large Load diff

82
stage2/compile Normal file
View file

@ -0,0 +1,82 @@
#! /bin/sh
# Wrapper for compilers which do not understand `-c -o'.
# Copyright (C) 1999 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Usage:
# compile PROGRAM [ARGS]...
# `-o FOO.o' is removed from the args passed to the actual compile.
prog="$1"
shift
ofile=
cfile=
args=
while test $# -gt 0; do
case "$1" in
-o)
ofile="$2"
shift
;;
*.c)
cfile="$1"
args="$args $1"
;;
*)
args="$args $1"
;;
esac
shift
done
test -z "$ofile" && {
echo "compile: no \`-o' option seen" 1>&2
exit 1
}
test -z "$cfile" && {
echo "compile: no \`.c' file seen" 1>&2
exit 1
}
# Name of file we expect compiler to create.
cofile="`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'`"
# Create the lock directory.
lockdir="`echo $ofile | sed -e 's|/|_|g'`"
while true; do
if mkdir $lockdir > /dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir $lockdir; exit 1" 1 2 15
# Run the compile.
"$prog" $args
status=$?
if test -f "$cofile"; then
mv "$cofile" "$ofile"
fi
rmdir $lockdir
exit $status

55
stage2/size_test Normal file
View file

@ -0,0 +1,55 @@
#!/bin/sh
# Check the sizes of Stage 2 and Stage 1.5's.
# Copyright (C) 1999 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Written by OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
# This function checks if the size of the first argument (filename) is
# greater than the second argument (limit). If so, then exit with the
# status 1, otherwise do nothing.
check ()
{
local file size limit
file=$1
limit=$2
set dummy `ls -l $file`
size=$6
if test $size -gt $limit; then
echo "$file is too big ($size > $limit)."
exit 1
fi
}
# The bootloader area of a FFS partition is 14 sectors.
check ffs_stage1_5 7168
# Stage 1.5 can be installed in the sectors immediately after MBR in the
# first cylinder, so the size is (63 - 1) sectors.
check fat_stage1_5 31744
# Likewise.
check e2fs_stage1_5 31744
# This limitation is arbitrary; If you want to make this larger, just
# modify Stage 1.
check stage2 46080
# Success.
exit 0

View file

@ -17,7 +17,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include "../shared_src/shared.h"
#include "shared.h"
static char *
get_entry(char *list, int num, int nested)