Skip to content

Commit

Permalink
Use more editor friendly filename patters
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Sep 21, 2023
1 parent 1dd4dc6 commit 1eb38a1
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 34 deletions.
14 changes: 13 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,19 @@ root = true
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true

[{Makefile*,*.mk,*.mk.in}]
indent_style = tab
indent_size = 4

[*.m4]
indent_style = space
indent_size = 8

[*.md]
trim_trailing_whitespace = false

[{vcsh.in,completions/vcsh.*}]
indent_style = tab
trim_trailing_whitespace = true
4 changes: 2 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ EXTRA_DIST += t/000-tear-env.t t/001-setup-env.t t/100-init.t t/300-add.t t/950-
BUILT_SOURCES =
CLEANFILES = $(dist_man_MANS) $(bin_SCRIPTS)

include $(top_srcdir)/build-aux/git_version.am
include $(top_srcdir)/build-aux/shell_completion_dirs.am
include $(top_srcdir)/build-aux/git_version.mk
include $(top_srcdir)/build-aux/shell_completion_dirs.mk

if !IS_SDIST
doc/vcsh.1: doc/vcsh.1.ronn
Expand Down
53 changes: 26 additions & 27 deletions build-aux/ax_prog_perl_modules.m4
Original file line number Diff line number Diff line change
Expand Up @@ -38,40 +38,39 @@ AU_ALIAS([AC_PROG_PERL_MODULES], [AX_PROG_PERL_MODULES])
AC_DEFUN([AX_PROG_PERL_MODULES],[dnl
m4_define([ax_perl_modules])
m4_foreach([ax_perl_module], m4_split(m4_normalize([$1])),
[
m4_append([ax_perl_modules],
[']m4_bpatsubst(ax_perl_module,=,[ ])[' ])
])
m4_foreach([ax_perl_module], m4_split(m4_normalize([$1])), [
m4_append([ax_perl_modules],
[']m4_bpatsubst(ax_perl_module,=,[ ])[' ])
])
# Make sure we have perl
if test -z "$PERL"; then
AC_CHECK_PROG(PERL,perl,perl)
AC_CHECK_PROG(PERL,perl,perl)
fi
if test "x$PERL" != x; then
ax_perl_modules_failed=0
for ax_perl_module in ax_perl_modules; do
AC_MSG_CHECKING(for perl module $ax_perl_module)
ax_perl_modules_failed=0
for ax_perl_module in ax_perl_modules; do
AC_MSG_CHECKING(for perl module $ax_perl_module)
# Would be nice to log result here, but can't rely on autoconf internals
$PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1
if test $? -ne 0; then
AC_MSG_RESULT(no);
ax_perl_modules_failed=1
else
AC_MSG_RESULT(ok);
fi
done
# Would be nice to log result here, but can't rely on autoconf internals
$PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1
if test $? -ne 0; then
AC_MSG_RESULT(no);
ax_perl_modules_failed=1
else
AC_MSG_RESULT(ok);
fi
done
# Run optional shell commands
if test "$ax_perl_modules_failed" = 0; then
:
$2
else
:
$3
fi
# Run optional shell commands
if test "$ax_perl_modules_failed" = 0; then
:
$2
else
:
$3
fi
else
AC_MSG_WARN(could not find perl)
AC_MSG_WARN(could not find perl)
fi])dnl
6 changes: 3 additions & 3 deletions build-aux/ax_progvar.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AC_DEFUN([AX_PROGVAR], [
test -n "$m4_toupper($1)" || { AC_PATH_PROG(m4_toupper($1), m4_default($2,$1)) }
test -n "$m4_toupper($1)" || AC_MSG_ERROR([m4_default($2,$1) is required])
])
test -n "$m4_toupper($1)" || { AC_PATH_PROG(m4_toupper($1), m4_default($2,$1)) }
test -n "$m4_toupper($1)" || AC_MSG_ERROR([m4_default($2,$1) is required])
])

2 changes: 2 additions & 0 deletions build-aux/git_version.am → build-aux/git_version.mk
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ dist-hook: dist-tarball-version
.PHONY: dist-tarball-version
dist-tarball-version:
printf "$(VERSION)" > "$(distdir)/.tarball-version"

# vim: ft=automake
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ zshcompletiondir = $(ZSH_COMPLETION_DIR)
nodist_zshcompletion_DATA = $(COMPLETIONS_OUT_DIR)/_$(TRANSFORMED_PACKAGE_NAME)
CLEANFILES += $(nodist_zshcompletion_DATA)
endif

# vim: ft=automake
2 changes: 1 addition & 1 deletion doc/sample_hooks/pre-merge-unclobber
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
# the now-renamed files.

for object in $(git ls-tree -r origin/master | awk '{print $4}'); do
[ -e "$object" ] && mv "$object" "$object.vcsh-unclobber"
[ -e "$object" ] && mv "$object" "$object.vcsh-unclobber"
done

0 comments on commit 1eb38a1

Please sign in to comment.