ObjFW  Check-in [8e5f78b8d0]

Overview
Comment:Also use the flags from the environment on --compile in objfw-config.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 8e5f78b8d082e632fddae1536cf7330e6b7573f22128013d209ac898a6a4064b
User & Date: js on 2010-04-17 17:52:11
Other Links: manifest | tags
Context
2010-04-17
17:53
Better checking whether we need to link on --compile in objfw-config. check-in: 816cc61258 user: js tags: trunk
17:52
Also use the flags from the environment on --compile in objfw-config. check-in: 8e5f78b8d0 user: js tags: trunk
17:44
Show the output name if there's nothing to do in objfw-config. check-in: 6791ca9a7a user: js tags: trunk
Changes

Modified objfw-config.in from [3125211be8] to [0764632154].

1





2
3
4
5
6
7
8
#!/bin/sh





prefix="@prefix@"
exec_prefix="@exec_prefix@"
libdir="@libdir@"
CFLAGS=""
CPPFLAGS="-I@includedir@"
CXXFLAGS=""
OBJC="@OBJC@"

>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
ENV_CPPFLAGS="$CPPFLAGS"
ENV_OBJCFLAGS="$OBJCFLAGS"
ENV_LIBS="$LIBS"
ENV_LDFLAGS="$LDFLAGS"

prefix="@prefix@"
exec_prefix="@exec_prefix@"
libdir="@libdir@"
CFLAGS=""
CPPFLAGS="-I@includedir@"
CXXFLAGS=""
OBJC="@OBJC@"
52
53
54
55
56
57
58

59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
				obj="${1%.m}.o"
				objs="$objs $obj"

				if test ! -f "$obj" -o "$1" -nt "$obj"; then
					link="yes"
					echo "Compiling $1..."
					$OBJC $CPPFLAGS $OBJCFLAGS \

						-c -o $obj $1 || exit $?
				fi
				;;
			*)
				echo "Only .m files can be compiled!" 1>&2
				exit 1
				;;
		esac

		shift
	done

	if test x"$link" = x"yes"; then
		echo "Linking $out..."
		$OBJC -o $out $objs $LIBS $LDFLAGS
		exit $?
	fi

	echo "Nothing to do for $out..."
	exit 0
}








>














|







57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
				obj="${1%.m}.o"
				objs="$objs $obj"

				if test ! -f "$obj" -o "$1" -nt "$obj"; then
					link="yes"
					echo "Compiling $1..."
					$OBJC $CPPFLAGS $OBJCFLAGS \
						$ENV_CPPFLAGS $ENV_OBJCFLAGS \
						-c -o $obj $1 || exit $?
				fi
				;;
			*)
				echo "Only .m files can be compiled!" 1>&2
				exit 1
				;;
		esac

		shift
	done

	if test x"$link" = x"yes"; then
		echo "Linking $out..."
		$OBJC -o $out $objs $LIBS $ENV_LIBS $LDFLAGS $ENV_LDFLAGS
		exit $?
	fi

	echo "Nothing to do for $out..."
	exit 0
}