Skip to content

Instantly share code, notes, and snippets.

@awreece
Last active December 18, 2015 11:59
Show Gist options
  • Save awreece/5779668 to your computer and use it in GitHub Desktop.
Save awreece/5779668 to your computer and use it in GitHub Desktop.
pretty: $(SRCS)
@# Check to make sure we have the proper version of indent.
$(if $(findstring GNU,$(shell indent --version 2>/dev/null)),, $(error Install GNU indent))
@echo "Running GNU indent on source files"
@# Note - If we have any typedefs, we need to explicitly tell indent
@# about our typedefs via
@# -T type_t
@indent \
-T solution_t \
--no-tabs \
--indent-level2 \
--continue-at-parentheses \
--line-length80 \
--honour-newlines \
--blank-lines-after-procedures \
--break-before-boolean-operator \
--braces-on-if-line \
--braces-on-func-def-line \
--braces-on-struct-decl-line \
--cuddle-else \
--cuddle-do-while \
--case-brace-indentation0 \
--case-indentation0 \
--no-space-after-function-call-names \
--space-after-cast \
--no-space-after-parentheses \
--start-left-side-of-comments \
--space-after-for \
--space-after-while \
--dont-break-procedure-type \
$(SRCS)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment