Skip to content

Commit

Permalink
Merge branch 'release/0.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmp85 committed Feb 16, 2016
2 parents 7482720 + 2cfde80 commit a361b01
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 13 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### citustools v0.1.0 (February 16, 2016) ###

* Initial release

* Adds scripts for Travis CI build workflows

* Adds wrapper script to help apply Citus C style
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
export PACKAGE_NAME = citustools

export prefix := /usr/local
export bindir := $(prefix)/bin
export datarootdir := $(prefix)/share
export mandir := $(datarootdir)/man
export sysconfdir := $(prefix)/etc
export pkgsysconfdir := $(sysconfdir)/$(PACKAGE_NAME)

# logic from http://stackoverflow.com/a/11206700
SUBDIRS := $(addsuffix /., uncrustify)
TARGETS := all clean install
SUBDIRS_TARGETS := $(foreach t,$(TARGETS),$(addsuffix $t,$(SUBDIRS)))

.PHONY : $(TARGETS) $(SUBDIRS_TARGETS)

$(TARGETS) : % : $(addsuffix %,$(SUBDIRS))

$(SUBDIRS_TARGETS) :
$(MAKE) -C $(@D) $(@F:.%=%)
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Tools and configuration common to multiple Citus Data projects.
Guides for getting things done, programming well, and programming in style.

* [Travis CI](/travis)
* [Uncrustify Formatter](/uncrustify)

## License

Expand Down
21 changes: 8 additions & 13 deletions uncrustify/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
PACKAGE_NAME = citustools
# needed variables will be passed in via top-level Makefile

prefix = /usr/local
bindir = $(prefix)/bin
datarootdir = $(prefix)/share
mandir = $(datarootdir)/man
sysconfdir = $(prefix)/etc
pkgsysconfdir = $(sysconfdir)/$(PACKAGE_NAME)
INSTALL := install -c
INSTALL_DATA := $(INSTALL) -m 644
INSTALL_SCRIPT := $(INSTALL) -m 755

INSTALL = install -c
INSTALL_DATA = $(INSTALL) -m 644
INSTALL_SCRIPT = $(INSTALL) -m 755

POD2MAN=pod2man --center "Citus Data Tools" -r "Citus Data"
MANPAGES = citus_indent.1
POD2MAN := pod2man --center "Citus Data Tools" -r "Citus Data"
MANPAGES := citus_indent.1

all: man

Expand All @@ -34,3 +27,5 @@ install: all installdirs
perl -pi -e 's,/usr/local/etc/citustools,$(pkgsysconfdir),g' \
$(DESTDIR)$(bindir)/citus_indent \
$(DESTDIR)$(mandir)/man1/citus_indent.1

.PHONY: all man clean installdirs install
17 changes: 17 additions & 0 deletions uncrustify/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Uncrustify

`citus_indent` wraps [`uncrustify`][1], a popular C source code beautifier. When invoked, it immediately applies Citus C style on any git-tracked C files under the current working directory, though a `--check` flag is implemented to check style without modifying any files.

## Getting Started

`citus_indent` requires `uncrustify` v0.60 or greater.

`make install` to install the script, the Citus style configuration file, and a man page. `man citus_indent` for more details.

## Usage

Apply the `citus-style` git attribute to any files that need the Citus C style applied. After that, just ensure you're within the project's directory hierarchy and run `citus_indent` to format all files. Add style changes with `git add -p`.

`citus_indent --check` is useful for scripts: it will not modify any files and simply exits with a non-zero status if any files marked with `citus-style` are non-compliant.

[1]: http://uncrustify.sourceforge.net

0 comments on commit a361b01

Please sign in to comment.