src/test/resources/golden-sample/configure2

changeset 77
439902ff0af3
parent 76
620358ea3a0b
child 83
868e0d4b0a57
equal deleted inserted replaced
76:620358ea3a0b 77:439902ff0af3
462 break 462 break
463 done 463 done
464 464
465 # add general dependency flags to flags.mk 465 # add general dependency flags to flags.mk
466 echo "# general flags" >> "$TEMP_DIR/flags.mk" 466 echo "# general flags" >> "$TEMP_DIR/flags.mk"
467 if [ -n "${TEMP_CFLAGS}" ]; then 467 if [ -n "${TEMP_CFLAGS}" -a -n "$lang_c" ]; then
468 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" 468 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk"
469 fi 469 fi
470 if [ -n "${TEMP_CXXFLAGS}" ]; then 470 if [ -n "${TEMP_CXXFLAGS}" -a -n "$lang_cpp" ]; then
471 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" 471 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
472 fi 472 fi
473 if [ -n "${TEMP_LDFLAGS}" ]; then 473 if [ -n "${TEMP_LDFLAGS}" ]; then
474 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk" 474 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"
475 fi 475 fi
650 ERROR=1 650 ERROR=1
651 fi 651 fi
652 fi 652 fi
653 fi 653 fi
654 654
655 if [ -n "${TEMP_CFLAGS}" ]; then 655 if [ -n "${TEMP_CFLAGS}" -a -n "$lang_c" ]; then
656 echo "DAV_CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" 656 echo "DAV_CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk"
657 fi 657 fi
658 if [ -n "${TEMP_CXXFLAGS}" ]; then 658 if [ -n "${TEMP_CXXFLAGS}" -a -n "$lang_cpp" ]; then
659 echo "DAV_CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" 659 echo "DAV_CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
660 fi 660 fi
661 if [ "$BUILD_TYPE" = "debug" ]; then 661 if [ "$BUILD_TYPE" = "debug" ]; then
662 echo 'DAV_CFLAGS += ${DEBUG_CC_FLAGS}' >> "$TEMP_DIR/flags.mk" 662 if [ -n "$lang_c" ]; then
663 echo 'DAV_CXXFLAGS += ${DEBUG_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk" 663 echo 'DAV_CFLAGS += ${DEBUG_CC_FLAGS}' >> "$TEMP_DIR/flags.mk"
664 fi
665 if [ -n "$lang_cpp" ]; then
666 echo 'DAV_CXXFLAGS += ${DEBUG_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk"
667 fi
664 fi 668 fi
665 if [ "$BUILD_TYPE" = "release" ]; then 669 if [ "$BUILD_TYPE" = "release" ]; then
666 echo 'DAV_CFLAGS += ${RELEASE_CC_FLAGS}' >> "$TEMP_DIR/flags.mk" 670 if [ -n "$lang_c" ]; then
667 echo 'DAV_CXXFLAGS += ${RELEASE_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk" 671 echo 'DAV_CFLAGS += ${RELEASE_CC_FLAGS}' >> "$TEMP_DIR/flags.mk"
672 fi
673 if [ -n "$lang_cpp" ]; then
674 echo 'DAV_CXXFLAGS += ${RELEASE_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk"
675 fi
668 fi 676 fi
669 if [ -n "${TEMP_LDFLAGS}" ]; then 677 if [ -n "${TEMP_LDFLAGS}" ]; then
670 echo "DAV_LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk" 678 echo "DAV_LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"
671 fi 679 fi
672 680
683 fi 691 fi
684 692
685 # Features 693 # Features
686 694
687 695
688 if [ -n "${TEMP_CFLAGS}" ]; then 696 if [ -n "${TEMP_CFLAGS}" -a -n "$lang_c" ]; then
689 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" 697 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk"
690 fi 698 fi
691 if [ -n "${TEMP_CXXFLAGS}" ]; then 699 if [ -n "${TEMP_CXXFLAGS}" -a -n "$lang_cpp" ]; then
692 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" 700 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
693 fi 701 fi
694 if [ "$BUILD_TYPE" = "debug" ]; then 702 if [ "$BUILD_TYPE" = "debug" ]; then
695 echo 'CFLAGS += ${DEBUG_CC_FLAGS}' >> "$TEMP_DIR/flags.mk" 703 if [ -n "$lang_c" ]; then
696 echo 'CXXFLAGS += ${DEBUG_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk" 704 echo 'CFLAGS += ${DEBUG_CC_FLAGS}' >> "$TEMP_DIR/flags.mk"
705 fi
706 if [ -n "$lang_cpp" ]; then
707 echo 'CXXFLAGS += ${DEBUG_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk"
708 fi
697 fi 709 fi
698 if [ "$BUILD_TYPE" = "release" ]; then 710 if [ "$BUILD_TYPE" = "release" ]; then
699 echo 'CFLAGS += ${RELEASE_CC_FLAGS}' >> "$TEMP_DIR/flags.mk" 711 if [ -n "$lang_c" ]; then
700 echo 'CXXFLAGS += ${RELEASE_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk" 712 echo 'CFLAGS += ${RELEASE_CC_FLAGS}' >> "$TEMP_DIR/flags.mk"
713 fi
714 if [ -n "$lang_cpp" ]; then
715 echo 'CXXFLAGS += ${RELEASE_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk"
716 fi
701 fi 717 fi
702 if [ -n "${TEMP_LDFLAGS}" ]; then 718 if [ -n "${TEMP_LDFLAGS}" ]; then
703 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk" 719 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"
704 fi 720 fi
705 721

mercurial