Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: use printf instead of echo #110

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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