use assembly code matcher when possible
authorJim Meyering <meyering@redhat.com>
Sat, 20 Mar 2010 12:05:58 +0000 (13:05 +0100)
committerJim Meyering <meyering@redhat.com>
Tue, 6 Apr 2010 06:24:37 +0000 (08:24 +0200)
* configure.ac (ASCPPPOST): Backslash-escape "#" in AC_SUBST'd
variable, to keep make from seeing it as a comment-introducer.
Based on a patch by Petr Pisar.
* lib/Makefile.am (match.$(OBJEXT)): Use AM_V_GEN and AM_V_at.
* lib/match.c: Don't include <config.h>.
It would impede configure-time assembler test.
* .x-sc_require_config_h: Exempt lib/match.c from syntax-check.
* .x-sc_require_config_h_first: Likewise.

.x-sc_require_config_h [new file with mode: 0644]
.x-sc_require_config_h_first [new file with mode: 0644]
THANKS
configure.ac
lib/Makefile.am
lib/match.c

diff --git a/.x-sc_require_config_h b/.x-sc_require_config_h
new file mode 100644 (file)
index 0000000..a89d68c
--- /dev/null
@@ -0,0 +1 @@
+lib/match\.c
diff --git a/.x-sc_require_config_h_first b/.x-sc_require_config_h_first
new file mode 100644 (file)
index 0000000..a89d68c
--- /dev/null
@@ -0,0 +1 @@
+lib/match\.c
diff --git a/THANKS b/THANKS
index a69f8326b16a72bc3904d53c6a08623735907587..713558b36af9603fc893297ebc87e828d93d4bd2 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -204,6 +204,7 @@ Pascal Petit            petit@cadillac.ibp.fr
 Bruno Pillard          bp@chorus.fr
 Franc,ois Pinard        pinard@iro.umontreal.ca
 Jay Pinkos              pinkos@butyng.bu.edu
+Petr Písař              petr.pisar@atlas.cz
 Thomas Plass            thomas@cogsci.ed.ac.uk
 Mike Polo               mikep@cfsmo.honeywell.com
 Francesco Potorti       pot@fly.cnuce.cnr.it
index e9246e31a7a22e56bafd80b3e58bdfe33425c0e0..39c6d52be02e572ebbaccd62138e4c94d61e9b7e 100644 (file)
@@ -130,7 +130,7 @@ if test "$gl_gcc_warnings" = yes; then
 fi
 
 # cc -E produces incorrect asm files on SVR4, so postprocess it.
-ASCPPPOST="sed '/^ *#/d; s,//.*,,; s/% /%/g; s/\\. /./g'"
+ASCPPPOST="sed '/^ *\\#/d; s,//.*,,; s/% /%/g; s/\\. /./g'"
 AC_SUBST([ASCPPPOST])
 
 AC_CACHE_CHECK([for underline in external names], [gzip_cv_underline],
index 6f4f55e183f2fe984c70715d68e4a6a7227544b4..b4c105ceb7f5078e15a270d433478061e65793f2 100644 (file)
@@ -24,11 +24,11 @@ libgzip_a_DEPENDENCIES += $(LIBOBJS)
 AM_CFLAGS += $(WARN_CFLAGS) $(WERROR_CFLAGS)
 
 match.$(OBJEXT): match.c
-       cp $(srcdir)/match.c _match.S
-       $(CPP) $(CPPFLAGS) $(ASCPPFLAGS) _match.S > _match.i
-       $(ASCPPPOST) < _match.i > match_.s
-       $(CC) $(CPPFLAGS) $(CFLAGS) $(ASFLAGS_config) -c match_.s
-       mv match_.$(OBJEXT) $@
-       rm -f _match.S _match.i match_.s
+       $(AM_V_GEN)cp $(srcdir)/match.c _match.S
+       $(AM_V_at)$(CPP) $(CPPFLAGS) $(ASCPPFLAGS) _match.S > _match.i
+       $(AM_V_at)$(ASCPPPOST) < _match.i > match_.s
+       $(AM_V_at)$(CC) $(CPPFLAGS) $(CFLAGS) $(ASFLAGS_config) -c match_.s
+       $(AM_V_at)mv match_.$(OBJEXT) $@
+       $(AM_V_at)rm -f _match.S _match.i match_.s
 
 MOSTLYCLEANFILES += _match.S _match.i match_.s
index 4ef612897af9449e10ac0ba0dddb5310662e6ce9..5dd8d642087c72e9db48e2b0600fd74ea9da8bcc 100644 (file)
@@ -28,8 +28,6 @@
  * David Mosberger-Tang <davidm@hpl.hp.com>.
  */
 
-#include <config.h>
-
 /* Preprocess with -DNO_UNDERLINE if your C compiler does not prefix
  * external symbols with an underline character '_'.
  */