3 # Find the location of the share directory in the src tree
4 # Assumes this script is in a first level subdirectory in the same tree
5 SHAREDIR
="$( cd "$
(dirname "$0")/..
/share
" 1>/dev/null 2>/dev/null; pwd -P )"
6 echo "Share directory is ${SHAREDIR}"
9 echo "# DO NOT EDIT sharefiles.mk. It is automatically generated"
10 echo "# by running make. This list is generated by"
11 echo "# ../admin/make_share_list"
12 echo "# But note that is is checked in so if there are new files"
13 echo "# or deleted files, be sure to check in this file with the"
16 echo "sharefiles = \\"
18 # Find all the files in the share directory, and then filter the
19 # output. We remove lots of files that we don't want installed like
20 # files in the fortran directories, CVS files, and other random files.
22 # Then remove the leading dot and append a \ to each line, but not the
25 (cd "${SHAREDIR}"; find .
-type f
) |
27 egrep -v 'CVS|Makefile(\.in|\.am)?|^\./Makefile|\.gitignore' |
28 egrep -v '/fortran/' |
29 egrep -v 'colnew/ex./' |
30 egrep -v 'lbfgs/.*\.f' |
33 sed -e 's%\./%%' -e 's%$% \\%' |
38 # If the original and new versions are different, update the original
39 # with the new information, otherwise remove the generated file.
41 cmp sharefiles.mk sharefiles.mk.$$
>/dev
/null
2>/dev
/null ||
mv sharefiles.mk.$$ sharefiles.mk
43 # remove temporary sharefile.mk.$$ - if it still exists.
44 rm -f sharefiles.mk.$$