forked from git/git
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Fix the msvc-build scripts (specifically those creating VS projects) for g4w-sdk / g4w #256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
3f69953
perl/Makefile: treat a missing PM.stamp as if empty
b3a096e
.gitignore: improve MSVC ignore patterns
6eeb75b
.gitignore: ignore library directories created by MSVC VS2008 buildsy…
42c148a
(msvc-build) Vcproj.pm: remove duplicate GUID
aa42626
engine.pl: fix error message (lib->link)
5120f16
engine.pl: Properly accept quoted spaces in filenames
3bb25de
engine.pl: Fix i18n -o option in msvc buildsystem generator
e5401f4
engine.pl: name the msvc buildsystem's makedry error file
933d8c5
engine.pl: delete the captured stderr file if empty
dd21cb3
engine.pl: add debug line to capture the dry-run
68618e9
engine.pl: provide more debug print statements
b8a5f78
Vcproj.pm: list git.exe first to be startup project
47641d2
vcbuild/readme: Improve layout
3845b02
msvc-build: add complete Microsoft Visual C compilation script
63bf613
config.mak.uname: add MSVC No_SafeExeceptionHandler option
7c8955b
Vcproj.pm: provide more GUIDs
202357b
msvc.h: include sigset_t definition
ab77303
compat/win32.h: define variable at start of a block
b04e05e
compat/msvc.h: define O_ACCMODE for MSVC
614e4a5
_REPARSE_DATA_BUFFER: add MSCV definitions
e766ed3
regcomp.c & terminal.c: don't always need <stdint.h> or <inttypes.h>
e2fcf0a
fixup! _REPARSE_DATA_BUFFER:
f3de733
remote.c: correct __attribute__ spelling
86c3672
contrib/buildsystems/engine.pl: detect the curl library option
d8a01e0
compat/msvc.h: add pragmas for common warnings
5c9518c
config.mak.uname: quick fix NO_EXPAT, NO_CURL ?
63ebfb8
compat/msvc.h: add more pregmas
4a7c8a6
exec_cmd.c, sideband.c, Makefile: avoid multiple PREFIX definitions
88bee55
Initialise variables: get past a compiler workaround
20d2f5f
fixup! exec_cmd.c
b75e351
fast-import.c: remove old compiler workaround
91ef678
msvc.h, mingw.h: continue to clear errors: ftello and curl
71915be
git-compat-util.h: add SUPPRESS_UNINITIALIZD_WARNINGS value definition
42041f7
wip debug: capture the dry run as a text file
cc1b013
msvc-build: beginnings of Post Build step
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
#!/bin/sh | ||
|
||
# This msvc-build command should be executed from the msysgit directory level | ||
# This is so that the 'cd/git' step works and the subequent operations have the right msysgit super directory. | ||
set -e # Exit immediately if a command exits with a nonzero exit status. | ||
|
||
gui= | ||
clean= | ||
while test $# -gt 0 | ||
do | ||
case "$1" in | ||
--gui|--dev|--devenv|--vs|--visual-studio) | ||
gui=t | ||
;; | ||
clean) | ||
clean=t | ||
;; | ||
*) | ||
echo "Usage: $0 [--vs] [clean]" >&2 | ||
exit 1 | ||
;; | ||
esac | ||
shift | ||
done | ||
|
||
cd $(git rev-parse --show-toplevel) | ||
|
||
case "$clean" in | ||
t) | ||
case "$gui" in | ||
t) | ||
rm -rf git.sln git.sdf libgit vcs-svn_lib xdiff_lib | ||
# remove any other new VS2010... stuff as well: rm -rf ? | ||
;; | ||
'') | ||
make clean | ||
;; | ||
esac | ||
exit | ||
;; | ||
esac | ||
|
||
to_ignore="$(git ls-files --other --exclude-standard msvcgit msvc-build.cmd)" | ||
test -z "$to_ignore" || { | ||
mkdir -p .git/info && | ||
echo "$to_ignore" | | ||
sed 's/^/\//' >> .git/info/exclude | ||
} || exit | ||
|
||
test -d msvcgit || git clone git://repo.or.cz/msvcgit.git | ||
|
||
vsvars= | ||
# assume cl.exe will populate its relevant environment variables | ||
# if cl.exe does not exist, populate vsvars with the most recent Visual Studio path | ||
type cl.exe 2> /dev/null || | ||
vsvars="$(ls -t \ | ||
"$PROGRAMFILES/Microsoft Visual Studio"*/Common7/Tools/vsvars32.bat | | ||
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
Sorry, something went wrong. |
||
head -n 1)" | ||
|
||
|
||
config_mak= | ||
# if a config.mak file (dot, not underscore) exists, back it up, | ||
# remember the backup file name in config_mak. | ||
test -f config.mak && | ||
config_mak=config.mak.bup.$$ && | ||
mv config.mak $config_mak | ||
|
||
cat > config.mak << EOF | ||
CFLAGS += -Imsvcgit/32bits/include | ||
LDFLAGS += -Lmsvcgit/32bits/lib | ||
EOF | ||
|
||
echo "call \"$vsvars\"" > msvc-build.cmd | ||
if test -z "$gui" | ||
then | ||
echo 'make MSVC=1' >> msvc-build.cmd | ||
else | ||
echo 'perl contrib/buildsystems/generate -g Vcproj' >> msvc-build.cmd | ||
echo 'start git.sln' >> msvc-build.cmd | ||
fi | ||
|
||
cmd /c msvc-build.cmd | ||
|
||
# if we made a backup file (name in config_mak), then restore it. | ||
test -z "$config_mak" || | ||
mv $config_mak config.mak |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This comment was marked as off-topic.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as off-topic.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.