]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Add a new way to document changes
authorRuediger Pluem <rpluem@apache.org>
Mon, 13 Jul 2020 10:29:11 +0000 (10:29 +0000)
committerRuediger Pluem <rpluem@apache.org>
Mon, 13 Jul 2020 10:29:11 +0000 (10:29 +0000)
* Makefile.in: Define the update-changes target to merge the change files
  from the changes directory to the top of the CHANGES file and remove
  them afterwards. If a Subversion binary was found during configure try
  to svn rm them otherwise just delete them.

* configure.in: Search for the Subversion binary.

* acinclude.m4: Set the corresponding Makefile variable for the Subversion
  binary.

* README.CHANGES: New file to document the new approach.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879822 13f79535-47bb-0310-9956-ffa450edef68

Makefile.in
README.CHANGES [new file with mode: 0644]
acinclude.m4
configure.in

index df59db6fde65b6da32bae61aa4f7b3a3af760e11..6a2be8d8308354a919a06309af1271704a2e1069 100644 (file)
@@ -166,6 +166,26 @@ docs:
            echo '  http://httpd.apache.org/docs-project/docsformat.html'; \
        fi
 
+update-changes:
+       @for i in `find changes -type f`; do \
+           cp CHANGES CHANGES.tmp ; \
+           awk -vfname=$$i 'BEGIN{done = 0} \
+                           done == 0 && /^Changes with Apache /{ active = 1; print; next}; \
+                           /^ *\*/ && active == 1 && done == 0{rec=$$0; while(getline<fname){if (! ($$0 ~ /^ *$$/)){print}}printf "\n";print rec; active = 0; done = 1; next} //;' \
+           CHANGES.tmp > CHANGES ; \
+           rm CHANGES.tmp ; \
+           if [ -n "$(SVN)" ] ; then \
+               if ! $(SVN) rm $$i 2>/dev/null ; then \
+                   $(RM) $$i ; \
+               fi ; \
+           else \
+               $(RM) $$i ; \
+           fi ; \
+       done ; \
+       if [ -n "$(SVN)" ] ; then \
+           $(SVN) diff CHANGES ; \
+       fi
+
 validate-xml:
        @if test -d $(top_srcdir)/docs/manual/build; then \
            cd $(top_srcdir)/docs/manual/build && ./build.sh validate-xml; \
diff --git a/README.CHANGES b/README.CHANGES
new file mode 100644 (file)
index 0000000..ebea59c
--- /dev/null
@@ -0,0 +1,17 @@
+Changes can be documented in two ways now: Either by directly editing the
+CHANGES file like it was done until now or by storing each entry for the
+CHANGES file correctly formated in a separate file in the "changes" directory.
+
+The benefit of the single file per change approach is that it eases backporting
+the CHANGES entry to a stable branch as it avoids the frequent merge conflicts
+as changes are merged in different orders or not at all in the stable branch.
+
+In order to keep the current CHANGES file for the users as is there is a new
+make target called 'update-changes'. It merges all change files in the changes
+directory to the top of the CHANGES file and removes them afterwards.
+
+This make target can be seen in a similar way as the scripts to update the
+documentation files from its xml sources. It can be executed immediately
+after the new file in the changes directory has been created / merged
+and committed or it can executed later. It should be executed at least before
+a release gets tagged.
index c8aab9ee62a3199fbc8af78bebc5fa68fe095e79..4ee184b7d3fa908e2382f162f63e4906a8894ead 100644 (file)
@@ -82,6 +82,7 @@ AC_DEFUN([APACHE_GEN_CONFIG_VARS],[
   APACHE_SUBST(LIBTOOL)
   APACHE_SUBST(SHELL)
   APACHE_SUBST(RSYNC)
+  APACHE_SUBST(SVN)
   APACHE_SUBST(MODULE_DIRS)
   APACHE_SUBST(MODULE_CLEANDIRS)
   APACHE_SUBST(PORT)
index 60cbf7b7f810b5f664e44dc42011d498cb5bc56f..0e81ab5510f7401c3bc95126fb3e8016fd48c9f8 100644 (file)
@@ -408,6 +408,7 @@ dnl ## Check for programs
 AC_PATH_PROG(RM, rm)
 AC_PATH_PROG(PKGCONFIG, pkg-config)
 AC_PATH_PROG(RSYNC, rsync)
+AC_PATH_PROG(SVN, svn)
 AC_PROG_AWK
 AC_PROG_LN_S
 AC_CHECK_TOOL(RANLIB, ranlib, true)