mirror of
https://github.com/xroche/httrack.git
synced 2026-05-17 08:26:14 +03:00
http://proliant/svn/httrack/trunk
........
r1020 | roche | 2014-05-13 22:08:53 +0200 (mar., 13 mai 2014) | 3 lines
#include <stdarg.h>
........
r1021 | roche | 2014-05-13 22:11:02 +0200 (mar., 13 mai 2014) | 3 lines
#include <stdarg.h>
........
r1022 | roche | 2014-05-13 22:11:41 +0200 (mar., 13 mai 2014) | 3 lines
#include <stdarg.h>
........
r1023 | roche | 2014-05-13 22:12:10 +0200 (mar., 13 mai 2014) | 3 lines
Better stdarg.h
........
r1027 | roche | 2014-05-14 19:45:51 +0200 (mer., 14 mai 2014) | 1 line
Added debug logging facility.
........
r1028 | roche | 2014-05-14 19:48:04 +0200 (mer., 14 mai 2014) | 3 lines
Fixed hashtable corruption because of dirty code directly modifying the host address in memory, leading to have hashtable positions not anymore valid.
This issue was especially triggered when a redirect was processed ("Warning moved treated for .." messages)
* closes: #43
........
r1029 | roche | 2014-05-14 19:51:09 +0200 (mer., 14 mai 2014) | 1 line
3.48.7
........
r1031 | roche | 2014-05-14 19:57:18 +0200 (mer., 14 mai 2014) | 3 lines
3.48.7
........
r1033 | roche | 2014-05-14 21:51:33 +0200 (mer., 14 mai 2014) | 1 line
Missing htsCallbackErr definition
........
r1034 | roche | 2014-05-14 22:12:42 +0200 (mer., 14 mai 2014) | 1 line
Clean hts_set_error_callback() and hts_get_error_callback()
........
r1035 | roche | 2014-05-14 22:20:01 +0200 (mer., 14 mai 2014) | 1 line
Fixed macro.
........
r1036 | roche | 2014-05-14 22:27:55 +0200 (mer., 14 mai 2014) | 1 line
Cosmetic
........
r1038 | roche | 2014-05-15 19:06:59 +0200 (jeu., 15 mai 2014) | 1 line
WIN32: zlib 1.2.8
........
r1040 | roche | 2014-05-15 19:08:29 +0200 (jeu., 15 mai 2014) | 1 line
3.48.8
........
r1042 | roche | 2014-05-15 19:22:16 +0200 (jeu., 15 mai 2014) | 3 lines
3.48.8-1
........
r1044 | roche | 2014-05-15 19:26:46 +0200 (jeu., 15 mai 2014) | 3 lines
Removed unused variable.
........
r1045 | roche | 2014-05-15 21:24:56 +0200 (jeu., 15 mai 2014) | 1 line
Fixed uint64_t vs. long long int
........
r1046 | roche | 2014-05-15 21:25:27 +0200 (jeu., 15 mai 2014) | 1 line
Compile-time checks.
........
r1047 | roche | 2014-05-15 21:27:29 +0200 (jeu., 15 mai 2014) | 1 line
Cosmetic.
........
r1048 | roche | 2014-05-15 21:33:38 +0200 (jeu., 15 mai 2014) | 3 lines
Added some asserts for Android.
........
r1049 | roche | 2014-05-15 21:44:28 +0200 (jeu., 15 mai 2014) | 3 lines
tr -d '\r'
........
r1050 | roche | 2014-05-17 14:31:37 +0200 (sam., 17 mai 2014) | 3 lines
Fixed potentiel overrun if the user injects a buggy user-defined structure with a non-terminated %[]
........
r1051 | roche | 2014-05-17 15:20:42 +0200 (sam., 17 mai 2014) | 1 line
Added hts_set_log_vprint_callback()
........
r1052 | roche | 2014-05-17 15:21:03 +0200 (sam., 17 mai 2014) | 1 line
Added hts_set_log_vprint_callback() definition
........
r1053 | roche | 2014-05-17 15:29:45 +0200 (sam., 17 mai 2014) | 1 line
Anonymous logging.
........
r1054 | roche | 2014-05-17 15:55:17 +0200 (sam., 17 mai 2014) | 1 line
Illegal use of strnlen(..., (size_t) -1)
........
r1058 | roche | 2014-05-18 11:49:24 +0200 (dim., 18 mai 2014) | 1 line
Cleanup in socket handling (less ugly casts!)
........
r1059 | roche | 2014-05-18 12:53:29 +0200 (dim., 18 mai 2014) | 1 line
Removed size member from SOCaddr
........
r1060 | roche | 2014-05-18 12:59:07 +0200 (dim., 18 mai 2014) | 3 lines
libtool: in_port_t and sa_family_t
........
r1061 | roche | 2014-05-18 15:11:40 +0200 (dim., 18 mai 2014) | 5 lines
Big cleanup in network address and dns functions:
* removed t_fullhostent insanity
* removed (struct sockaddr*) casts
* use SOCaddr everywhere rather than raw struct hostent*
........
r1062 | roche | 2014-05-18 15:43:09 +0200 (dim., 18 mai 2014) | 1 line
Cleanup in callbacks.
........
r1063 | roche | 2014-05-18 15:55:47 +0200 (dim., 18 mai 2014) | 3 lines
Backlog for web server to 10.
........
r1064 | roche | 2014-05-18 15:55:54 +0200 (dim., 18 mai 2014) | 3 lines
tr -d '\r'
........
r1065 | roche | 2014-05-18 16:02:06 +0200 (dim., 18 mai 2014) | 3 lines
Removed unused variable.
........
r1066 | roche | 2014-05-18 16:05:08 +0200 (dim., 18 mai 2014) | 1 line
Fixed __builtin___strncat_chk warning
........
r1067 | roche | 2014-05-19 21:12:27 +0200 (lun., 19 mai 2014) | 2 lines
Fixed segOutputSize < segSize assertion fails at htscharset.c:993
* closes:#44
........
r1068 | roche | 2014-05-19 21:15:16 +0200 (lun., 19 mai 2014) | 1 line
Added strlcpybuff() macro.
........
r1069 | roche | 2014-05-19 21:17:50 +0200 (lun., 19 mai 2014) | 1 line
char* => const char*
........
r1070 | roche | 2014-05-19 21:24:06 +0200 (lun., 19 mai 2014) | 3 lines
Added unit test for issue #44
........
r1071 | roche | 2014-05-19 21:37:40 +0200 (lun., 19 mai 2014) | 3 lines
tr -d '\r'
........
r1072 | roche | 2014-05-21 19:01:30 +0200 (mer., 21 mai 2014) | 1 line
Cleaner dup
........
r1074 | roche | 2014-05-21 19:21:29 +0200 (mer., 21 mai 2014) | 1 line
3.48.9
........
r1075 | roche | 2014-05-23 17:23:17 +0200 (ven., 23 mai 2014) | 3 lines
3.48.9-1 changelog
........
r1076 | roche | 2014-05-23 17:24:50 +0200 (ven., 23 mai 2014) | 3 lines
3.48.9 (autoconf)
........
r1077 | roche | 2014-05-23 17:28:55 +0200 (ven., 23 mai 2014) | 3 lines
Added symbol visibility features to the build to hide internal symbols (GCC)
........
r1078 | roche | 2014-05-23 23:33:43 +0200 (ven., 23 mai 2014) | 9 lines
"const correctness" cleanup
added the following default flags:
-Wformat
-Wformat-security
-Wmultichar
-Wwrite-strings
fixed several other warnings
........
r1079 | roche | 2014-05-24 09:45:12 +0200 (sam., 24 mai 2014) | 3 lines
Diff are better.
........
r1080 | roche | 2014-05-24 09:50:51 +0200 (sam., 24 mai 2014) | 3 lines
No diff.
........
r1081 | roche | 2014-05-24 09:56:11 +0200 (sam., 24 mai 2014) | 3 lines
Upgraded to minizip 1.1 from zlib 1.2.8
........
r1082 | roche | 2014-05-24 10:17:08 +0200 (sam., 24 mai 2014) | 3 lines
Missing zflush_file member.
........
r1083 | roche | 2014-05-24 10:37:21 +0200 (sam., 24 mai 2014) | 3 lines
Fixed minizip.
........
r1084 | roche | 2014-05-24 13:31:17 +0200 (sam., 24 mai 2014) | 3 lines
Removed ChangeLogUnzip
........
r1085 | roche | 2014-05-24 13:38:11 +0200 (sam., 24 mai 2014) | 3 lines
Fixed EXTRA_DIST
........
r1086 | roche | 2014-05-24 13:57:25 +0200 (sam., 24 mai 2014) | 3 lines
Minizip warning fixes.
........
r1087 | roche | 2014-05-26 21:27:46 +0200 (lun., 26 mai 2014) | 1 line
Big links heap handling cleanup, and removed very old and legacy macros
........
r1089 | roche | 2014-05-26 21:32:34 +0200 (lun., 26 mai 2014) | 3 lines
tr -d '\r'
........
r1090 | roche | 2014-05-27 18:05:09 +0200 (mar., 27 mai 2014) | 3 lines
Fixed symbol import.
........
r1091 | roche | 2014-05-27 18:05:28 +0200 (mar., 27 mai 2014) | 3 lines
tr -d '\r'
........
r1092 | roche | 2014-05-27 18:05:54 +0200 (mar., 27 mai 2014) | 3 lines
Export may_unknown and guess_httptype
........
r1093 | roche | 2014-05-27 18:35:57 +0200 (mar., 27 mai 2014) | 3 lines
Rewritten UTF8 writer to avoir spurious GCC 4.8.3 warnings.
........
r1094 | roche | 2014-05-27 19:45:18 +0200 (mar., 27 mai 2014) | 3 lines
Fixed help option, and too long help line (man: "cannot adjust line")
........
r1095 | roche | 2014-05-27 20:55:13 +0200 (mar., 27 mai 2014) | 1 line
Cleanup, const correctness
........
r1096 | roche | 2014-05-28 18:34:06 +0200 (mer., 28 mai 2014) | 3 lines
Added Vcs-Browser and Vcs-Svn fields to debian/control
........
r1097 | roche | 2014-05-28 18:36:24 +0200 (mer., 28 mai 2014) | 3 lines
Fixed dirty uint32_t cast leading to aliasing issues.
........
r1098 | roche | 2014-05-28 18:50:47 +0200 (mer., 28 mai 2014) | 3 lines
Added MD5 self-test
........
r1099 | roche | 2014-05-28 18:51:56 +0200 (mer., 28 mai 2014) | 3 lines
Fixed const T ** not being castable to const T **
........
r1100 | roche | 2014-05-28 18:58:37 +0200 (mer., 28 mai 2014) | 3 lines
Fixed build.
........
r1101 | roche | 2014-05-28 19:06:47 +0200 (mer., 28 mai 2014) | 3 lines
Really fixed.
........
r1102 | roche | 2014-05-28 19:41:42 +0200 (mer., 28 mai 2014) | 3 lines
Bad md5.
........
r1103 | roche | 2014-05-28 19:55:49 +0200 (mer., 28 mai 2014) | 19 lines
Added AM_PROG_CC_C_O and AM_PROG_LIBTOOL
Removed unused CXX
added the following default compiler flags:
-Wdeclaration-after-statement
-Wsequence-point
-Wparentheses
-Winit-self
-Wuninitialized
-Wformat
-fstrict-aliasing -Wstrict-aliasing=2
added the following default linker flags:
-Wl,--discard-all
-Wl,--no-undefined
Depending on autoconf-archive because using AX_CHECK_COMPILE_FLAG and AX_CHECK_LINK_FLAG
........
r1104 | roche | 2014-05-28 20:27:45 +0200 (mer., 28 mai 2014) | 3 lines
Fixed %%%
........
r1105 | roche | 2014-05-28 20:31:40 +0200 (mer., 28 mai 2014) | 1 line
Rewrite template formatting to be format-injection proof.
........
r1106 | roche | 2014-05-28 20:41:59 +0200 (mer., 28 mai 2014) | 1 line
Fixed heap crawl overflow
........
r1107 | roche | 2014-05-28 20:58:59 +0200 (mer., 28 mai 2014) | 1 line
Rewrite string template formatting to be format-injection proof.
........
r1108 | roche | 2014-05-28 21:03:07 +0200 (mer., 28 mai 2014) | 1 line
Fixed NULL terminated string.
........
r1109 | roche | 2014-05-28 21:03:26 +0200 (mer., 28 mai 2014) | 1 line
Replaced sprintf() by hts_template_format_str()
........
r1110 | roche | 2014-05-28 21:05:31 +0200 (mer., 28 mai 2014) | 1 line
Added assert
........
r1111 | roche | 2014-05-28 21:11:04 +0200 (mer., 28 mai 2014) | 3 lines
Added -Wformat-nonliteral flag.
........
r1112 | roche | 2014-05-29 10:20:07 +0200 (jeu., 29 mai 2014) | 1 line
Allocation cleanup (why "+2", why ?)
........
r1114 | roche | 2014-05-29 10:30:43 +0200 (jeu., 29 mai 2014) | 1 line
Added off_t_to_size_t()
........
r1115 | roche | 2014-05-29 11:34:37 +0200 (jeu., 29 mai 2014) | 3 lines
Fixes.
........
r1116 | roche | 2014-05-29 11:41:59 +0200 (jeu., 29 mai 2014) | 1 line
Removed duplicate opt->lien_tot and opt->liens members in some functions.
........
r1117 | roche | 2014-05-29 17:42:53 +0200 (jeu., 29 mai 2014) | 1 line
Big cleanup: introducing cleaner lien_adrfilsave and lien_adrfil structures holding address/uri or address/uri/filename rather than passing opaque char* of unknown size.
........
r1118 | roche | 2014-05-29 17:53:30 +0200 (jeu., 29 mai 2014) | 1 line
Unused function.
........
r1119 | roche | 2014-05-29 17:57:57 +0200 (jeu., 29 mai 2014) | 1 line
Fixed API change.
........
r1120 | roche | 2014-05-29 18:03:04 +0200 (jeu., 29 mai 2014) | 3 lines
tr -d '\r'
........
r1121 | roche | 2014-05-29 18:14:57 +0200 (jeu., 29 mai 2014) | 1 line
Fixed regression over ./
........
r1122 | roche | 2014-05-29 19:29:02 +0200 (jeu., 29 mai 2014) | 1 line
Take in account opt->maxlink is non-zero
........
r1123 | roche | 2014-05-29 19:58:05 +0200 (jeu., 29 mai 2014) | 1 line
Allocation failure handling.
........
r1124 | roche | 2014-05-29 20:10:14 +0200 (jeu., 29 mai 2014) | 1 line
Better "too many links" reporting.
........
r1126 | roche | 2014-05-30 18:09:02 +0200 (ven., 30 mai 2014) | 3 lines
Missing string.h (moe)
........
r1127 | roche | 2014-06-03 18:26:25 +0200 (mar., 03 juin 2014) | 1 line
Potential fix for htshash.c:330 assertion failure: "error invalidating hash entry"
........
r1128 | roche | 2014-06-04 18:10:38 +0200 (mer., 04 juin 2014) | 3 lines
Do not depend on SetDllDirectory (Windows 2003) as it breaks Windows 2000
* closes: #45
........
r1130 | roche | 2014-06-04 19:02:44 +0200 (mer., 04 juin 2014) | 3 lines
3.48-10
........
r1131 | roche | 2014-06-04 19:06:43 +0200 (mer., 04 juin 2014) | 1 line
3.48.10
........
r1132 | roche | 2014-06-04 19:10:40 +0200 (mer., 04 juin 2014) | 3 lines
Updated configure
........
r1133 | roche | 2014-06-04 19:41:42 +0200 (mer., 04 juin 2014) | 3 lines
Updated man
........
r1137 | roche | 2014-06-04 21:53:07 +0200 (mer., 04 juin 2014) | 3 lines
Fixed "this decimal constant is unsigned only in ISO C90"
........
r1139 | roche | 2014-06-05 17:59:49 +0200 (jeu., 05 juin 2014) | 1 line
changelog
........
r1140 | roche | 2014-06-05 18:00:05 +0200 (jeu., 05 juin 2014) | 3 lines
Added missing .h to -dev
........
r1141 | roche | 2014-06-06 17:47:38 +0200 (ven., 06 juin 2014) | 7 lines
Fixed assertion failure at htscore.c:244 (len + liensbuf->string_buffer_size < liensbuf->string_buffer_capa)
* closes:46
-Cette ligne, et les suivantes ci-dessous, seront ignorées--
M trunk/src/htscore.c
........
r1142 | roche | 2014-06-06 17:48:05 +0200 (ven., 06 juin 2014) | 3 lines
Additional check.
........
r1143 | roche | 2014-06-06 17:57:02 +0200 (ven., 06 juin 2014) | 1 line
3.48.11
........
r1145 | roche | 2014-06-06 18:02:35 +0200 (ven., 06 juin 2014) | 3 lines
3.48.11
........
r1147 | roche | 2014-06-06 20:43:50 +0200 (ven., 06 juin 2014) | 3 lines
Splitted typed arrays in htsarrays.h
Cleaned-up page generation
........
r1148 | roche | 2014-06-06 20:47:24 +0200 (ven., 06 juin 2014) | 3 lines
Updated man
........
r1149 | roche | 2014-06-06 20:47:39 +0200 (ven., 06 juin 2014) | 3 lines
tr -d '\r'
........
r1150 | roche | 2014-06-06 20:47:53 +0200 (ven., 06 juin 2014) | 3 lines
Added htsarrays.h to Makefile and devel libs
........
r1151 | roche | 2014-06-06 21:03:41 +0200 (ven., 06 juin 2014) | 1 line
Progressive power-of-two allocator for linked blocks.
........
r1152 | roche | 2014-06-06 21:08:47 +0200 (ven., 06 juin 2014) | 1 line
Cleanup.
........
r1153 | roche | 2014-06-06 22:58:35 +0200 (ven., 06 juin 2014) | 3 lines
Fixed initializer.
........
r1154 | roche | 2014-06-07 09:03:08 +0200 (sam., 07 juin 2014) | 3 lines
Fixed --advanced-maxlinks broken (Localhost)
........
r1155 | roche | 2014-06-07 09:03:13 +0200 (sam., 07 juin 2014) | 3 lines
Better.
........
r1156 | roche | 2014-06-08 11:26:46 +0200 (dim., 08 juin 2014) | 1 line
Typos
........
r1157 | roche | 2014-06-08 11:35:34 +0200 (dim., 08 juin 2014) | 3 lines
Fixed __cplusplus issues
........
r1158 | roche | 2014-06-08 13:12:21 +0200 (dim., 08 juin 2014) | 4 lines
Using subdir-objects for automake
Replaced legacy INCLUDES by AM_CPPFLAGS
........
r1159 | roche | 2014-06-08 13:22:41 +0200 (dim., 08 juin 2014) | 3 lines
3.48.12
........
r1161 | roche | 2014-06-08 15:02:43 +0200 (dim., 08 juin 2014) | 9 lines
Public definitions cleanup (especially for httraqt)
htsopt.h now has the following definitions:
* struct htsrequest_proxy
* struct htsrequest
* struct htsblk
* struct lien_url
* struct lien_back
........
r1163 | roche | 2014-06-08 15:58:57 +0200 (dim., 08 juin 2014) | 1 line
__cplusplus
........
r1164 | roche | 2014-06-08 17:43:28 +0200 (dim., 08 juin 2014) | 3 lines
3.48.13
........
344 lines
7.1 KiB
Bash
Executable File
344 lines
7.1 KiB
Bash
Executable File
#! /bin/sh
|
|
# Wrapper for compilers which do not understand '-c -o'.
|
|
|
|
scriptversion=2012-03-05.13; # UTC
|
|
|
|
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010, 2012 Free
|
|
# Software Foundation, Inc.
|
|
# Written by Tom Tromey <tromey@cygnus.com>.
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 2, or (at your option)
|
|
# any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
# As a special exception to the GNU General Public License, if you
|
|
# distribute this file as part of a program that contains a
|
|
# configuration script generated by Autoconf, you may include it under
|
|
# the same distribution terms that you use for the rest of that program.
|
|
|
|
# This file is maintained in Automake, please report
|
|
# bugs to <bug-automake@gnu.org> or send patches to
|
|
# <automake-patches@gnu.org>.
|
|
|
|
nl='
|
|
'
|
|
|
|
# We need space, tab and new line, in precisely that order. Quoting is
|
|
# there to prevent tools from complaining about whitespace usage.
|
|
IFS=" "" $nl"
|
|
|
|
file_conv=
|
|
|
|
# func_file_conv build_file lazy
|
|
# Convert a $build file to $host form and store it in $file
|
|
# Currently only supports Windows hosts. If the determined conversion
|
|
# type is listed in (the comma separated) LAZY, no conversion will
|
|
# take place.
|
|
func_file_conv ()
|
|
{
|
|
file=$1
|
|
case $file in
|
|
/ | /[!/]*) # absolute file, and not a UNC file
|
|
if test -z "$file_conv"; then
|
|
# lazily determine how to convert abs files
|
|
case `uname -s` in
|
|
MINGW*)
|
|
file_conv=mingw
|
|
;;
|
|
CYGWIN*)
|
|
file_conv=cygwin
|
|
;;
|
|
*)
|
|
file_conv=wine
|
|
;;
|
|
esac
|
|
fi
|
|
case $file_conv/,$2, in
|
|
*,$file_conv,*)
|
|
;;
|
|
mingw/*)
|
|
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
|
;;
|
|
cygwin/*)
|
|
file=`cygpath -m "$file" || echo "$file"`
|
|
;;
|
|
wine/*)
|
|
file=`winepath -w "$file" || echo "$file"`
|
|
;;
|
|
esac
|
|
;;
|
|
esac
|
|
}
|
|
|
|
# func_cl_dashL linkdir
|
|
# Make cl look for libraries in LINKDIR
|
|
func_cl_dashL ()
|
|
{
|
|
func_file_conv "$1"
|
|
if test -z "$lib_path"; then
|
|
lib_path=$file
|
|
else
|
|
lib_path="$lib_path;$file"
|
|
fi
|
|
linker_opts="$linker_opts -LIBPATH:$file"
|
|
}
|
|
|
|
# func_cl_dashl library
|
|
# Do a library search-path lookup for cl
|
|
func_cl_dashl ()
|
|
{
|
|
lib=$1
|
|
found=no
|
|
save_IFS=$IFS
|
|
IFS=';'
|
|
for dir in $lib_path $LIB
|
|
do
|
|
IFS=$save_IFS
|
|
if $shared && test -f "$dir/$lib.dll.lib"; then
|
|
found=yes
|
|
lib=$dir/$lib.dll.lib
|
|
break
|
|
fi
|
|
if test -f "$dir/$lib.lib"; then
|
|
found=yes
|
|
lib=$dir/$lib.lib
|
|
break
|
|
fi
|
|
done
|
|
IFS=$save_IFS
|
|
|
|
if test "$found" != yes; then
|
|
lib=$lib.lib
|
|
fi
|
|
}
|
|
|
|
# func_cl_wrapper cl arg...
|
|
# Adjust compile command to suit cl
|
|
func_cl_wrapper ()
|
|
{
|
|
# Assume a capable shell
|
|
lib_path=
|
|
shared=:
|
|
linker_opts=
|
|
for arg
|
|
do
|
|
if test -n "$eat"; then
|
|
eat=
|
|
else
|
|
case $1 in
|
|
-o)
|
|
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
|
eat=1
|
|
case $2 in
|
|
*.o | *.[oO][bB][jJ])
|
|
func_file_conv "$2"
|
|
set x "$@" -Fo"$file"
|
|
shift
|
|
;;
|
|
*)
|
|
func_file_conv "$2"
|
|
set x "$@" -Fe"$file"
|
|
shift
|
|
;;
|
|
esac
|
|
;;
|
|
-I)
|
|
eat=1
|
|
func_file_conv "$2" mingw
|
|
set x "$@" -I"$file"
|
|
shift
|
|
;;
|
|
-I*)
|
|
func_file_conv "${1#-I}" mingw
|
|
set x "$@" -I"$file"
|
|
shift
|
|
;;
|
|
-l)
|
|
eat=1
|
|
func_cl_dashl "$2"
|
|
set x "$@" "$lib"
|
|
shift
|
|
;;
|
|
-l*)
|
|
func_cl_dashl "${1#-l}"
|
|
set x "$@" "$lib"
|
|
shift
|
|
;;
|
|
-L)
|
|
eat=1
|
|
func_cl_dashL "$2"
|
|
;;
|
|
-L*)
|
|
func_cl_dashL "${1#-L}"
|
|
;;
|
|
-static)
|
|
shared=false
|
|
;;
|
|
-Wl,*)
|
|
arg=${1#-Wl,}
|
|
save_ifs="$IFS"; IFS=','
|
|
for flag in $arg; do
|
|
IFS="$save_ifs"
|
|
linker_opts="$linker_opts $flag"
|
|
done
|
|
IFS="$save_ifs"
|
|
;;
|
|
-Xlinker)
|
|
eat=1
|
|
linker_opts="$linker_opts $2"
|
|
;;
|
|
-*)
|
|
set x "$@" "$1"
|
|
shift
|
|
;;
|
|
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
|
func_file_conv "$1"
|
|
set x "$@" -Tp"$file"
|
|
shift
|
|
;;
|
|
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
|
func_file_conv "$1" mingw
|
|
set x "$@" "$file"
|
|
shift
|
|
;;
|
|
*)
|
|
set x "$@" "$1"
|
|
shift
|
|
;;
|
|
esac
|
|
fi
|
|
shift
|
|
done
|
|
if test -n "$linker_opts"; then
|
|
linker_opts="-link$linker_opts"
|
|
fi
|
|
exec "$@" $linker_opts
|
|
exit 1
|
|
}
|
|
|
|
eat=
|
|
|
|
case $1 in
|
|
'')
|
|
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
|
exit 1;
|
|
;;
|
|
-h | --h*)
|
|
cat <<\EOF
|
|
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
|
|
|
Wrapper for compilers which do not understand '-c -o'.
|
|
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
|
arguments, and rename the output as expected.
|
|
|
|
If you are trying to build a whole package this is not the
|
|
right script to run: please start by reading the file 'INSTALL'.
|
|
|
|
Report bugs to <bug-automake@gnu.org>.
|
|
EOF
|
|
exit $?
|
|
;;
|
|
-v | --v*)
|
|
echo "compile $scriptversion"
|
|
exit $?
|
|
;;
|
|
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
|
func_cl_wrapper "$@" # Doesn't return...
|
|
;;
|
|
esac
|
|
|
|
ofile=
|
|
cfile=
|
|
|
|
for arg
|
|
do
|
|
if test -n "$eat"; then
|
|
eat=
|
|
else
|
|
case $1 in
|
|
-o)
|
|
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
|
# So we strip '-o arg' only if arg is an object.
|
|
eat=1
|
|
case $2 in
|
|
*.o | *.obj)
|
|
ofile=$2
|
|
;;
|
|
*)
|
|
set x "$@" -o "$2"
|
|
shift
|
|
;;
|
|
esac
|
|
;;
|
|
*.c)
|
|
cfile=$1
|
|
set x "$@" "$1"
|
|
shift
|
|
;;
|
|
*)
|
|
set x "$@" "$1"
|
|
shift
|
|
;;
|
|
esac
|
|
fi
|
|
shift
|
|
done
|
|
|
|
if test -z "$ofile" || test -z "$cfile"; then
|
|
# If no '-o' option was seen then we might have been invoked from a
|
|
# pattern rule where we don't need one. That is ok -- this is a
|
|
# normal compilation that the losing compiler can handle. If no
|
|
# '.c' file was seen then we are probably linking. That is also
|
|
# ok.
|
|
exec "$@"
|
|
fi
|
|
|
|
# Name of file we expect compiler to create.
|
|
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
|
|
|
# Create the lock directory.
|
|
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
|
# that we are using for the .o file. Also, base the name on the expected
|
|
# object file name, since that is what matters with a parallel build.
|
|
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
|
while true; do
|
|
if mkdir "$lockdir" >/dev/null 2>&1; then
|
|
break
|
|
fi
|
|
sleep 1
|
|
done
|
|
# FIXME: race condition here if user kills between mkdir and trap.
|
|
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
|
|
|
# Run the compile.
|
|
"$@"
|
|
ret=$?
|
|
|
|
if test -f "$cofile"; then
|
|
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
|
elif test -f "${cofile}bj"; then
|
|
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
|
fi
|
|
|
|
rmdir "$lockdir"
|
|
exit $ret
|
|
|
|
# Local Variables:
|
|
# mode: shell-script
|
|
# sh-indentation: 2
|
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
|
# time-stamp-start: "scriptversion="
|
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
|
# time-stamp-time-zone: "UTC"
|
|
# time-stamp-end: "; # UTC"
|
|
# End:
|