Skip to content

Commit

Permalink
build: use printf instead of echo
Browse files Browse the repository at this point in the history
  • Loading branch information
dong-zeyu committed Dec 14, 2023
1 parent 54bdd9d commit 7ac117f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ camera-streamer: $(filter-out cmd/%, $(TARGET_OBJS)) $(filter cmd/camera-streame

.PHONY: version
version:
echo "#define GIT_VERSION \"$(GIT_VERSION)\"\n#define GIT_REVISION \"$(GIT_REVISION)\"" > version.h.tmp
printf "#define GIT_VERSION \"$(GIT_VERSION)\"\n#define GIT_REVISION \"$(GIT_REVISION)\"\n" > version.h.tmp
if $(CCACHE) $(CXX) $(CFLAGS) -o tests/libcamera/orientation.o -c tests/libcamera/orientation.cc 2>/dev/null; then \
echo "#define LIBCAMERA_USES_ORIENTATION" >> version.h.tmp; \
printf "#define LIBCAMERA_USES_ORIENTATION\n" >> version.h.tmp; \
else \
echo "#define LIBCAMERA_USES_TRANSFORM" >> version.h.tmp; \
printf "#define LIBCAMERA_USES_TRANSFORM\n" >> version.h.tmp; \
fi
diff -u version.h version.h.tmp || mv version.h.tmp version.h
-rm -f version.h.tmp
Expand Down

0 comments on commit 7ac117f

Please sign in to comment.