libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

HEAD: Don't use `#' in Makefiles


From: Ralf Wildenhues
Subject: HEAD: Don't use `#' in Makefiles
Date: Wed, 24 Aug 2005 22:08:52 +0200
User-agent: Mutt/1.5.9i

Hello again,

I'm posting this for reference should the issue ever come up in
practice: it is possible to get all the non-comment hash signs out
of our make files.  But I don't want to actually apply this without
a good reason; it's pretty ugly, we've yet to see a bug report for
this, but what's most important:

Currently, our dependencies seem built in a way to cause trouble 
with many `make' implementations, merely GNU make and BSD make
(in the form of pmake on GNU/Linux) seem to be able to cope without
constantly triggering aclocal reruns.  That's more important to fix.
(FWIW, I believe this bug is in branch-2-0 as well.)

Cheers,
Ralf

        * configure.ac (lt_make_comment): Define for broken `make'.
        * Makefile.am, tests/demo/Makefile.am, tests/pdemo/Makefile.am:
        Use.
        * bootstrap. Adjust.

Index: bootstrap
===================================================================
RCS file: /cvsroot/libtool/libtool/bootstrap,v
retrieving revision 1.65
diff -u -r1.65 bootstrap
--- bootstrap   23 Aug 2005 11:14:55 -0000      1.65
+++ bootstrap   23 Aug 2005 12:58:58 -0000
@@ -91,7 +91,8 @@
     ./tests/testsuite ./libltdl/Makefile.am \
     srcdir=. top_srcdir=. PACKAGE="$2" VERSION="$3" \
     PACKAGE_BUGREPORT="address@hidden" M4SH="$AUTOM4TE --language=m4sh" \
-    AUTOTEST="$AUTOM4TE --language=autotest" SED="$SED" MAKEINFO="$MAKEINFO"
+    AUTOTEST="$AUTOM4TE --language=autotest" SED="$SED" MAKEINFO="$MAKEINFO" \
+    lt_make_comment='tr "@" "#"'
 
 test -f clcommit.m4sh && $MAKE -f Makefile.maint commit \
     srcdir=. top_srcdir=. PACKAGE="$2" VERSION="$3" M4SH="$AUTOM4TE -l m4sh" \
Index: configure.ac
===================================================================
RCS file: /cvsroot/libtool/libtool/configure.ac,v
retrieving revision 1.71
diff -u -r1.71 configure.ac
--- configure.ac        23 Aug 2005 01:49:36 -0000      1.71
+++ configure.ac        23 Aug 2005 13:07:05 -0000
@@ -148,6 +148,15 @@
 done
 AC_SUBST([DIST_MAKEFILE_LIST])
 
+# turn `@' into `#' without using the latter, for broken `make'.
+case `echo '@' | tr '@' '\101'` in
+  A) # ASCII based system
+  lt_make_comment="tr '@' '\173'" ;;
+  *) # EBCDIC based system
+  lt_make_comment="tr '@' '\043'" ;;
+esac
+AC_SUBST(lt_make_comment)dnl
+
 
 ## ---------------- ##
 ## compiler checks. ##
Index: Makefile.am
===================================================================
RCS file: /cvsroot/libtool/libtool/Makefile.am,v
retrieving revision 1.157
diff -u -r1.157 Makefile.am
--- Makefile.am 23 Aug 2005 01:49:36 -0000      1.157
+++ Makefile.am 23 Aug 2005 12:58:58 -0000
@@ -487,7 +487,7 @@
 
 $(srcdir)/tests/package.m4: $(srcdir)/configure.ac
        { \
-         echo '# Signature of the current package.'; \
+         echo '@ Signature of the current package.' | $(lt_make_comment); \
          echo 'm4_define([AT_PACKAGE_NAME],      address@hidden@])'; \
          echo 'm4_define([AT_PACKAGE_TARNAME],   address@hidden@])'; \
          echo 'm4_define([AT_PACKAGE_VERSION],   address@hidden@])'; \
Index: tests/demo/Makefile.am
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/demo/Makefile.am,v
retrieving revision 1.8
diff -u -r1.8 Makefile.am
--- tests/demo/Makefile.am      23 Aug 2005 01:49:37 -0000      1.8
+++ tests/demo/Makefile.am      23 Aug 2005 12:52:42 -0000
@@ -59,7 +59,7 @@
 # create a script that says that -dlopen is not supported
 helldl helldl$(EXEEXT):
        rm -f $@
-       echo '#! /bin/sh' > $@
+       echo '@! /bin/sh' | $(lt_make_comment) > $@
        echo '-dlopen is unsupported' >> $@
        chmod +x $@
 endif
Index: tests/pdemo/Makefile.am
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/pdemo/Makefile.am,v
retrieving revision 1.8
diff -u -r1.8 Makefile.am
--- tests/pdemo/Makefile.am     23 Aug 2005 01:49:37 -0000      1.8
+++ tests/pdemo/Makefile.am     23 Aug 2005 12:52:42 -0000
@@ -59,7 +59,7 @@
 # create a script that says that -dlopen is not supported
 helldl helldl$(EXEEXT):
        rm -f $@
-       echo '#! /bin/sh' > $@
+       echo '@! /bin/sh' | $(lt_make_comment) > $@
        echo '-dlopen is unsupported' >> $@
        chmod +x $@
 endif




reply via email to

[Prev in Thread] Current Thread [Next in Thread]