build system overhaul
This commit is contained in:
@@ -5,13 +5,13 @@
|
||||
|
||||
menu "Linux Ext2 FS Progs"
|
||||
|
||||
config CONFIG_CHATTR
|
||||
config CHATTR
|
||||
bool "chattr"
|
||||
default n
|
||||
help
|
||||
chattr changes the file attributes on a second extended file system.
|
||||
|
||||
config CONFIG_E2FSCK
|
||||
config E2FSCK
|
||||
bool "e2fsck"
|
||||
default n
|
||||
help
|
||||
@@ -20,7 +20,7 @@ config CONFIG_E2FSCK
|
||||
The normal compat symlinks 'fsck.ext2' and 'fsck.ext3' are also
|
||||
provided.
|
||||
|
||||
config CONFIG_FSCK
|
||||
config FSCK
|
||||
bool "fsck"
|
||||
default n
|
||||
help
|
||||
@@ -28,38 +28,38 @@ config CONFIG_FSCK
|
||||
In actuality, fsck is simply a front-end for the various file system
|
||||
checkers (fsck.fstype) available under Linux.
|
||||
|
||||
config CONFIG_LSATTR
|
||||
config LSATTR
|
||||
bool "lsattr"
|
||||
default n
|
||||
help
|
||||
lsattr lists the file attributes on a second extended file system.
|
||||
|
||||
config CONFIG_MKE2FS
|
||||
config MKE2FS
|
||||
bool "mke2fs"
|
||||
default n
|
||||
help
|
||||
mke2fs is used to create an ext2/ext3 filesystem. The normal compat
|
||||
symlinks 'mkfs.ext2' and 'mkfs.ext3' are also provided.
|
||||
|
||||
config CONFIG_TUNE2FS
|
||||
config TUNE2FS
|
||||
bool "tune2fs"
|
||||
default n
|
||||
help
|
||||
tune2fs allows the system administrator to adjust various tunable
|
||||
filesystem parameters on Linux ext2/ext3 filesystems.
|
||||
|
||||
config CONFIG_E2LABEL
|
||||
config E2LABEL
|
||||
bool "e2label"
|
||||
default n
|
||||
depends on CONFIG_TUNE2FS
|
||||
depends on TUNE2FS
|
||||
help
|
||||
e2label will display or change the filesystem label on the ext2
|
||||
filesystem located on device.
|
||||
|
||||
config CONFIG_FINDFS
|
||||
config FINDFS
|
||||
bool "findfs"
|
||||
default n
|
||||
depends on CONFIG_TUNE2FS
|
||||
depends on TUNE2FS
|
||||
help
|
||||
findfs will search the disks in the system looking for a filesystem
|
||||
which has a label matching label or a UUID equal to uuid.
|
||||
|
27
e2fsprogs/Kbuild
Normal file
27
e2fsprogs/Kbuild
Normal file
@@ -0,0 +1,27 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
lib-y:=
|
||||
|
||||
lib-$(CONFIG_CHATTR) += chattr.o
|
||||
libs-$(CONFIG_CHATTR) += e2p/
|
||||
|
||||
lib-$(CONFIG_E2FSCK) += e2fsck.o util.o
|
||||
libs-$(CONFIG_E2FSCK) += blkid/ ext2fs/ uuid/
|
||||
|
||||
lib-$(CONFIG_FSCK) += fsck.o util.o
|
||||
libs-$(CONFIG_FSCK) += blkid/ ext2fs/ uuid/
|
||||
|
||||
lib-$(CONFIG_LSATTR) += lsattr.o
|
||||
libs-$(CONFIG_LSATTR) += e2p/
|
||||
|
||||
lib-$(CONFIG_MKE2FS) += mke2fs.o util.o
|
||||
libs-$(CONFIG_MKE2FS) += e2p/ blkid/ ext2fs/ uuid/
|
||||
|
||||
lib-$(CONFIG_TUNE2FS) += tune2fs.o util.o
|
||||
libs-$(CONFIG_TUNE2FS) += e2p/ blkid/ ext2fs/ uuid/
|
||||
|
||||
CFLAGS += -include e2fsprogs/e2fsbb.h
|
@@ -1,22 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
ifndef top_srcdir
|
||||
top_srcdir=..
|
||||
endif
|
||||
ifndef top_builddir
|
||||
top_builddir=..
|
||||
endif
|
||||
srcdir=$(top_srcdir)/e2fsprogs
|
||||
E2FSPROGS_DIR:=./
|
||||
include $(top_builddir)/.config
|
||||
include $(top_srcdir)/Rules.mak
|
||||
include Makefile.in
|
||||
all: $(libraries-y)
|
||||
-include $(top_builddir)/.depend
|
||||
|
||||
clean:
|
||||
rm -f *.o *.a */*.o $(AR_TARGET)
|
@@ -1,86 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
E2FSPROGS_AR:=e2fsprogs.a
|
||||
|
||||
E2FSPROGS_DIR:=$(top_builddir)/e2fsprogs
|
||||
E2FSPROGS_SRC:=$(top_srcdir)/e2fsprogs
|
||||
|
||||
E2FSPROGS_CFLAGS := -include $(E2FSPROGS_SRC)/e2fsbb.h
|
||||
|
||||
BLKID_SRC := cache.c dev.c devname.c devno.c blkid_getsize.c \
|
||||
probe.c read.c resolve.c save.c tag.c list.c
|
||||
BLKID_SRCS := $(patsubst %,blkid/%, $(BLKID_SRC))
|
||||
BLKID_OBJS := $(patsubst %.c,%.o, $(BLKID_SRCS))
|
||||
|
||||
E2P_SRC := fgetsetflags.c fgetsetversion.c pf.c iod.c mntopts.c \
|
||||
feature.c ls.c uuid.c pe.c ostype.c ps.c hashstr.c \
|
||||
parse_num.c
|
||||
E2P_SRCS := $(patsubst %,e2p/%, $(E2P_SRC))
|
||||
E2P_OBJS := $(patsubst %.c,%.o, $(E2P_SRCS))
|
||||
|
||||
EXT2FS_SRC := gen_bitmap.c bitops.c ismounted.c mkjournal.c unix_io.c \
|
||||
rw_bitmaps.c initialize.c bitmaps.c block.c \
|
||||
ind_block.c inode.c freefs.c alloc_stats.c closefs.c \
|
||||
openfs.c io_manager.c finddev.c read_bb.c alloc.c badblocks.c \
|
||||
getsize.c getsectsize.c alloc_tables.c read_bb_file.c mkdir.c \
|
||||
bb_inode.c newdir.c alloc_sb.c lookup.c dirblock.c expanddir.c \
|
||||
dir_iterate.c link.c res_gdt.c icount.c get_pathname.c dblist.c \
|
||||
dirhash.c version.c flushb.c unlink.c check_desc.c valid_blk.c \
|
||||
ext_attr.c bmap.c dblist_dir.c ext2fs_inline.c swapfs.c
|
||||
EXT2FS_SRCS := $(patsubst %,ext2fs/%, $(EXT2FS_SRC))
|
||||
EXT2FS_OBJS := $(patsubst %.c,%.o, $(EXT2FS_SRCS))
|
||||
|
||||
UUID_SRC := compare.c gen_uuid.c pack.c parse.c unpack.c unparse.c \
|
||||
uuid_time.c
|
||||
UUID_SRCS := $(patsubst %,uuid/%, $(UUID_SRC))
|
||||
UUID_OBJS := $(patsubst %.c,%.o, $(UUID_SRCS))
|
||||
|
||||
E2FSPROGS-y:=
|
||||
E2FSPROGS-$(CONFIG_CHATTR) += chattr.o $(E2P_OBJS)
|
||||
E2FSPROGS-$(CONFIG_E2FSCK) += e2fsck.o util.o $(BLKID_OBJS) $(EXT2FS_OBJS) $(UUID_OBJS)
|
||||
E2FSPROGS-$(CONFIG_FSCK) += fsck.o util.o $(BLKID_OBJS) $(EXT2FS_OBJS) $(UUID_OBJS)
|
||||
E2FSPROGS-$(CONFIG_LSATTR) += lsattr.o $(E2P_OBJS)
|
||||
E2FSPROGS-$(CONFIG_MKE2FS) += mke2fs.o util.o $(E2P_OBJS) $(BLKID_OBJS) $(EXT2FS_OBJS) $(UUID_OBJS)
|
||||
E2FSPROGS-$(CONFIG_TUNE2FS) += tune2fs.o util.o $(E2P_OBJS) $(BLKID_OBJS) $(EXT2FS_OBJS) $(UUID_OBJS)
|
||||
|
||||
E2FSPROGS-y:=$(sort $(E2FSPROGS-y))
|
||||
|
||||
ifneq ($(strip $(E2FSPROGS-y)),)
|
||||
libraries-y+=$(E2FSPROGS_DIR)/$(E2FSPROGS_AR)
|
||||
endif
|
||||
|
||||
E2FSPROGS_SRC-y:=$(patsubst %.o,$(E2FSPROGS_SRC)/%.c,$(E2FSPROGS-y))
|
||||
E2FSPROGS_SRC-a:=$(wildcard $(E2FSPROGS_SRC)/*.c) $(patsubst %,$(E2FSPROGS_SRC)/%,$(BLKID_SRCS) $(E2P_SRCS) $(EXT2FS_SRCS) $(UUID_SRCS))
|
||||
APPLET_SRC-y+=$(E2FSPROGS_SRC-y)
|
||||
APPLET_SRC-a+=$(E2FSPROGS_SRC-a)
|
||||
|
||||
# XXX: FIXME: change .c to include their stuff relative to $(E2FSPROGS_SRC)
|
||||
E2FSPROGS_TMP_KLUDGE:=$(patsubst %,-I$(E2FSPROGS_SRC)/%,blkid e2fsck e2p ext2fs uuid)
|
||||
|
||||
APPLETS_DEFINE-y+=$(E2FSPROGS_CFLAGS) -I$(E2FSPROGS_SRC) $(E2FSPROGS_TMP_KLUDGE)
|
||||
APPLETS_DEFINE-a+=$(E2FSPROGS_CFLAGS) -I$(E2FSPROGS_SRC) $(E2FSPROGS_TMP_KLUDGE)
|
||||
|
||||
$(E2FSPROGS_DIR)/$(E2FSPROGS_AR): $(patsubst %,$(E2FSPROGS_DIR)/%, $(E2FSPROGS-y))
|
||||
$(do_ar)
|
||||
|
||||
$(E2FSPROGS_DIR)/%.o: $(subst $(top_builddir),$(top_srcdir),$(E2FSPROGS_DIR)/%.c)
|
||||
$(compile.c) $(E2FSPROGS_CFLAGS)
|
||||
|
||||
# for building out-of-tree we need to make sure that the directories to hold
|
||||
# the object tree are created
|
||||
$(patsubst %,$(E2FSPROGS_DIR)/%, blkid e2fsck e2p ext2fs uuid):
|
||||
@mkdir -p "$@"
|
||||
|
||||
# make sure that the directories are order-only prerequisites. Otherwise we
|
||||
# may have object files created after the timestamp of the directory was
|
||||
# updated which would lead to spurious rebuilds (as some of the dentries
|
||||
# may be older than the dir itself).
|
||||
$(patsubst %,$(E2FSPROGS_DIR)/%, $(BLKID_OBJS)):|$(E2FSPROGS_DIR)/blkid
|
||||
$(patsubst %,$(E2FSPROGS_DIR)/%, $(E2FSCK_OBJS)):|$(E2FSPROGS_DIR)/e2fsck
|
||||
$(patsubst %,$(E2FSPROGS_DIR)/%, $(E2P_OBJS)):|$(E2FSPROGS_DIR)/e2p
|
||||
$(patsubst %,$(E2FSPROGS_DIR)/%, $(EXT2FS_OBJS)):|$(E2FSPROGS_DIR)/ext2fs
|
||||
$(patsubst %,$(E2FSPROGS_DIR)/%, $(UUID_OBJS)):|$(E2FSPROGS_DIR)/uuid
|
18
e2fsprogs/blkid/Kbuild
Normal file
18
e2fsprogs/blkid/Kbuild
Normal file
@@ -0,0 +1,18 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
lib-y:=
|
||||
lib-y += cache.o dev.o devname.o devno.o blkid_getsize.o \
|
||||
probe.o read.o resolve.o save.o tag.o list.o
|
||||
|
||||
CFLAGS_dev.o := -include include/busybox.h
|
||||
CFLAGS_devname.o := -include include/busybox.h
|
||||
CFLAGS_devno.o := -include include/busybox.h
|
||||
CFLAGS_blkid_getsize.o := -include include/busybox.h
|
||||
CFLAGS_probe.o := -include include/busybox.h
|
||||
CFLAGS_save.o := -include include/busybox.h
|
||||
CFLAGS_tag.o := -include include/busybox.h
|
||||
CFLAGS_list.o := -include include/busybox.h
|
@@ -14,9 +14,7 @@
|
||||
#include "blkidP.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#if HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#if HAVE_ERRNO_H
|
||||
#include <errno.h>
|
||||
#endif
|
||||
|
@@ -23,9 +23,7 @@
|
||||
#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
#if HAVE_ERRNO_H
|
||||
#include <errno.h>
|
||||
#endif
|
||||
|
@@ -21,9 +21,7 @@
|
||||
#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
#include <dirent.h>
|
||||
#if HAVE_ERRNO_H
|
||||
#include <errno.h>
|
||||
|
10
e2fsprogs/e2p/Kbuild
Normal file
10
e2fsprogs/e2p/Kbuild
Normal file
@@ -0,0 +1,10 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
lib-y:=
|
||||
lib-y += fgetsetflags.o fgetsetversion.o pf.o iod.o mntopts.o \
|
||||
feature.o ls.o uuid.o pe.o ostype.o ps.o hashstr.o \
|
||||
parse_num.o
|
@@ -63,8 +63,8 @@ int fgetsetflags (const char * name, unsigned long * get_flags, unsigned long se
|
||||
if (save_errno)
|
||||
errno = save_errno;
|
||||
return r;
|
||||
#endif /* HAVE_EXT2_IOCTLS */
|
||||
notsupp:
|
||||
#endif /* HAVE_EXT2_IOCTLS */
|
||||
errno = EOPNOTSUPP;
|
||||
return -1;
|
||||
}
|
||||
|
18
e2fsprogs/ext2fs/Kbuild
Normal file
18
e2fsprogs/ext2fs/Kbuild
Normal file
@@ -0,0 +1,18 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
lib-y:=
|
||||
lib-y += gen_bitmap.o bitops.o ismounted.o mkjournal.o unix_io.o \
|
||||
rw_bitmaps.o initialize.o bitmaps.o block.o \
|
||||
ind_block.o inode.o freefs.o alloc_stats.o closefs.o \
|
||||
openfs.o io_manager.o finddev.o read_bb.o alloc.o badblocks.o \
|
||||
getsize.o getsectsize.o alloc_tables.o read_bb_file.o mkdir.o \
|
||||
bb_inode.o newdir.o alloc_sb.o lookup.o dirblock.o expanddir.o \
|
||||
dir_iterate.o link.o res_gdt.o icount.o get_pathname.o dblist.o \
|
||||
dirhash.o version.o flushb.o unlink.o check_desc.o valid_blk.o \
|
||||
ext_attr.o bmap.o dblist_dir.o ext2fs_inline.o swapfs.o
|
||||
|
||||
CFLAGS += -include e2fsprogs/e2fsbb.h
|
@@ -45,8 +45,6 @@
|
||||
#include "blkid/blkid.h"
|
||||
|
||||
#include "busybox.h"
|
||||
#include "grp_.h"
|
||||
#include "pwd_.h"
|
||||
|
||||
static char * device_name = NULL;
|
||||
static char * new_label, *new_last_mounted, *new_UUID;
|
||||
|
9
e2fsprogs/uuid/Kbuild
Normal file
9
e2fsprogs/uuid/Kbuild
Normal file
@@ -0,0 +1,9 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org>
|
||||
#
|
||||
# Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||
|
||||
lib-y:=
|
||||
lib-y += compare.o gen_uuid.o pack.o parse.o unpack.o unparse.o \
|
||||
uuid_time.o
|
@@ -41,6 +41,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/time.h>
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user