HACKING: Drop from the git repository

Despite being a generated file, HACKING has been tracked in
the git repository along with actual source files. As far as
I'm aware, it's the only generated file for which that happens.

Times and times again, people[1] have committed changes to
the source file without refreshing the generated copy at the
same time.

The rationale for tracking the generated file is to help out
people who just cloned the git repository looking to contribue;
however, README-hacking already contains enough information to
get perspective contributors to a place where they can simply
look at docs/hacking.html instead.

[1] Mostly me, to be honest

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
Andrea Bolognani 2017-06-26 08:45:44 +02:00
parent e49f2f9280
commit d672551816
8 changed files with 9 additions and 1315 deletions

1112
HACKING

File diff suppressed because it is too large Load Diff

View File

@ -66,17 +66,6 @@ EXTRA_DIST += \
$(srcdir)/docs/news-ascii.xsl \
$(srcdir)/docs/reformat-news.py
$(top_srcdir)/HACKING: $(top_srcdir)/docs/hacking1.xsl \
$(top_srcdir)/docs/hacking2.xsl \
$(top_srcdir)/docs/wrapstring.xsl \
$(top_srcdir)/docs/hacking.html.in
$(AM_V_GEN)if [ -x $(XSLTPROC) ] ; then \
$(XSLTPROC) --nonet $(top_srcdir)/docs/hacking1.xsl \
$(top_srcdir)/docs/hacking.html.in | \
$(XSLTPROC) --nonet $(top_srcdir)/docs/hacking2.xsl - \
| perl -0777 -pe 's/\n\n+$$/\n/' \
> $@-t && mv $@-t $@ ; fi;
rpm: clean
@(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.xz)

View File

@ -2,7 +2,8 @@
These notes intend to help people working on the checked-out sources.
These requirements do not apply when building from a distribution tarball.
See also HACKING for more detailed libvirt contribution guidelines.
See also docs/hacking.html (after building libvirt using the information
included in this file) for more detailed contribution guidelines.
* Requirements

View File

@ -64,8 +64,7 @@ Contributing
The libvirt project welcomes contributions in many ways. For most components
the best way to contribute is to send patches to the primary development
mailing list. Further guidance on this can be found in the `HACKING` file
or on the website:
mailing list. Further guidance on this can be found on the website:
[https://libvirt.org/contribute.html](https://libvirt.org/contribute.html)

13
cfg.mk
View File

@ -91,7 +91,7 @@ endif
# Files that should never cause syntax check failures.
VC_LIST_ALWAYS_EXCLUDE_REGEX = \
(^(HACKING|docs/(news(-[0-9]*)?\.html\.in|.*\.patch))|\.(po|fig|gif|ico|png))$$
(^(docs/(news(-[0-9]*)?\.html\.in|.*\.patch))|\.(po|fig|gif|ico|png))$$
# Functions like free() that are no-ops on NULL arguments.
useless_free_options = \
@ -910,12 +910,11 @@ sc_curly_braces_style:
'^\s*(?!([a-zA-Z_]*for_?each[a-zA-Z_]*) ?\()([_a-zA-Z0-9]+( [_a-zA-Z0-9]+)* ?\()?(\*?[_a-zA-Z0-9]+(,? \*?[_a-zA-Z0-9\[\]]+)+|void)\) ?\{' \
$$files; then \
echo '$(ME): Non-K&R style used for curly braces around' \
'function body, see HACKING' 1>&2; exit 1; \
'function body' 1>&2; exit 1; \
fi; \
if $(GREP) -A1 -En ' ((if|for|while|switch) \(|(else|do)\b)[^{]*$$'\
$$files | $(GREP) '^[^ ]*- *{'; then \
echo '$(ME): Use hanging braces for compound statements,' \
'see HACKING' 1>&2; exit 1; \
echo '$(ME): Use hanging braces for compound statements' 1>&2; exit 1; \
fi
sc_prohibit_windows_special_chars_in_filename:
@ -1067,9 +1066,8 @@ _autogen:
_autogen_error:
$(srcdir)/autogen.sh --dry-run
# regenerate HACKING as part of the syntax-check
ifneq ($(_gl-Makefile),)
syntax-check: $(top_srcdir)/HACKING spacing-check test-wrap-argv \
syntax-check: spacing-check test-wrap-argv \
prohibit-duplicate-header mock-noinline
endif
@ -1081,8 +1079,7 @@ prohibit-duplicate-header:
spacing-check:
$(AM_V_GEN)files=`$(VC_LIST) | grep '\.c$$'`; \
$(PERL) $(top_srcdir)/build-aux/check-spacing.pl $$files || \
{ echo '$(ME): incorrect formatting, see HACKING for rules' 1>&2; \
exit 1; }
{ echo '$(ME): incorrect formatting' 1>&2; exit 1; }
mock-noinline:
$(AM_V_GEN)files=`$(VC_LIST) | grep '\.[ch]$$'`; \

View File

@ -172,7 +172,7 @@ schema_DATA = $(wildcard $(srcdir)/schemas/*.rng)
EXTRA_DIST= \
apibuild.py genaclperms.pl \
site.xsl subsite.xsl newapi.xsl page.xsl \
hacking1.xsl hacking2.xsl wrapstring.xsl \
wrapstring.xsl \
$(dot_html) $(dot_html_in) $(gif) $(apihtml) $(apipng) \
$(devhelphtml) $(devhelppng) $(devhelpcss) $(devhelpxsl) \
$(xml) $(qemu_xml) $(lxc_xml) $(admin_xml) $(fig) $(png) $(css) \

View File

@ -1,40 +0,0 @@
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="UTF-8" indent="no"/>
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<!-- resolve b/i/code tags in a first pass, because they interfere with line
wrapping in the second pass -->
<xsl:template match="html:b">*<xsl:apply-templates/>*</xsl:template>
<xsl:template match="html:i">'<xsl:apply-templates/>'</xsl:template>
<xsl:template match="html:code">"<xsl:apply-templates/>"</xsl:template>
<!-- likewise, reformat a tags in first pass -->
<xsl:template match="html:a">
<xsl:text> </xsl:text><xsl:apply-templates/>
<xsl:if test="@href">
<xsl:text> &lt;</xsl:text><xsl:value-of select="@href"/>
<xsl:text>&gt;</xsl:text>
</xsl:if>
</xsl:template>
</xsl:stylesheet>

View File

@ -1,140 +0,0 @@
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="wrapstring.xsl"/>
<xsl:output method="text" encoding="UTF-8" indent="no"/>
<xsl:strip-space elements="*"/>
<xsl:variable name="newline">
<xsl:text>
</xsl:text>
</xsl:variable>
<xsl:template match="/">
<xsl:text>-*- buffer-read-only: t -*- vi: set ro:
DO NOT EDIT THIS FILE! IT IS GENERATED AUTOMATICALLY
from docs/hacking.html.in!
</xsl:text>
<xsl:apply-templates/>
</xsl:template>
<!-- title -->
<xsl:template match="html:h1">
<xsl:text> </xsl:text>
<xsl:value-of select="normalize-space(.)"/>
<xsl:text>
</xsl:text>======================
</xsl:template>
<!-- output the current text node underlined -->
<xsl:template name="underline">
<xsl:param name="text" select="normalize-space(.)"/>
<xsl:param name="text-length" select="string-length($text)"/>
<xsl:param name="char" select="'='"/>
<xsl:param name="line" select="$char"/>
<xsl:choose>
<xsl:when test="$text-length > 1">
<xsl:call-template name="underline">
<xsl:with-param name="text" select="$text"/>
<xsl:with-param name="text-length" select="$text-length - 1"/>
<xsl:with-param name="char" select="$char"/>
<xsl:with-param name="line" select="concat($line,$char)"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$text"/>
<xsl:value-of select="$newline"/>
<xsl:value-of select="$line"/>
<xsl:value-of select="$newline"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="html:h2">
<xsl:value-of select="$newline"/>
<xsl:call-template name="underline"/>
</xsl:template>
<xsl:template match="html:h3">
<xsl:call-template name="underline">
<xsl:with-param name="char" select="'-'"/>
</xsl:call-template>
</xsl:template>
<!-- output text line wrapped at 80 chars -->
<xsl:template match="text()">
<xsl:call-template name="wrap-string">
<xsl:with-param name="str" select="normalize-space(.)"/>
<xsl:with-param name="wrap-col" select="80"/>
<xsl:with-param name="break-mark" select="$newline"/>
</xsl:call-template>
</xsl:template>
<xsl:template match="html:p">
<xsl:apply-templates/><xsl:value-of select="$newline"/><xsl:value-of select="$newline"/>
</xsl:template>
<xsl:template match="html:ol/html:li">(<xsl:value-of select="position()"/>) <xsl:apply-templates/>
</xsl:template>
<xsl:template match="html:ul/html:li">- <xsl:apply-templates/><xsl:value-of select="$newline"/><xsl:value-of select="$newline"/>
</xsl:template>
<xsl:template match="html:li/html:ul/html:li">-- <xsl:apply-templates/><xsl:value-of select="$newline"/><xsl:value-of select="$newline"/>
</xsl:template>
<xsl:template match="html:dl/html:dt">*<xsl:apply-templates/>*<xsl:value-of select="$newline"/><xsl:value-of select="$newline"/>
</xsl:template>
<xsl:template match="html:dl/html:dd"><xsl:apply-templates/><xsl:value-of select="$newline"/><xsl:value-of select="$newline"/>
</xsl:template>
<!-- add newline before nested <ul> -->
<xsl:template match="html:li/html:ul"><xsl:value-of select="$newline"/><xsl:value-of select="$newline"/><xsl:apply-templates/>
</xsl:template>
<xsl:template match="html:pre">
<xsl:choose>
<xsl:when test="starts-with(.,'&#xA;')"><xsl:value-of select="substring(.,2)"/><xsl:value-of select="$newline"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="."/><xsl:value-of select="$newline"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>