Fix build files
diff --git a/.gitattributes b/.gitattributes
index 9a841cd..c0ca54b 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -24,8 +24,19 @@
 # Add sources
 c !export-ignore
 c/** !export-ignore
-c/common/dictionary.bin*  export-ignore
+c/common/dictionary.bin* export-ignore
 c/fuzz export-ignore
+scripts !export-ignore
+scripts/sources.lst !export-ignore
+scripts/libbrotli*.pc.in !export-ignore
+tests !export-ignore
+tests/*.sh !export-ignore
+tests/*.cmake !export-ignore
+tests/testdata !export-ignore
+tests/testdata/empty !export-ignore
+tests/testdata/empty.compressed !export-ignore
+tests/testdata/ukkonooa !export-ignore
+tests/testdata/ukkonooa.compressed !export-ignore
 
 # Add man pages
 docs !export-ignore
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9956a35..4ff3401 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -303,17 +303,21 @@
     set(OUTPUT_FILE "${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_NAME}")
     set(INPUT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${INPUT}")
 
-    foreach(quality 1 6 9 11)
-      add_test(NAME "${BROTLI_TEST_PREFIX}roundtrip/${INPUT}/${quality}"
-        COMMAND "${CMAKE_COMMAND}"
-          -DBROTLI_WRAPPER=${BROTLI_WRAPPER}
-          -DBROTLI_WRAPPER_LD_PREFIX=${BROTLI_WRAPPER_LD_PREFIX}
-          -DBROTLI_CLI=$<TARGET_FILE:brotli>
-          -DQUALITY=${quality}
-          -DINPUT=${INPUT_FILE}
-          -DOUTPUT=${OUTPUT_FILE}.${quality}
-          -P ${CMAKE_CURRENT_SOURCE_DIR}/tests/run-roundtrip-test.cmake)
-    endforeach()
+    if (EXISTS "${INPUT_FILE}")
+      foreach(quality 1 6 9 11)
+        add_test(NAME "${BROTLI_TEST_PREFIX}roundtrip/${INPUT}/${quality}"
+          COMMAND "${CMAKE_COMMAND}"
+            -DBROTLI_WRAPPER=${BROTLI_WRAPPER}
+            -DBROTLI_WRAPPER_LD_PREFIX=${BROTLI_WRAPPER_LD_PREFIX}
+            -DBROTLI_CLI=$<TARGET_FILE:brotli>
+            -DQUALITY=${quality}
+            -DINPUT=${INPUT_FILE}
+            -DOUTPUT=${OUTPUT_FILE}.${quality}
+            -P ${CMAKE_CURRENT_SOURCE_DIR}/tests/run-roundtrip-test.cmake)
+      endforeach()
+    else()
+      message(WARNING "Test file ${INPUT} does not exist.")
+    endif()
   endforeach()
 
   file(GLOB_RECURSE
diff --git a/bootstrap b/bootstrap
index 64aca2c..92d458f 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,5 +1,9 @@
 # !/bin/sh -e
 
+if [ `uname -s` = "Darwin" ]; then
+echo "WARNING: OSX autogen build is not supported"
+fi
+
 REQUIRED='is required, but not installed.'
 bc -v >/dev/null 2>&1 || { echo >&2 "'bc' $REQUIRED"; exit 1; }
 if [ `uname -s` != "FreeBSD" ]; then
diff --git a/tests/roundtrip_test.sh b/tests/roundtrip_test.sh
index 90027af..0a0b910 100755
--- a/tests/roundtrip_test.sh
+++ b/tests/roundtrip_test.sh
@@ -20,15 +20,17 @@
 """
 
 for file in $INPUTS; do
-  for quality in 1 6 9 11; do
-    echo "Roundtrip testing $file at quality $quality"
-    compressed=${TMP_DIR}/${file##*/}.br
-    uncompressed=${TMP_DIR}/${file##*/}.unbr
-    $BROTLI -fq $quality $file -o $compressed
-    $BROTLI $compressed -fdo $uncompressed
-    diff -q $file $uncompressed
-    # Test the streaming version
-    cat $file | $BROTLI -cq $quality | $BROTLI -cd >$uncompressed
-    diff -q $file $uncompressed
-  done
+  if [ -f $file ]; then
+    for quality in 1 6 9 11; do
+      echo "Roundtrip testing $file at quality $quality"
+      compressed=${TMP_DIR}/${file##*/}.br
+      uncompressed=${TMP_DIR}/${file##*/}.unbr
+      $BROTLI -fq $quality $file -o $compressed
+      $BROTLI $compressed -fdo $uncompressed
+      diff -q $file $uncompressed
+      # Test the streaming version
+      cat $file | $BROTLI -cq $quality | $BROTLI -cd >$uncompressed
+      diff -q $file $uncompressed
+    done
+  fi
 done