]> granicus.if.org Git - jq/commitdiff
Give Windows builds a proper .exe suffix.
authorStephen Dolan <mu@netsoc.tcd.ie>
Thu, 20 Dec 2012 15:12:14 +0000 (15:12 +0000)
committerStephen Dolan <mu@netsoc.tcd.ie>
Thu, 20 Dec 2012 15:12:14 +0000 (15:12 +0000)
Makefile
docs/content/2.download/default.yml

index 30e6d42dfda0a894fd4a47e16e4538e377224819..69e97c7128b90d7d78b9aa528bfe07b37d65312a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -53,12 +53,19 @@ build/osx64%:   CC='i686-apple-darwin10-gcc -m64'
 build/win32%:   CC='i686-w64-mingw32-gcc -m32'   EXTRA_CFLAGS=-DJQ_DEFAULT_ENABLE_COLOR=0
 build/win64%:   CC='x86_64-w64-mingw32-gcc -m64' EXTRA_CFLAGS=-DJQ_DEFAULT_ENABLE_COLOR=0
 
-ALL_BINARIES=$(foreach platform, $(PLATFORMS), $(foreach binary, $(BINARIES), build/$(platform)/$(binary)))
+BIN_SUFFIX_win32 = .exe
+BIN_SUFFIX_win64 = .exe
+
+ALL_BINARIES=\
+  $(foreach platform, $(PLATFORMS), \
+    $(foreach binary, $(BINARIES), \
+      build/$(platform)/$(binary)$(BIN_SUFFIX_$(platform))))
 
 $(ALL_BINARIES): build/%:
        mkdir -p $(@D)
+       echo $(dir $*)
        make -B $(BINARIES) CC=$(CC)
-       cp $(BINARIES) $(@D)
+       $(foreach binary, $(BINARIES), cp $(binary) $(@D)/$(binary)$(suffix $*);)
 
 binaries: $(ALL_BINARIES)
 
@@ -97,6 +104,6 @@ docs/output:
        cd docs; rake build
 
 www_binaries: docs/output binaries
-       $(foreach platform, $(PLATFORMS), $(foreach binary, $(BINARIES), \
+       $(foreach platform, $(PLATFORMS), \
          mkdir -p docs/output/download/$(platform); \
-         cp build/$(platform)/$(binary) docs/output/download/$(platform)/$(binary); ))
+         cp build/$(platform)/* docs/output/download/$(platform)/; )
index f364277b0b6130fbd7ffc3b13b243d6159ac45db..502ef0b41e68d8831ee20a8d03fe20d385275ef7 100644 (file)
@@ -38,7 +38,7 @@ body:
 
       ### Windows
 
-       * Executables for [64-bit](win64/jq) or [32-bit](win32/jq)
+       * Executables for [64-bit](win64/jq.exe) or [32-bit](win32/jq.exe)
 
       ### From source on Linux or OS X