[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[task #15756] Robustly decide which OS we are on
From: |
Boud Roukema |
Subject: |
[task #15756] Robustly decide which OS we are on |
Date: |
Thu, 20 Aug 2020 10:50:31 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0 |
URL:
<https://savannah.nongnu.org/task/?15756>
Summary: Robustly decide which OS we are on
Project: Reproducible paper template
Submitted by: boud
Submitted on: Thu 20 Aug 2020 02:50:29 PM UTC
Should Start On: Thu 20 Aug 2020 12:00:00 AM UTC
Should be Finished on: Thu 20 Aug 2020 12:00:00 AM UTC
Category: None
Priority: 5 - Normal
Status: None
Privacy: Public
Percent Complete: 0%
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Effort: 0.00
_______________________________________________________
Details:
In commit _9573d4e_ of maneage, in file
_reproduce/software/shell/configure.sh_ , we presently have
207 kernelname=$(uname -s)
208 if [ x$kernelname = xLinux ]; then
209 on_mac_os=no
210
211 # Don't forget to add the respective C++ compiler below (leave
'cc' in
212 # the end).
213 c_compiler_list="gcc clang cc"
214 else
215 host_cc=1
216 on_mac_os=yes
217
218 # Don't forget to add the respective C++ compiler below (leave
'cc' in
219 # the end).
220 c_compiler_list="clang gcc cc"
221 fi
preceded by a warning that we should do better. :)
At https://ss64.com/osx/uname.html I see that _uname -s_ on OSX seems to print
the operating system name, not the kernel name.
Here's a stackoverflow recommended script plus discussion:
https://stackoverflow.com/questions/714100/os-detecting-makefile
I think that as a minimum, we should check that "Darwin" is the OS
https://en.wikipedia.org/wiki/Darwin_%28operating_system%29 , and report a
failure to detect the OS if both Linux and Darwin fail. That way we'll get
more useful error reports for encouraging updates/extensions in
portability/reproducibility.
As a matter of principle, we should be able to run on GNU/Hurd, which is not a
Linux system... :)
_______________________________________________________
Reply to this item at:
<https://savannah.nongnu.org/task/?15756>
_______________________________________________
Message sent via Savannah
https://savannah.nongnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [task #15756] Robustly decide which OS we are on,
Boud Roukema <=