/[resiprocate]/main/build/mkbuildpaths
ViewVC logotype

Contents of /main/build/mkbuildpaths

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5295 - (show annotations) (download)
Mon Aug 22 00:30:05 2005 UTC (14 years, 2 months ago) by jason
File size: 2226 byte(s)
merged 5270:HEAD from b-directory-reorg
1 #! /usr/bin/perl
2
3 # this program will make the vocal-buildpaths tool.
4
5
6 # here is a comment about usage, etc:
7
8 # OK. I just hacked up a solution to this one. look at
9 # vocal/build/mkbuildpaths on HEAD. it should create a script called
10 # vocal-buildpaths which works like gtk-config -- you can pass it arguments
11 # which will ask it to spew out the right includes, etc. e.g.
12
13 # ./vocal-buildpaths --sip-cflags
14
15 # or
16
17 # ./vocal-buildpaths --sip-ldflags
18
19 # these are hardwired to whichever copy of vocal you're using, so make
20 # sure you run mkbuildpaths if you happen to move your vocal tree around.
21
22 # one problem with these is that they get more complex if you need RTP (e.g.
23 # if you're trying to build a user agent w/ audio support) or a full VOCAL
24 # app -- those cases aren't implemented yet.
25
26 # if you're interested, the way these are implemented is that mkbuildpaths
27 # invokes the makefiles to generate the proper include path information from
28 # the package magic.
29
30
31
32 $vocal_buildpaths = "vocal-buildpaths";
33
34 open(F, ">$vocal_buildpaths") || die "cannot write to vocal-buildpaths: $!";
35 print F <<EOF
36 #! /bin/sh
37
38 # this program is automatically generated! DO NOT EDIT!
39
40 usage()
41 {
42 cat <<USAGE_INFO
43 Usage: vocal-buildpaths [options]
44 Options:
45 [--sip-cflags]
46 [--sip-ldflags]
47 USAGE_INFO
48 exit 1
49 }
50
51 EOF
52 ;
53
54 chomp($sip_cflags = `make -f Makefile.buildpaths BUILD=\`pwd\` PACKAGES="SIP SDP2 SIPMGCP UTIL LIBCEXT LIBXML" build_cflags`);
55
56 chomp($sip_ldflags = `make -f Makefile.buildpaths BUILD=\`pwd\` PACKAGES="SIP SDP2 SIPMGCP UTIL LIBCEXT LIBXML PTHREAD" build_ldflags`);
57
58 $sip_cflags =~ s/\/build\/..\//\//g;
59 $sip_ldflags =~ s/\/build\/..\//\//g;
60
61 print F <<EOJ
62
63 cflags=0
64 ldflags=0
65
66 while [ \$# -gt 0 ] ; do
67
68 case \$1 in
69 --sip-cflags)
70 cflags="$sip_cflags"
71 ;;
72 --sip-ldflags)
73 ldflags="$sip_ldflags"
74 ;;
75 *)
76 usage
77 ;;
78 esac
79 shift
80 done
81
82 if [ "\$cflags" == "0" -a "\$ldflags" == "0" ] ; then
83 usage
84 fi
85
86 if [ "\$cflags" != "0" ] ; then
87 flags=\$cflags
88 fi
89
90 if [ "\$ldflags" != "0" ] ; then
91 flags="\$flags \$ldflags"
92 fi
93
94 echo \$flags
95
96 EOJ
97 ;
98
99
100
101 close(F);
102 chmod 0755, $vocal_buildpaths;

Properties

Name Value
svn:executable *

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27