mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-01 17:35:17 +00:00
build: fix gitignore sorting
Make it so we don't have to 'git add -f' particular files like po/POTFILES.in all the time (tested by fixing one of our special-case files as part of the patch). * .gnulib: Update to latest. * bootstrap: Resync from coreutils. * .gitignore: Sort whitelist entries correctly, including ignoring files rather than directories. * m4/virt-compile-warnings.m4: Convert tabs to space.
This commit is contained in:
parent
f25d064ead
commit
02c39a2f6d
12
.gitignore
vendored
12
.gitignore
vendored
@ -1,7 +1,3 @@
|
|||||||
!/m4/virt-*.m4
|
|
||||||
!/po/*.po
|
|
||||||
!/po/POTFILES.in
|
|
||||||
!/po/libvirt.pot
|
|
||||||
*#*#
|
*#*#
|
||||||
*.#*#
|
*.#*#
|
||||||
*.a
|
*.a
|
||||||
@ -46,11 +42,11 @@
|
|||||||
/libvirt.spec
|
/libvirt.spec
|
||||||
/ltconfig
|
/ltconfig
|
||||||
/ltmain.sh
|
/ltmain.sh
|
||||||
/m4/
|
/m4/*
|
||||||
/maint.mk
|
/maint.mk
|
||||||
/mingw32-libvirt.spec
|
/mingw32-libvirt.spec
|
||||||
/mkinstalldirs
|
/mkinstalldirs
|
||||||
/po/
|
/po/*
|
||||||
/proxy/
|
/proxy/
|
||||||
/src/libvirt_iohelper
|
/src/libvirt_iohelper
|
||||||
/tests/*.log
|
/tests/*.log
|
||||||
@ -67,3 +63,7 @@ results.log
|
|||||||
stamp-h
|
stamp-h
|
||||||
stamp-h.in
|
stamp-h.in
|
||||||
stamp-h1
|
stamp-h1
|
||||||
|
!/m4/virt-*.m4
|
||||||
|
!/po/*.po
|
||||||
|
!/po/POTFILES.in
|
||||||
|
!/po/libvirt.pot
|
||||||
|
2
.gnulib
2
.gnulib
@ -1 +1 @@
|
|||||||
Subproject commit dec3475763be252103922a887920012eeb32dc26
|
Subproject commit f79652003534e496bca1e49922ca521f12ca8051
|
46
bootstrap
46
bootstrap
@ -1,6 +1,6 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Print a version string.
|
# Print a version string.
|
||||||
scriptversion=2011-03-03.12; # UTC
|
scriptversion=2011-04-05.18; # UTC
|
||||||
|
|
||||||
# Bootstrap this package from checked-out sources.
|
# Bootstrap this package from checked-out sources.
|
||||||
|
|
||||||
@ -130,18 +130,7 @@ source_base=lib
|
|||||||
m4_base=m4
|
m4_base=m4
|
||||||
doc_base=doc
|
doc_base=doc
|
||||||
tests_base=tests
|
tests_base=tests
|
||||||
|
gnulib_extra_files=''
|
||||||
# Extra files from gnulib, which override files from other sources.
|
|
||||||
gnulib_extra_files="
|
|
||||||
$build_aux/install-sh
|
|
||||||
$build_aux/missing
|
|
||||||
$build_aux/mdate-sh
|
|
||||||
$build_aux/texinfo.tex
|
|
||||||
$build_aux/depcomp
|
|
||||||
$build_aux/config.guess
|
|
||||||
$build_aux/config.sub
|
|
||||||
doc/INSTALL
|
|
||||||
"
|
|
||||||
|
|
||||||
# Additional gnulib-tool options to use. Use "\newline" to break lines.
|
# Additional gnulib-tool options to use. Use "\newline" to break lines.
|
||||||
gnulib_tool_option_extras=
|
gnulib_tool_option_extras=
|
||||||
@ -229,6 +218,18 @@ case "$0" in
|
|||||||
*) test -r "$0.conf" && . ./"$0.conf" ;;
|
*) test -r "$0.conf" && . ./"$0.conf" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# Extra files from gnulib, which override files from other sources.
|
||||||
|
test -z "${gnulib_extra_files}" && \
|
||||||
|
gnulib_extra_files="
|
||||||
|
$build_aux/install-sh
|
||||||
|
$build_aux/missing
|
||||||
|
$build_aux/mdate-sh
|
||||||
|
$build_aux/texinfo.tex
|
||||||
|
$build_aux/depcomp
|
||||||
|
$build_aux/config.guess
|
||||||
|
$build_aux/config.sub
|
||||||
|
doc/INSTALL
|
||||||
|
"
|
||||||
|
|
||||||
if test "$vc_ignore" = auto; then
|
if test "$vc_ignore" = auto; then
|
||||||
vc_ignore=
|
vc_ignore=
|
||||||
@ -278,14 +279,29 @@ if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Ensure that lines starting with ! sort last, per gitignore conventions
|
||||||
|
# for whitelisting exceptions after a more generic blacklist pattern.
|
||||||
|
sort_patterns() {
|
||||||
|
sort -u "$@" | sed '/^!/ {
|
||||||
|
H
|
||||||
|
d
|
||||||
|
}
|
||||||
|
$ {
|
||||||
|
P
|
||||||
|
x
|
||||||
|
s/^\n//
|
||||||
|
}'
|
||||||
|
}
|
||||||
|
|
||||||
# If $STR is not already on a line by itself in $FILE, insert it,
|
# If $STR is not already on a line by itself in $FILE, insert it,
|
||||||
# sorting the new contents of the file and replacing $FILE with the result.
|
# sorting the new contents of the file and replacing $FILE with the result.
|
||||||
insert_sorted_if_absent() {
|
insert_sorted_if_absent() {
|
||||||
file=$1
|
file=$1
|
||||||
str=$2
|
str=$2
|
||||||
test -f $file || touch $file
|
test -f $file || touch $file
|
||||||
echo "$str" | sort -u - $file | cmp - $file > /dev/null \
|
echo "$str" | sort_patterns - $file | cmp - $file > /dev/null \
|
||||||
|| echo "$str" | sort -u - $file -o $file \
|
|| { echo "$str" | sort_patterns - $file > $file.bak \
|
||||||
|
&& mv $file.bak $file; } \
|
||||||
|| exit 1
|
|| exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
|
|||||||
case "$enable_compile_warnings" in
|
case "$enable_compile_warnings" in
|
||||||
no)
|
no)
|
||||||
try_compiler_flags=""
|
try_compiler_flags=""
|
||||||
;;
|
;;
|
||||||
yes|minimum|maximum|error)
|
yes|minimum|maximum|error)
|
||||||
|
|
||||||
# List of warnings that are not relevant / wanted
|
# List of warnings that are not relevant / wanted
|
||||||
@ -118,10 +118,10 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
|
|||||||
then
|
then
|
||||||
gl_WARN_ADD([-Werror])
|
gl_WARN_ADD([-Werror])
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
|
AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
WARN_LDFLAGS=$WARN_CFLAGS
|
WARN_LDFLAGS=$WARN_CFLAGS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user