summaryrefslogtreecommitdiff
path: root/mcon/U/Guess.U
diff options
context:
space:
mode:
authorrmanfredi <rmanfredi@2592e710-e01b-42a5-8df0-11608a6cc53d>2010-11-28 00:21:26 +0000
committerrmanfredi <rmanfredi@2592e710-e01b-42a5-8df0-11608a6cc53d>2010-11-28 00:21:26 +0000
commitc1d13fe0f4272b18a44fff07b956d4e4d206177d (patch)
tree8578a77d28a2534257a6a485e56a5c501869bc9a /mcon/U/Guess.U
parente1369f5a1a89361f23f54c61a9f3b4384db35c6d (diff)
Moved computation of the filename position in cpp output from Findhdr.U to
a standalone unit. Extracted MIPS system detection from usrinc.U to Mips.U. Compute default value for usrinc by parsing cpp output. Added WINDOWS_SYSTEM define for Windows. Random cleanup. git-svn-id: svn://svn.code.sf.net/p/dist/code/trunk/dist@41 2592e710-e01b-42a5-8df0-11608a6cc53d
Diffstat (limited to 'mcon/U/Guess.U')
-rw-r--r--mcon/U/Guess.U38
1 files changed, 29 insertions, 9 deletions
diff --git a/mcon/U/Guess.U b/mcon/U/Guess.U
index 3459325..59d0c64 100644
--- a/mcon/U/Guess.U
+++ b/mcon/U/Guess.U
@@ -34,8 +34,8 @@
?X: is. The information it collects here is used primarily to establish default
?X: answers to other questions.
?X:
-?MAKE:Guess d_eunice d_xenix d_bsd d_linux d_dos d_os2: cat test echo n c \
- contains rm tr Loc eunicefix
+?MAKE:Guess d_eunice d_xenix d_bsd d_linux d_dos d_os2 d_windows: cat test \
+ echo n c contains rm tr Loc eunicefix
?MAKE: -pick add $@ %<
?S:d_eunice:
?S: This variable conditionally defines the symbols EUNICE_SYSTEM, which
@@ -61,6 +61,10 @@
?S: This symbol conditionally defines the symbol LINUX_SYSTEM when running
?S: on a Linux system.
?S:.
+?S:d_windows:
+?S: This symbol conditionally defines the symbol WINDOWS_SYSTEM when running
+?S: on a Windows system.
+?S:.
?C:EUNICE_SYSTEM (EUNICE):
?C: This symbol, if defined, indicates that the program is being compiled
?C: under the EUNICE package under VMS. The program will need to handle
@@ -92,6 +96,10 @@
?C: This symbol, if defined, indicates that the program is running under
?C: a Linux system.
?C:.
+?C:WINDOWS_SYSTEM:
+?C: This symbol, if defined, indicates that the program is running under
+?C: a Windows system.
+?C:.
?H:#$d_eunice EUNICE_SYSTEM /**/
?H:#$d_eunice VMS_SYSTEM /**/
?H:#$d_xenix XENIX_SYSTEM /**/
@@ -99,8 +107,10 @@
?H:#$d_os2 OS2_SYSTEM /**/
?H:#$d_bsd BSD_SYSTEM /**/
?H:#$d_linux LINUX_SYSTEM /**/
+?H:#$d_windows WINDOWS_SYSTEM /**/
?H:.
-?F:./bsd ./usg ./v7 ./osf1 ./eunice ./xenix ./venix ./dos ./os2 ./gnu ./linux
+?F:./bsd ./usg ./v7 ./osf1 ./eunice ./xenix ./venix ./dos ./os2 ./gnu
+?F:./windows ./linux
?T:xxx DJGPP MACHTYPE
: make some quick guesses about what we are up against
echo " "
@@ -116,10 +126,12 @@ echo exit 1 >os2
echo exit 1 >gnu
echo exit 1 >linux
echo exit 1 >dos
+echo exit 1 >windows
d_bsd="$undef"
d_linux="$undef"
d_dos="$undef"
d_os2="$undef"
+d_windows="$undef"
?X:
?X: Do not use 'usrinc', or we get a circular dependency. because
?X: usrinc is defined in usrinc.U, which relies on us...
@@ -178,6 +190,18 @@ EOI
d_eunice="$undef"
;;
esac
+if test -d c:/.; then
+ case "X${MACHTYPE:-nonesuchmach}" in
+ *cygwin) echo " "; echo "Hah!... you're running under Cygwin!";;
+ *msys) echo " "; echo "Hah!... you're running under MinGW!";;
+ esac
+ case "X${MACHTYPE:-nonesuchmach}" in
+ *cygwin|*msys)
+ echo exit 0 >windows
+ d_windows="$define"
+ ;;
+ esac
+fi
case "$p_" in
:) ;;
*)
@@ -185,10 +209,6 @@ case "$p_" in
I have the feeling something is not exactly right, however...don't tell me...
EOI
if test -n "$DJGPP"; then
- case "X${MACHTYPE:-nonesuchmach}" in
- cygwin) echo "hah!... you're running under Cygwin!";;
- *) echo "got it... you're running DOS with DJGPP!";;
- esac
echo exit 0 >dos
d_dos="$define"
else
@@ -222,7 +242,7 @@ else
echo "Nor is it Venix..."
fi
fi
-chmod +x bsd usg v7 osf1 eunice xenix venix dos os2 gnu linux
-$eunicefix bsd usg v7 osf1 eunice xenix venix dos os2 gnu linux
+chmod +x bsd usg v7 osf1 eunice xenix venix dos os2 gnu linux windows
+$eunicefix bsd usg v7 osf1 eunice xenix venix dos os2 gnu linux windows
$rm -f foo