blob: 623121ef95d65d1ba368c3c27486b05b962c0f73 [file] [log] [blame]
Ed Warnickecb9cada2015-12-08 15:45:58 -07001#!/bin/bash
2
Dave Barach8d0f2f02018-03-12 09:31:36 -04003# Copyright (c) 2015 Cisco and/or its affiliates.
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at:
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
Ed Warnickecb9cada2015-12-08 15:45:58 -070016# includes
17paths=`find $1/*/include -type f -print | grep -v '/dpdk/include/'`
18rm -f $2
19
20for path in $paths
21do
22 relpath=`echo $path | sed -e 's:.*/include/::'`
23 dir=`dirname $relpath`
24 if [ $dir = "." ] ; then
25 echo ../$path /usr/include >> $2
26 else
27 echo ../$path /usr/include/$dir >> $2
28 fi
29done
30
31# sample plugin
Damjan Marioncb034b92016-12-28 18:38:59 +010032paths=`(cd ..; find src/examples/sample-plugin -type f -print | grep -v autom4te)`
Ed Warnickecb9cada2015-12-08 15:45:58 -070033
34for path in $paths
35do
Damjan Marioncb034b92016-12-28 18:38:59 +010036 relpath=`echo $path | sed -e 's:.*src/examples/::'`
Ed Warnickecb9cada2015-12-08 15:45:58 -070037 dir=`dirname $relpath`
38 if [ $dir = "sample-plugin" ] ; then
Damjan Marioncb034b92016-12-28 18:38:59 +010039 echo ../../$path /usr/share/doc/vpp/examples/sample-plugin/ >> $2
Ed Warnickecb9cada2015-12-08 15:45:58 -070040 else
41 echo ../../$path \
Damjan Marioncb034b92016-12-28 18:38:59 +010042 /usr/share/doc/vpp/examples/$dir >> $2
Ed Warnickecb9cada2015-12-08 15:45:58 -070043 fi
44done