Skip to content

Commit

Permalink
Initial commit of Citus 5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
onderkalaci committed Feb 11, 2016
0 parents commit 136306a
Show file tree
Hide file tree
Showing 357 changed files with 137,231 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
* whitespace=space-before-tab,trailing-space
*.[chly] whitespace=space-before-tab,trailing-space,indent-with-non-tab,tabwidth=4
*.dsl whitespace=space-before-tab,trailing-space,tab-in-indent
*.patch -whitespace
*.pl whitespace=space-before-tab,trailing-space,tabwidth=4
*.po whitespace=space-before-tab,trailing-space,tab-in-indent,-blank-at-eof
*.sgml whitespace=space-before-tab,trailing-space,tab-in-indent,-blank-at-eol
*.x[ms]l whitespace=space-before-tab,trailing-space,tab-in-indent

# Avoid confusing ASCII underlines with leftover merge conflict markers
README conflict-marker-size=32
README.* conflict-marker-size=32

# Certain data files that contain special whitespace, and other special cases
*.data -whitespace

# Test output files that contain extra whitespace
*.out -whitespace
src/test/regress/output/*.source -whitespace

# These files are maintained or generated elsewhere. We take them as is.
configure -whitespace
38 changes: 38 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Global excludes across all subdirectories
*.o
*.so
*.so.[0-9]
*.so.[0-9].[0-9]
*.sl
*.sl.[0-9]
*.sl.[0-9].[0-9]
*.dylib
*.dll
*.a
*.mo
*.pot
objfiles.txt
.deps/
*.gcno
*.gcda
*.gcov
*.gcov.out
lcov.info
coverage/
*.vcproj
*.vcxproj
win32ver.rc
*.exe
lib*dll.def
lib*.pc

# Local excludes in root directory
/config.log
/config.status
/pgsql.sln
/pgsql.sln.cache
/Debug/
/Release/
/autom4te.cache
/Makefile.global
/src/Makefile.custom
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
sudo: required
dist: trusty
language: c
cache: apt
env:
matrix:
- PGVERSION=9.5
- PGVERSION=9.4
before_install:
- git clone --depth 1 https://github.com/citusdata/tools.git
- tools/travis/setup_apt.sh
- tools/travis/nuke_pg.sh
install:
- tools/travis/install_pg.sh
script: tools/travis/pg_travis_multi_test.sh
49 changes: 49 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# CitusDB toplevel Makefile

citusdb_subdir = .
citusdb_top_builddir = .

# Hint that configure should be run first
ifeq (,$(wildcard Makefile.global))
$(error ./configure needs to be run before compiling CitusDB)
endif

include Makefile.global

all: extension csql

# build extension
extension:
$(MAKE) -C src/backend/distributed/ all
install-extension:
$(MAKE) -C src/backend/distributed/ install
install-headers:
$(MKDIR_P) '$(includedir_server)/distributed/'
# generated headers are located in the build directory
$(INSTALL_DATA) src/include/citusdb_config.h '$(includedir_server)/'
# the rest in the source tree
$(INSTALL_DATA) $(citusdb_abs_srcdir)/src/include/distributed/*.h '$(includedir_server)/distributed/'
clean-extension:
$(MAKE) -C src/backend/distributed/ clean
.PHONY: extension install-extension clean-extension
# Add to generic targets
install: install-extension install-headers
clean: clean-extension

# build csql binary
csql:
$(MAKE) -C src/bin/csql/ all
install-csql:
$(MAKE) -C src/bin/csql/ install
clean-csql:
$(MAKE) -C src/bin/csql/ clean
.PHONY: csql install-csql clean-csql
# Add to generic targets
install: install-csql
clean: clean-csql

# depend on install for now
check: all install
$(MAKE) -C src/test/regress check-full

.PHONY: all check install clean
61 changes: 61 additions & 0 deletions Makefile.global.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# -*-makefile-*-
# @configure_input@
# Makefile.global.in - Makefile to be included by all submakes
#
# This file is converted by configure into an actual Makefile,
# replacing the @varname@ placeholders by actual values.
#
# This files is intended to contain infrastructure needed by several
# makefiles, particulary central handling of compilation flags and
# rules.

citusdb_abs_srcdir:=@abs_top_srcdir@/${citusdb_subdir}
citusdb_abs_top_srcdir:=@abs_top_srcdir@
PG_CONFIG:=@PG_CONFIG@
PGXS:=$(shell $(PG_CONFIG) --pgxs)

# Support for VPATH builds (i.e. builds from outside the source tree)
vpath_build=@vpath_build@
ifeq ($(vpath_build),yes)
VPATH:=$(citusdb_abs_srcdir)
USE_VPATH:=$(VPATH)
endif

# CitusDB is built using PostgreSQL's pgxs
USE_PGXS=1
include $(PGXS)

# Remake Makefile.global from Makefile.global.in if the latter
# changed. In order to trigger this rule, the including file must
# write `include $(citusdb_top_builddir)/Makefile.global', not some
# shortcut thereof. This makes it less likely to accidentally run
# with some outdated Makefile.global.
# Make internally restarts whenever included Makefiles are
# regenerated.
$(citusdb_top_builddir)/Makefile.global: $(citusdb_top_builddir)/Makefile.global.in @top_srcdir@/configure $(citusdb_top_builddir)/config.status
cd @abs_top_builddir@ && ./config.status Makefile.global

# Ensure configuration is generated by the most recent configure,
# useful for longer existing build directories.
$(citusdb_top_builddir)/config.status: @top_srcdir@/configure
cd @abs_top_builddir@ && ./config.status --recheck

# Regenerate configure if configure.in changed
@top_srcdir@/configure: $(citusdb_abs_srcdir)/configure.in
cd ${citusdb_abs_srcdir} && ./autogen.sh

# If specified via configure, replace the default compiler. Normally
# we'll build with the one postgres was built with. But it's useful to
# be able to use a different one, especially when building against
# distribution packages.
ifneq (@CC@,)
override CC=@CC@
endif

# Add options passed to configure or computed therein, to CFLAGS/CPPFLAGS/...
override CFLAGS += @CFLAGS@ @CITUS_CFLAGS@
override CPPFLAGS := @CPPFLAGS@ -I '${citusdb_abs_top_srcdir}/src/include' $(CPPFLAGS)
override LDFLAGS += @LDFLAGS@

# optional file with user defined, additional, rules
-include ${citusdb_abs_srcdir}/src/Makefile.custom
7 changes: 7 additions & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
#
# autogen.sh converts configure.in to configure and creates
# citusdb_config.h.in. The resuting resulting files are checked into
# the SCM, to avoid everyone needing autoconf installed.

autoreconf -f
Loading

0 comments on commit 136306a

Please sign in to comment.