source@mandoc.bsd.lv
 help / color / Atom feed
* mandoc: No longer try to ask make(1) what the default compiler is, just 
@ 2020-02-05 15:12 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2020-02-05 15:12 UTC (permalink / raw)
  To: source

Log Message:
-----------
No longer try to ask make(1) what the default compiler is, just use "cc".
That line was a bad idea in the first place, it tried to be too clever,
and it failed in different ways on different platforms.  Even when it
succeeded, what make(1) considered the default wasn't always useful.
Having a simple and robust default and asking users to override it
when needed is better.

Modified Files:
--------------
    mandoc:
        configure
        configure.local.example

Revision Data
-------------
Index: configure.local.example
===================================================================
RCS file: /home/cvs/mandoc/mandoc/configure.local.example,v
retrieving revision 1.36
retrieving revision 1.37
diff -Lconfigure.local.example -Lconfigure.local.example -u -p -r1.36 -r1.37
--- configure.local.example
+++ configure.local.example
@@ -28,6 +28,14 @@
 
 # --- user settings relevant for all builds ----------------------------
 
+# By default, "cc" is used as the C compiler, but it can be overridden.
+# For example, the system compiler in SunOS 5.9 may not provide <stdint.h>,
+# which may require this line:
+CC=gcc
+
+# IBM AIX may need:
+CC=xlc
+
 # For -Tutf8 and -Tlocale operation, mandoc(1) requires <locale.h>
 # providing setlocale(3) and <wchar.h> providing wcwidth(3) and
 # putwchar(3) with a wchar_t storing UCS-4 values.  Theoretically,
@@ -267,21 +275,6 @@ BINM_CATMAN=mcatman		# default is "catma
 # --- settings that rarely need to be touched --------------------------
 
 # Do not set these variables unless you really need to.
-
-# You can manually override the compiler to be used.
-# But that's rarely useful because ./configure asks your make(1)
-# which compiler to use, and that answer will hardly be wrong.
-
-CC=cc
-
-# Because the system compiler may not provide <stdint.h>,
-# SunOS 5.9 may need:
-
-CC=gcc
-
-# IBM AIX may need:
-
-CC=xlc
 
 # Normally, leave CFLAGS unset.  In that case, -g will automatically
 # be used, and various -W options will be added if the compiler
Index: configure
===================================================================
RCS file: /home/cvs/mandoc/mandoc/configure,v
retrieving revision 1.71
retrieving revision 1.72
diff -Lconfigure -Lconfigure -u -p -r1.71 -r1.72
--- configure
+++ configure
@@ -41,7 +41,7 @@ OSENUM=
 OSNAME=
 UTF8_LOCALE=
 
-CC=`printf "all:\\n\\t@echo \\\$(CC)\\n" | env -i make -sf -`
+CC=cc
 CFLAGS=
 LDADD=
 LDFLAGS=
--
 To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-05 15:12 mandoc: No longer try to ask make(1) what the default compiler is, just schwarze

source@mandoc.bsd.lv

Archives are clonable: git clone --mirror http://inbox.vuxu.org/mandoc-source

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.mandoc.source


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git