Fix comments style in configure.ac and Makefile.am
authorIvan Maidanski <ivmai@mail.ru>
Fri, 18 May 2018 18:36:37 +0000 (21:36 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 18 May 2018 18:36:37 +0000 (21:36 +0300)
(code refactoring)

Do not allow the comments that are meaningless in the auto-generated
configure and Makefile.in to be put to these files.

* Makefile.am (EXTRA_DIST, SINGLE_GC_OBJ, EXTRA_DIST,
include doc/doc.am): Change comment style from "#" to "##".
* Makefile.am (CPLUSPLUS): Move "#" inside the conditional block.
* configure.ac: Update the copyright.
* configure.ac: Change comment style from "#" to "dnl" for the comments
that are meaningless in auto-generated configure file.

Makefile.am
configure.ac

index 2914ce9..0d60b1b 100644 (file)
@@ -38,7 +38,7 @@ AM_CPPFLAGS = \
     -I$(top_builddir)/include -I$(top_srcdir)/include \
     $(ATOMIC_OPS_CFLAGS)
 
-# Initialize variables so that we can declare files locally.
+## Initialize variables so that we can declare files locally.
 EXTRA_DIST =
 lib_LTLIBRARIES =
 include_HEADERS =
@@ -107,7 +107,7 @@ if ENABLE_DISCLAIM
 libgc_la_SOURCES += fnlz_mlc.c
 endif
 
-# End of !SINGLE_GC_OBJ
+## End of !SINGLE_GC_OBJ
 endif
 
 if USE_INTERNAL_LIBATOMIC_OPS
@@ -128,11 +128,9 @@ libgc_la_LDFLAGS = $(extra_ldflags_libgc) -version-info $(LIBGC_VER_INFO) \
 EXTRA_libgc_la_SOURCES = ia64_save_regs_in_stack.s sparc_mach_dep.S \
     sparc_netbsd_mach_dep.s sparc_sunos4_mach_dep.s
 
-
+if CPLUSPLUS
 # C++ Interface
 # -------------
-
-if CPLUSPLUS
 lib_LTLIBRARIES += libgccpp.la
 pkginclude_HEADERS += include/gc_cpp.h
 include_HEADERS += include/extra/gc_cpp.h
@@ -141,9 +139,9 @@ libgccpp_la_LIBADD = ./libgc.la
 libgccpp_la_LDFLAGS = -version-info $(LIBGCCPP_VER_INFO) -no-undefined
 endif
 
-# FIXME: If Visual C++ users use Makefile.am, this should go into
-# pkginclude_HEADERS with proper AM_CONDITIONALization.  Otherwise
-# delete this comment.
+## FIXME: If Visual C++ users use Makefile.am, this should go into
+## pkginclude_HEADERS with proper AM_CONDITIONALization.  Otherwise
+## delete this comment.
 EXTRA_DIST += gc_cpp.cpp
 
 
@@ -224,5 +222,5 @@ include include/include.am
 include cord/cord.am
 include tests/tests.am
 include doc/doc.am
-# Putting these at the top causes cord to be built first, and not find libgc.a
-# on HP/UX.  There may be a better fix.
+## Putting these at the top causes cord to be built first, and not find
+## libgc.a on HP/UX.  There may be a better fix.
index f77f10f..501be32 100644 (file)
@@ -1,4 +1,6 @@
 # Copyright (c) 1999-2001 by Red Hat, Inc. All rights reserved.
+# Copyright (c) 2005-2009 Hewlett-Packard Development Company, L.P.
+# Copyright (c) 2009-2018 Ivan Maidanski
 #
 # THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
 # OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
 
 dnl Process this file with autoconf to produce configure.
 
-# Initialization
+dnl Initialization.
 AC_INIT(gc,7.7.0,https://github.com/ivmai/bdwgc/issues)
-    ## version must conform to [0-9]+[.][0-9]+[.][0-9]+
+dnl Version must conform to: [0-9]+[.][0-9]+[.][0-9]+
+
 AC_CONFIG_SRCDIR(gcj_mlc.c)
 AC_CONFIG_MACRO_DIR([m4])
 AC_CANONICAL_TARGET
@@ -33,8 +36,8 @@ AC_PROG_INSTALL
 LT_INIT([disable-static])
 # Only the shared libraries are produced by default, use "--enable-static"
 # option to override it.
-# Note: If Autoconf reports that LIBTOOL (or AC_ENABLE_SHARED, or
-# AC_PROG_LIBTOOL) is undefined, Libtool installation should be checked.
+dnl Note: If Autoconf reports that LIBTOOL (or AC_ENABLE_SHARED, or
+dnl AC_PROG_LIBTOOL) is undefined, Libtool installation should be checked.
 
 # Special CFLAGS to use when building
 gc_cflags=""
@@ -92,7 +95,7 @@ esac
 GC_CFLAGS=${gc_cflags}
 AC_SUBST(GC_CFLAGS)
 
-# Extra user-defined flags to pass both to C and C++ compilers.
+dnl Extra user-defined flags to pass both to C and C++ compilers.
 AC_SUBST([CFLAGS_EXTRA])
 
 AC_ARG_ENABLE(threads,
@@ -175,7 +178,7 @@ CFLAGS="$old_CFLAGS"
 
 THREADDLLIBS=
 need_atomic_ops_asm=false
-## Libraries needed to support dynamic loading and/or threads.
+# Libraries needed to support dynamic loading and/or threads.
 case "$THREADS" in
  no | none | single)
     THREADS=none
@@ -619,13 +622,13 @@ AC_ARG_WITH(target-subdir,
 AC_ARG_WITH(cross-host,
 [  --with-cross-host=HOST  configuring with a cross compiler])
 
-# automake wants to see AC_EXEEXT.  But we don't need it.  And having
-# it is actually a problem, because the compiler we're passed can't
-# necessarily do a full link.  So we fool automake here.
+dnl automake wants to see AC_EXEEXT.  But we don't need it.  And having
+dnl it is actually a problem, because the compiler we're passed can't
+dnl necessarily do a full link.  So we fool automake here.
 if false; then
-  # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
-  # to nothing, so nothing would remain between `then' and `fi' if it
-  # were not for the `:' below.
+  dnl autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
+  dnl to nothing, so nothing would remain between `then' and `fi' if it
+  dnl were not for the `:' below.
   :
   AC_EXEEXT
 fi
@@ -781,7 +784,7 @@ ac_is_dgux=no
 AC_CHECK_HEADER(sys/dg_sys_info.h,
 [ac_is_dgux=yes;])
 
-    ## :GOTCHA: we do not check anything but sys/dg_sys_info.h
+dnl :GOTCHA: we do not check anything but sys/dg_sys_info.h
 if test $ac_is_dgux = yes; then
     dgux_spec_opts="-DDGUX -D_DGUX_SOURCE -Di386 -mno-legend -O2"
     CFLAGS="$dgux_spec_opts $CFLAGS"
@@ -1015,15 +1018,15 @@ missing_libatomic_ops=false
 AS_IF([test x"$with_libatomic_ops" != xno -a x"$with_libatomic_ops" != xnone],
   [ missing_libatomic_ops=true ])
 
-# Note: "syntax error near unexpected token ATOMIC_OPS" reported by configure
-# means Autotools pkg.m4 file was not found during aclocal.m4 generation;
-# in this case, most probably, you should run pkg-config once before running
-# autogen.sh (autoreconf); alternatively, comment out the following 3 lines.
+dnl Note: "syntax error near unexpected token ATOMIC_OPS" reported by configure
+dnl means Autotools pkg.m4 file was not found during aclocal.m4 generation;
+dnl in this case, most probably, you should run pkg-config once before running
+dnl autogen.sh (autoreconf); alternatively, comment out the following 3 lines.
 AS_IF([test x$missing_libatomic_ops = xtrue],
   [ PKG_CHECK_MODULES([ATOMIC_OPS], [atomic_ops],
     [ missing_libatomic_ops=false ], [ [] ]) ])
 
-# Retry with AC_CHECK_HEADER if PKG_CHECK_MODULES failed.
+dnl Retry with AC_CHECK_HEADER if PKG_CHECK_MODULES failed.
 AS_IF([test x$missing_libatomic_ops = xtrue],
       [ AC_CHECK_HEADER([atomic_ops.h], [missing_libatomic_ops=false]) ])
 AS_IF([test x$missing_libatomic_ops = xtrue],