From dd22d041285127b42123bf3c3a86347041fcb2a7 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Sat, 2 Aug 2014 18:43:36 -0700 Subject: [PATCH] Remove old build system Cargo is able to do everything we need and the last bit (doc tests) should be merging soon. --- .gitignore | 2 - Makefile.in | 88 ----------------------------------------- configure | 25 ------------ submodules/rust-openssl | 1 - submodules/rust-phf | 1 - 5 files changed, 117 deletions(-) delete mode 100644 Makefile.in delete mode 100755 configure delete mode 160000 submodules/rust-openssl delete mode 160000 submodules/rust-phf diff --git a/.gitignore b/.gitignore index 675274f8..4127eea2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,2 @@ /doc/ -/build/ -/Makefile /target/ diff --git a/Makefile.in b/Makefile.in deleted file mode 100644 index c26fe2b2..00000000 --- a/Makefile.in +++ /dev/null @@ -1,88 +0,0 @@ -export RUSTC := rustc -RUSTDOC := rustdoc -RUSTFLAGS := -O --cfg ndebug -BUILDDIR := build -INSTALL_DIR := %PREFIX% -LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):build:submodules/rust-phf/build:submodules/rust-openssl/target -ENV := LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) DYLD_LIBRARY_PATH=$(LD_LIBRARY_PATH) - -############################################################################### -# Dependencies -############################################################################### -PHF_DIR := submodules/rust-phf -PHF := $(foreach file,$(shell $(MAKE) -s -C $(PHF_DIR) print-targets),$(PHF_DIR)/$(file)) -OPENSSL_DIR := submodules/rust-openssl -OPENSSL := $(foreach file,$(shell $(MAKE) -s -C $(OPENSSL_DIR) print-target),$(OPENSSL_DIR)/$(file)) - -.NOTPARALLEL: $(PHF) -$(PHF): | $(BUILDDIR) - $(MAKE) -C $(PHF_DIR) - -.NOTPARALLEL: $(OPENSSL) -$(OPENSSL): | $(BUILDDIR) - $(MAKE) -C $(OPENSSL_DIR) - -############################################################################### -# Main targets -############################################################################### -POSTGRES_LIB_FILE := src/lib/lib.rs -POSTGRES_LIB := $(foreach file,$(shell $(RUSTC) --print-file-name $(POSTGRES_LIB_FILE)),$(BUILDDIR)/$(file)) -POSTGRES_TEST_FILE := src/test/test.rs -POSTGRES_TEST := $(BUILDDIR)/$(shell $(RUSTC) --test --print-file-name $(POSTGRES_TEST_FILE)) - -POSTGRES_LIB_DEPS := $(BUILDDIR)/postgres.d -POSTGRES_TEST_DEPS := $(BUILDDIR)/postgres_test.d - -LINK_ARGS := $(foreach file,$(OPENSSL),-L $(dir $(file))) $(foreach file,$(PHF),-L $(dir $(file))) - --include $(POSTGRES_LIB_DEPS) --include $(POSTGRES_TEST_DEPS) - -$(BUILDDIR): - mkdir -p $@ - -.NOTPARALLEL: $(POSTGRES_LIB) -$(POSTGRES_LIB): $(POSTGRES_LIB_FILE) $(PHF) $(OPENSSL) | $(BUILDDIR) - $(ENV) $(RUSTC) $(RUSTFLAGS) $(LINK_ARGS) --dep-info $(POSTGRES_LIB_DEPS) \ - --out-dir $(@D) $< - -$(POSTGRES_TEST): $(POSTGRES_TEST_FILE) $(POSTGRES_LIB) | $(BUILDDIR) - $(ENV) $(RUSTC) $(RUSTFLAGS) $(LINK_ARGS) -L $(BUILDDIR) --dep-info $(POSTGRES_TEST_DEPS) \ - --out-dir $(@D) --test $< - -all: $(POSTGRES_LIB) - -.DEFAULT_GOAL := all -.PHONY: all - -############################################################################### -# Utility -############################################################################### -check-test: $(POSTGRES_TEST) - $(POSTGRES_TEST) - -check-doc: $(POSTGRES_LIB) - $(ENV) $(RUSTDOC) $(LINK_ARGS) -L $(BUILDDIR) --test $(POSTGRES_LIB_FILE) - -check: check-test check-doc - -clean: - rm -rf $(BUILDDIR) - -clean-deps: - $(MAKE) -C $(PHF_DIR) clean - $(MAKE) -C $(OPENSSL_DIR) clean - rm -f $(PHF_STAMP) $(OPENSSL_STAMP) - -doc: $(OPENSSL) $(PHF) - $(ENV) $(RUSTDOC) $(LINK_ARGS) $(POSTGRES_LIB_FILE) - -install: $(POSTGRES_LIB) - $(MAKE) -C $(PHF_DIR) install INSTALL_DIR=$(abspath $(INSTALL_DIR)) - $(MAKE) -C $(PHF_DIR) install INSTALL_DIR=$(abspath $(INSTALL_DIR)) - install $(POSTGRES_LIB) $(INSTALL_DIR) - -print-targets: - @echo $(POSTGRES_LIB) - -.PHONY: check-test check-doc check clean clean-deps doc install print-targets diff --git a/configure b/configure deleted file mode 100755 index 92c2028d..00000000 --- a/configure +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -set -e - -TEMP=`getopt -o "" --long prefix: -n "$0" -- "$@"` - -if [ $? != 0 ]; then exit 1; fi - -eval set -- "$TEMP" - -PREFIX=/usr/lib - -while true ; do - case "$1" in - --prefix) PREFIX=$2; shift 2;; - --) shift; break;; - esac -done - -git submodule update --init -./submodules/rust-phf/configure -./submodules/rust-openssl/configure - -sed -e "s|%PREFIX%|$PREFIX|" \ - < Makefile.in > Makefile diff --git a/submodules/rust-openssl b/submodules/rust-openssl deleted file mode 160000 index 8696b091..00000000 --- a/submodules/rust-openssl +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8696b091402f67a655c3b924c118392cb67540a3 diff --git a/submodules/rust-phf b/submodules/rust-phf deleted file mode 160000 index f79814a6..00000000 --- a/submodules/rust-phf +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f79814a6abfa3bc5d739825643ea4ecee0a3aa8a