intel / mpi-benchmarks

149 stars 63 forks source link

make fails with if /bin/sh != /bin/bash #10

Closed kawashima-fj closed 5 years ago

kawashima-fj commented 6 years ago

make fails if /bin/sh is not /bin/bash (In Debian GNU/Linux, /bin/sh is /bin/dash by default).

Use of == in [ ] is an extention of bash and some other shells. It should be = for all POSIX-conformant shells.

@@ -171,8 +171,8 @@ override CPPFLAGS += -DWITH_YAML_CPP
 endif

 announce:
-       @if [ "$(ANNOUNCE)" == "1" ]; then echo "NOTE: Building target: $(TARGET), binary name: $(BINARY)"; fi
-       @if [ "$(ANNOUNCE)" == "1" ]; then echo "NOTE: Use make TARGET=<DIR_NAME> to select a target suite"; fi
+       @if [ "$(ANNOUNCE)" = "1" ]; then echo "NOTE: Building target: $(TARGET), binary name: $(BINARY)"; fi
+       @if [ "$(ANNOUNCE)" = "1" ]; then echo "NOTE: Use make TARGET=<DIR_NAME> to select a target suite"; fi

 $(BINARY): $(IMB_OBJ) $(BECHMARK_SUITE_OBJ) $(ADDITIONAL_OBJ) $(YAML_CPP_LIB)
        $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)
a-v-medvedev commented 6 years ago

Please look at this pull request as well https://github.com/intel/mpi-benchmarks/pull/8/commits/e02567f42b85ed7ef6737398f5220c6d90115d06

kawashima-fj commented 6 years ago

Oh, #8 is better solution.

kawashima-fj commented 5 years ago

I confirmed this is fixed in IMB 2019.2. Thanks.