@@ -858,19 +858,17 @@ $(OBJDIR)/ceed.pc : pkgconfig-prefix = $(prefix)
858
858
GIT_DESCRIBE = $(shell git describe --always --dirty 2>/dev/null || printf "unknown\n")
859
859
860
860
$(OBJDIR ) /interface/ceed-config.c : Makefile
861
- @$(file >$@ ,#include <ceed-impl.h>) \
862
- $(file >>$@ ,) \
863
- $(file >>$@ ,int CeedGetGitVersion(const char ** git_version) {) \
864
- $(file >>$@, *git_version = "$(GIT_DESCRIBE)";) \
865
- $(file >>$@, return 0;) \
866
- $(file >>$@,}) \
867
- $(file >>$@,) \
868
- $(file >>$@,int CeedGetBuildConfiguration(const char **build_config) {) \
869
- $(file >>$@, *build_config =) \
870
- $(foreach v,$(CONFIG_VARS),$(file >>$@,"$(v) = $($(v))\n")) \
871
- $(file >>$@, ;) \
872
- $(file >>$@, return 0;) \
873
- $(file >>$@,})
861
+ @printf ' #include <ceed-impl.h>\n\n' > $@
862
+ @printf ' int CeedGetGitVersion(const char **git_version) {\n' >> $@
863
+ @printf ' *git_version = "$(GIT_DESCRIBE)";\n' >> $@
864
+ @printf ' return 0;\n' >> $@
865
+ @printf ' }\n\n' >> $@
866
+ @printf ' int CeedGetBuildConfiguration(const char **build_config) {\n' >> $@
867
+ @printf ' *build_config =' >> $@
868
+ @printf " $( foreach v,$( CONFIG_VARS) ,\n\" $( v) = $( $( v) ) \\\n\" ) \n" >> $@
869
+ @printf ' ;\n' >> $@
870
+ @printf ' return 0;\n' >> $@
871
+ @printf ' }\n' >> $@
874
872
875
873
$(OBJDIR ) /interface/ceed-jit-source-root-default.o : CPPFLAGS += -DCEED_JIT_SOURCE_ROOT_DEFAULT="\"$(abspath ./include) /\""
876
874
$(OBJDIR ) /interface/ceed-jit-source-root-install.o : CPPFLAGS += -DCEED_JIT_SOURCE_ROOT_DEFAULT="\"$(abspath $(includedir ) ) /\""
@@ -1037,8 +1035,8 @@ CONFIG_VARS = CC CXX FC NVCC NVCC_CXX HIPCC \
1037
1035
needs_save = $(or $(filter command line,$(origin $(1 ) ) ) ,$(filter simple,$(flavor $(1 ) ) ) )
1038
1036
1039
1037
configure :
1040
- $( file > $(CONFIG ) )
1041
- $(foreach v,$(CONFIG_VARS ) ,$(if $(call needs_save,$(v ) ) ,$( file >> $( CONFIG ) , $( v ) := $($(v ) ) ) ) )
1038
+ @printf " # Cached Configuration " > $(CONFIG )
1039
+ @printf " $( foreach v,$( CONFIG_VARS) ,$( if $( call needs_save,$( v) ) ,\n $( v) := $( $( v) ) ) ) \n " >> $( CONFIG )
1042
1040
@echo " Configuration cached in $( CONFIG) :"
1043
1041
@cat $(CONFIG )
1044
1042
0 commit comments