diff options
author | Matthew Cline <zelgadis@sourceforge.net> | 2009-10-18 18:07:02 -0700 |
---|---|---|
committer | Matthew Cline <zelgadis@sourceforge.net> | 2009-10-18 18:07:02 -0700 |
commit | 5d359c101cd3b8e0d41fffdf670e02bd0d7c3c50 (patch) | |
tree | e166da9ebd9e7524c6bdc92e4c3be19ca0e72369 /crawl-ref/source | |
parent | fb90268fca99690e2de68d1e5a50e621a4af6240 (diff) | |
parent | 1ae2ee146885756849332709ec7eaf42bc0424cb (diff) | |
download | crawl-ref-5d359c101cd3b8e0d41fffdf670e02bd0d7c3c50.tar.gz crawl-ref-5d359c101cd3b8e0d41fffdf670e02bd0d7c3c50.zip |
Merge branch 'master' of ssh://zelgadis@crawl-ref.git.sourceforge.net/gitroot/crawl-ref/crawl-ref
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/makefile | 40 | ||||
-rwxr-xr-x | crawl-ref/source/util/gcc-opt.pl | 2 | ||||
-rwxr-xr-x | crawl-ref/source/util/gen_ver.pl | 33 |
3 files changed, 18 insertions, 57 deletions
diff --git a/crawl-ref/source/makefile b/crawl-ref/source/makefile index 9b84816d92..f7abc0498e 100644 --- a/crawl-ref/source/makefile +++ b/crawl-ref/source/makefile @@ -683,31 +683,21 @@ distclean: clean clean-contrib clean-rltiles # This information is included in crash reports, and is printed with # "crawl -version" -compile-flags: - @echo "// Automatically generated by makefile" > .compflag.h - @echo "#ifndef __included_crawl_compiler_flags_h" >> .compflag.h - @echo "#define __included_crawl_compiler_flags_h" >> .compflag.h - - @echo -n "#define CRAWL_CFLAGS \"" >> .compflag.h - @echo -n $(CFLAGS) | sed s/\"/\\\"/g >> .compflag.h - @echo "\"" >> .compflag.h - - @echo -n "#define CRAWL_CFLAGS_L \"" >> .compflag.h - @echo -n $(CFLAGS_L) | sed s/\"/\\\"/g >> .compflag.h - @echo "\"" >> .compflag.h - - @echo -n "#define CRAWL_LDFLAGS \"" >> .compflag.h - @echo -n $(LDFLAGS) | sed s/\"/\\\"/g >> .compflag.h - @echo "\"" >> .compflag.h - - @echo "#endif" >> .compflag.h - - @if [ "`diff -N -q .compflag.h compflag.h`" ]; then \ - echo Updating compflag.h; \ - mv .compflag.h compflag.h; \ - fi - -compflag.h: compile-flags +compflag.h: + $(QUIET_GEN) + @echo "// Automatically generated by makefile" > compflag.h + @echo "#ifndef __included_crawl_compiler_flags_h" >> compflag.h + @echo "#define __included_crawl_compiler_flags_h" >> compflag.h + @echo -n "#define CRAWL_CFLAGS \"" >> compflag.h + @echo -n $(CFLAGS) | sed s/\"/\\\"/g >> compflag.h + @echo "\"" >> compflag.h + @echo -n "#define CRAWL_CFLAGS_L \"" >> compflag.h + @echo -n $(CFLAGS_L) | sed s/\"/\\\"/g >> compflag.h + @echo "\"" >> compflag.h + @echo -n "#define CRAWL_LDFLAGS \"" >> compflag.h + @echo -n $(LDFLAGS) | sed s/\"/\\\"/g >> compflag.h + @echo "\"" >> compflag.h + @echo "#endif" >> compflag.h $(GAME): $(GAME_DEPENDS) compile-flags $(QUIET_LINK)$(CXX) $(LDFLAGS) $(EXTRA_OBJECTS) $(OBJECTS) -o $(GAME) $(LIB) diff --git a/crawl-ref/source/util/gcc-opt.pl b/crawl-ref/source/util/gcc-opt.pl index 5ed4e48f64..5981876984 100755 --- a/crawl-ref/source/util/gcc-opt.pl +++ b/crawl-ref/source/util/gcc-opt.pl @@ -28,7 +28,7 @@ my $arch = `uname -m`; # # Matches ix86, i386, i486, i586, i686 # -my $pattern = "i([x3-6])86"; +my $pattern = "i([x3-6])86|x86_64"; if ($arch =~ $pattern) { system("util/gcc-opt-x86.pl $gcc"); exit 0 diff --git a/crawl-ref/source/util/gen_ver.pl b/crawl-ref/source/util/gen_ver.pl index bccb73f5b2..27eb062617 100755 --- a/crawl-ref/source/util/gen_ver.pl +++ b/crawl-ref/source/util/gen_ver.pl @@ -114,12 +114,12 @@ chomp($OS); chomp($machine); chomp($processor); -unlink("$outfile.tmp"); +unlink("$outfile"); my $prefix = "CRAWL"; my $smprefix = "crawl"; -open OUT, ">", "$outfile.tmp" or die $!; +open OUT, ">", "$outfile" or die $!; print OUT <<__eof__; #ifndef __included_${smprefix}_build_number_h #define __included_${smprefix}_build_number_h @@ -144,32 +144,3 @@ print OUT <<__eof__; __eof__ close OUT or die $!; - -use Digest::MD5; - -my $ctx = Digest::MD5->new; - -my $md5old = ""; my $md5new = ""; - -if (-e $outfile) { - open OUT, "$outfile" or die $!; - $ctx->addfile(*OUT); - $md5old = $ctx->hexdigest; - close OUT -} - -open OUT, "$outfile.tmp" or die $!; -$ctx->addfile(*OUT); -$md5new = $ctx->hexdigest; -close OUT; - -use File::Copy; - -if ($md5old ne $md5new) { - if (-e $outfile) { - unlink($outfile) or die $!; - } - move "$outfile.tmp", $outfile or die $!; -} else { - unlink ("$outfile.tmp"); -} |