File: make_share_list

package info (click to toggle)
maxima 5.44.0-2
  • links: PTS
  • area: main
  • in suites: bullseye, sid
  • size: 108,368 kB
  • sloc: lisp: 383,860; fortran: 14,665; perl: 14,369; tcl: 11,147; sh: 4,517; makefile: 2,580; ansic: 447; python: 262; xml: 59; awk: 37; sed: 17
file content (44 lines) | stat: -rwxr-xr-x 1,513 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh

# Find the location of the share directory in the src tree
# Assumes this script is in a first level subdirectory in the same tree
SHAREDIR="$( cd "$(dirname "$0")/../share" 1>/dev/null 2>/dev/null; pwd -P )"
echo "Share directory is ${SHAREDIR}"

(
echo "# DO NOT EDIT sharefiles.mk.  It is automatically generated"
echo "# by running make.  This list is generated by"
echo "# ../admin/make_share_list"
echo "# But note that is is checked in so if there are new files"
echo "# or deleted files, be sure to check in this file with the"
echo "# changes."
echo ""
echo "sharefiles = \\"

# Find all the files in the share directory, and then filter the
# output.  We remove lots of files that we don't want installed like
# files in the fortran directories, CVS files, and other random files.
#
# Then remove the leading dot and append a \ to each line, but not the
# last line.

(cd "${SHAREDIR}"; find . -type f) |
egrep -v '\.ERR$' |
egrep -v 'CVS|Makefile(\.in|\.am)?|^\./Makefile|\.gitignore' |
egrep -v '/fortran/' |
egrep -v 'colnew/ex./' |
egrep -v 'lbfgs/.*\.f' |
egrep -v '/\.#' |
egrep -v '~|#' |
sed -e 's%\./%%' -e 's%$% \\%' |
sort -f -d |
sed '$s/\\$//'
)  > sharefiles.mk.$$

# If the original and new versions are different, update the original
# with the new information, otherwise remove the generated file.

cmp sharefiles.mk sharefiles.mk.$$ >/dev/null 2>/dev/null || mv sharefiles.mk.$$ sharefiles.mk

# remove temporary sharefile.mk.$$ - if it still exists.
rm -f sharefiles.mk.$$