summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-10-23 12:54:42 +0000
committerEric Andersen <andersen@codepoet.org>2002-10-23 12:54:42 +0000
commit77bf6fb0e642c004c28698f651bd4dc2939157f3 (patch)
tree14a016172973704d690801d2cc86be81685c25d9
parent63db64a0ac4b4f8cb30f338fa6e8d6426b6210ef (diff)
downloadbuildroot-novena-77bf6fb0e642c004c28698f651bd4dc2939157f3.tar.gz
buildroot-novena-77bf6fb0e642c004c28698f651bd4dc2939157f3.zip
Add several new components working towards a fully sandboxed buildsystem
-Erik
-rw-r--r--make/bash.mk45
-rw-r--r--make/coreutils.mk54
-rw-r--r--make/findutils.mk47
-rw-r--r--make/gawk.mk44
-rw-r--r--make/make.mk44
-rw-r--r--make/sed.mk45
6 files changed, 279 insertions, 0 deletions
diff --git a/make/bash.mk b/make/bash.mk
new file mode 100644
index 000000000..869be9df0
--- /dev/null
+++ b/make/bash.mk
@@ -0,0 +1,45 @@
+#############################################################
+#
+# bash
+#
+#############################################################
+BASH_SOURCE:=bash-2.05b.tar.gz
+BASH_SITE:=ftp://ftp.gnu.org/gnu/bash
+BASH_CAT:=zcat
+BASH_DIR:=$(BUILD_DIR)/bash-2.05b
+BASH_BINARY:=bash
+BASH_TARGET_BINARY:=bin/bash
+
+$(DL_DIR)/$(BASH_SOURCE):
+ wget -P $(DL_DIR) $(BASH_SITE)/$(BASH_SOURCE)
+
+bash-source: $(DL_DIR)/$(BASH_SOURCE)
+
+$(BASH_DIR)/.unpacked: $(DL_DIR)/$(BASH_SOURCE)
+ $(BASH_CAT) $(DL_DIR)/$(BASH_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ touch $(BASH_DIR)/.unpacked
+
+$(BASH_DIR)/.configured: $(BASH_DIR)/.unpacked
+ (cd $(BASH_DIR); autoconf; rm -f config.cache; CC=$(TARGET_CC1) \
+ CFLAGS=-D_POSIX_SOURCE ./configure --prefix=/usr --disable-nls \
+ --mandir=/junk --infodir=/junk \
+ );
+ touch $(BASH_DIR)/.configured
+
+$(BASH_DIR)/$(BASH_BINARY): $(BASH_DIR)/.configured
+ $(MAKE) CC=$(TARGET_CC1) -C $(BASH_DIR)
+
+$(TARGET_DIR)/$(BASH_TARGET_BINARY): $(BASH_DIR)/$(BASH_BINARY)
+ $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC1) -C $(BASH_DIR) install
+ mv $(TARGET_DIR)/usr/bin/bash* $(TARGET_DIR)/bin/
+ rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/junk
+
+bash: ncurses uclibc $(TARGET_DIR)/$(BASH_TARGET_BINARY)
+
+bash-clean:
+ $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC1) -C $(BASH_DIR) uninstall
+ -make -C $(BASH_DIR) clean
+
+bash-dirclean:
+ rm -rf $(BASH_DIR)
+
diff --git a/make/coreutils.mk b/make/coreutils.mk
new file mode 100644
index 000000000..5e1bf351b
--- /dev/null
+++ b/make/coreutils.mk
@@ -0,0 +1,54 @@
+#############################################################
+#
+# coreutils
+#
+#############################################################
+COREUTILS_SOURCE:=coreutils-4.5.3.tar.bz2
+COREUTILS_SITE:=ftp://alpha.gnu.org/gnu/coreutils/
+COREUTILS_CAT:=bzcat
+COREUTILS_DIR:=$(BUILD_DIR)/coreutils-4.5.3
+COREUTILS_BINARY:=src/cat
+COREUTILS_TARGET_BINARY:=bin/cat
+BIN_PROGS:=cat chgrp chmod chown cp date dd df dir echo false ln ls mkdir \
+ mknod mv pwd rm rmdir vdir sleep stty sync touch true uname
+
+$(DL_DIR)/$(COREUTILS_SOURCE):
+ wget -P $(DL_DIR) $(COREUTILS_SITE)/$(COREUTILS_SOURCE)
+
+coreutils-source: $(DL_DIR)/$(COREUTILS_SOURCE)
+
+$(COREUTILS_DIR)/.unpacked: $(DL_DIR)/$(COREUTILS_SOURCE)
+ $(COREUTILS_CAT) $(DL_DIR)/$(COREUTILS_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ touch $(COREUTILS_DIR)/.unpacked
+
+$(COREUTILS_DIR)/.configured: $(COREUTILS_DIR)/.unpacked
+ (cd $(COREUTILS_DIR); autoconf; rm -f config.cache; CC=$(TARGET_CC1) \
+ CFLAGS=-D_POSIX_SOURCE ./configure --prefix=/usr --disable-nls \
+ --mandir=/junk --infodir=/junk \
+ );
+ touch $(COREUTILS_DIR)/.configured
+
+$(COREUTILS_DIR)/$(COREUTILS_BINARY): $(COREUTILS_DIR)/.configured
+ $(MAKE) CC=$(TARGET_CC1) -C $(COREUTILS_DIR)
+
+$(TARGET_DIR)/$(COREUTILS_TARGET_BINARY): $(COREUTILS_DIR)/$(COREUTILS_BINARY)
+ $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC1) -C $(COREUTILS_DIR) install
+ # some things go in root rather than usr
+ for f in $(BIN_PROGS); do \
+ mv $(TARGET_DIR)/usr/bin/$$f $(TARGET_DIR)/bin/$$f; \
+ done
+ # link for archaic shells
+ ln -fs test $(TARGET_DIR)/usr/bin/[
+ # gnu thinks chroot is in bin, debian thinks it's in sbin
+ mv $(TARGET_DIR)/usr/bin/chroot $(TARGET_DIR)/usr/sbin/chroot
+ rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/junk
+
+coreutils: uclibc $(TARGET_DIR)/$(COREUTILS_TARGET_BINARY)
+
+coreutils-clean:
+ $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC1) -C $(COREUTILS_DIR) uninstall
+ -make -C $(COREUTILS_DIR) clean
+
+coreutils-dirclean:
+ rm -rf $(COREUTILS_DIR)
+
diff --git a/make/findutils.mk b/make/findutils.mk
new file mode 100644
index 000000000..1fa326cba
--- /dev/null
+++ b/make/findutils.mk
@@ -0,0 +1,47 @@
+#############################################################
+#
+# findutils
+#
+#############################################################
+FINDUTILS_SOURCE:=findutils_4.1.7.orig.tar.gz
+FINDUTILS_SITE:=http://ftp.debian.org/debian/pool/main/f/findutils
+FINDUTILS_CAT:=zcat
+FINDUTILS_DIR:=$(BUILD_DIR)/findutils-4.1.7.orig
+FINDUTILS_BINARY:=find/find
+FINDUTILS_TARGET_BINARY:=usr/bin/find
+
+$(DL_DIR)/$(FINDUTILS_SOURCE):
+ wget -P $(DL_DIR) $(FINDUTILS_SITE)/$(FINDUTILS_SOURCE)
+
+findutils-source: $(DL_DIR)/$(FINDUTILS_SOURCE)
+
+$(FINDUTILS_DIR)/.unpacked: $(DL_DIR)/$(FINDUTILS_SOURCE)
+ $(FINDUTILS_CAT) $(DL_DIR)/$(FINDUTILS_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ (cd $(FINDUTILS_DIR); perl -i -p -e "s,# define mbstate_t int,# define mbstate_t int\n\
+ # define wchar_t char,;" $(FINDUTILS_DIR)/lib/quotearg.c)
+ touch $(FINDUTILS_DIR)/.unpacked
+
+$(FINDUTILS_DIR)/.configured: $(FINDUTILS_DIR)/.unpacked
+ (cd $(FINDUTILS_DIR); autoconf; rm -f config.cache; CC=$(TARGET_CC1) \
+ CFLAGS=-D_POSIX_SOURCE ./configure --prefix=/usr --disable-nls \
+ --mandir=/junk --infodir=/junk --localstatedir=/var/lib/locate \
+ --libexecdir='$${prefix}/lib/locate' \
+ );
+ touch $(FINDUTILS_DIR)/.configured
+
+$(FINDUTILS_DIR)/$(FINDUTILS_BINARY): $(FINDUTILS_DIR)/.configured
+ $(MAKE) CC=$(TARGET_CC1) -C $(FINDUTILS_DIR)
+
+$(TARGET_DIR)/$(FINDUTILS_TARGET_BINARY): $(FINDUTILS_DIR)/$(FINDUTILS_BINARY)
+ $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC1) -C $(FINDUTILS_DIR) install
+ rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/junk
+
+findutils: uclibc $(TARGET_DIR)/$(FINDUTILS_TARGET_BINARY)
+
+findutils-clean:
+ $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC1) -C $(FINDUTILS_DIR) uninstall
+ -make -C $(FINDUTILS_DIR) clean
+
+findutils-dirclean:
+ rm -rf $(FINDUTILS_DIR)
+
diff --git a/make/gawk.mk b/make/gawk.mk
new file mode 100644
index 000000000..e72e66358
--- /dev/null
+++ b/make/gawk.mk
@@ -0,0 +1,44 @@
+#############################################################
+#
+# gawk
+#
+#############################################################
+GAWK_SOURCE:=gawk-3.1.1.tar.gz
+GAWK_SITE:=ftp://ftp.gnu.org/gnu/gawk
+GAWK_CAT:=zcat
+GAWK_DIR:=$(BUILD_DIR)/gawk-3.1.1
+GAWK_BINARY:=gawk
+GAWK_TARGET_BINARY:=usr/bin/gawk
+
+$(DL_DIR)/$(GAWK_SOURCE):
+ wget -P $(DL_DIR) $(GAWK_SITE)/$(GAWK_SOURCE)
+
+gawk-source: $(DL_DIR)/$(GAWK_SOURCE)
+
+$(GAWK_DIR)/.unpacked: $(DL_DIR)/$(GAWK_SOURCE)
+ $(GAWK_CAT) $(DL_DIR)/$(GAWK_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ touch $(GAWK_DIR)/.unpacked
+
+$(GAWK_DIR)/.configured: $(GAWK_DIR)/.unpacked
+ (cd $(GAWK_DIR); autoconf; rm -f config.cache; CC=$(TARGET_CC1) \
+ CFLAGS=-D_POSIX_SOURCE ./configure --prefix=/usr --disable-nls \
+ --mandir=/junk --infodir=/junk \
+ );
+ touch $(GAWK_DIR)/.configured
+
+$(GAWK_DIR)/$(GAWK_BINARY): $(GAWK_DIR)/.configured
+ $(MAKE) CC=$(TARGET_CC1) -C $(GAWK_DIR)
+
+$(TARGET_DIR)/$(GAWK_TARGET_BINARY): $(GAWK_DIR)/$(GAWK_BINARY)
+ $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC1) -C $(GAWK_DIR) install
+ rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/junk
+
+gawk: uclibc $(TARGET_DIR)/$(GAWK_TARGET_BINARY)
+
+gawk-clean:
+ $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC1) -C $(GAWK_DIR) uninstall
+ -make -C $(GAWK_DIR) clean
+
+gawk-dirclean:
+ rm -rf $(GAWK_DIR)
+
diff --git a/make/make.mk b/make/make.mk
new file mode 100644
index 000000000..2300218d3
--- /dev/null
+++ b/make/make.mk
@@ -0,0 +1,44 @@
+#############################################################
+#
+# make
+#
+#############################################################
+GNUMAKE_SOURCE:=make-3.80.tar.bz2
+GNUMAKE_SITE:=ftp://ftp.gnu.org/gnu/make
+GNUMAKE_CAT:=bzcat
+GNUMAKE_DIR:=$(BUILD_DIR)/make-3.80
+GNUMAKE_BINARY:=make
+GNUMAKE_TARGET_BINARY:=usr/bin/make
+
+$(DL_DIR)/$(GNUMAKE_SOURCE):
+ wget -P $(DL_DIR) $(GNUMAKE_SITE)/$(GNUMAKE_SOURCE)
+
+make-source: $(DL_DIR)/$(GNUMAKE_SOURCE)
+
+$(GNUMAKE_DIR)/.unpacked: $(DL_DIR)/$(GNUMAKE_SOURCE)
+ $(GNUMAKE_CAT) $(DL_DIR)/$(GNUMAKE_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ touch $(GNUMAKE_DIR)/.unpacked
+
+$(GNUMAKE_DIR)/.configured: $(GNUMAKE_DIR)/.unpacked
+ (cd $(GNUMAKE_DIR); autoconf; rm -f config.cache; CC=$(TARGET_CC1) \
+ CFLAGS=-D_POSIX_SOURCE ./configure --prefix=/usr --disable-nls \
+ --mandir=/junk --infodir=/junk \
+ );
+ touch $(GNUMAKE_DIR)/.configured
+
+$(GNUMAKE_DIR)/$(GNUMAKE_BINARY): $(GNUMAKE_DIR)/.configured
+ $(MAKE) CC=$(TARGET_CC1) -C $(GNUMAKE_DIR)
+
+$(TARGET_DIR)/$(GNUMAKE_TARGET_BINARY): $(GNUMAKE_DIR)/$(GNUMAKE_BINARY)
+ $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC1) -C $(GNUMAKE_DIR) install
+ rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/junk
+
+make: uclibc $(TARGET_DIR)/$(GNUMAKE_TARGET_BINARY)
+
+make-clean:
+ $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC1) -C $(GNUMAKE_DIR) uninstall
+ -make -C $(GNUMAKE_DIR) clean
+
+make-dirclean:
+ rm -rf $(GNUMAKE_DIR)
+
diff --git a/make/sed.mk b/make/sed.mk
new file mode 100644
index 000000000..cbd7780da
--- /dev/null
+++ b/make/sed.mk
@@ -0,0 +1,45 @@
+#############################################################
+#
+# sed
+#
+#############################################################
+SED_SOURCE:=sed-3.02.tar.gz
+SED_SITE:=ftp://ftp.gnu.org/gnu/sed
+SED_CAT:=zcat
+SED_DIR:=$(BUILD_DIR)/sed-3.02
+SED_BINARY:=sed/sed
+SED_TARGET_BINARY:=bin/sed
+
+$(DL_DIR)/$(SED_SOURCE):
+ wget -P $(DL_DIR) $(SED_SITE)/$(SED_SOURCE)
+
+sed-source: $(DL_DIR)/$(SED_SOURCE)
+
+$(SED_DIR)/.unpacked: $(DL_DIR)/$(SED_SOURCE)
+ $(SED_CAT) $(DL_DIR)/$(SED_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ touch $(SED_DIR)/.unpacked
+
+$(SED_DIR)/.configured: $(SED_DIR)/.unpacked
+ (cd $(SED_DIR); autoconf; rm -f config.cache; CC=$(TARGET_CC1) \
+ CFLAGS=-D_POSIX_SOURCE ./configure --prefix=/usr --disable-nls \
+ --mandir=/junk --infodir=/junk \
+ );
+ touch $(SED_DIR)/.configured
+
+$(SED_DIR)/$(SED_BINARY): $(SED_DIR)/.configured
+ $(MAKE) CC=$(TARGET_CC1) -C $(SED_DIR)
+
+$(TARGET_DIR)/$(SED_TARGET_BINARY): $(SED_DIR)/$(SED_BINARY)
+ $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC1) -C $(SED_DIR) install
+ mv $(TARGET_DIR)/usr/bin/sed $(TARGET_DIR)/bin/
+ rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/junk
+
+sed: uclibc $(TARGET_DIR)/$(SED_TARGET_BINARY)
+
+sed-clean:
+ $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC1) -C $(SED_DIR) uninstall
+ -sed -C $(SED_DIR) clean
+
+sed-dirclean:
+ rm -rf $(SED_DIR)
+