Browse Source

Use generic name for build target: "build"

Make it easier to share &  sync installer code across projects from the
same family.
Alois Mahdal 9 years ago
parent
commit
c8a63e9bf4
2 changed files with 26 additions and 26 deletions
  1. 4
    4
      Makefile
  2. 22
    22
      setup/mk.sh

+ 4
- 4
Makefile View File

6
 all: options built.list
6
 all: options built.list
7
 
7
 
8
 built.list:
8
 built.list:
9
-	@setup/mk.sh eecc
9
+	@setup/mk.sh build
10
 
10
 
11
 options:
11
 options:
12
 	@echo eecc build options:
12
 	@echo eecc build options:
13
 	@echo "VERSION  = ${VERSION}"
13
 	@echo "VERSION  = ${VERSION}"
14
 	@echo "PREFIX   = ${PREFIX}"
14
 	@echo "PREFIX   = ${PREFIX}"
15
 
15
 
16
+build:
17
+	@setup/mk.sh build
18
+
16
 install_manpages: manpages
19
 install_manpages: manpages
17
 	@setup/mk.sh install_manpages
20
 	@setup/mk.sh install_manpages
18
 
21
 
19
 manpages:
22
 manpages:
20
 	@setup/mk.sh manpages
23
 	@setup/mk.sh manpages
21
 
24
 
22
-eecc:
23
-	@setup/mk.sh eecc
24
-
25
 test: install
25
 test: install
26
 	@setup/mk.sh test
26
 	@setup/mk.sh test
27
 
27
 

+ 22
- 22
setup/mk.sh View File

32
     exit 9
32
     exit 9
33
 }
33
 }
34
 
34
 
35
+build() {
36
+    ffoom init_path >& /dev/null \
37
+        || die "-----" \
38
+               "fastfoo not installed or ffoom is not available for $(id -un)." \
39
+               "In the latter case try running (only) \`make\` under normal" \
40
+               "user and repeating the \`make install\` again." \
41
+               "-----"
42
+    local ffoo_init=$(ffoom init_path)
43
+    local srcpath dstpath
44
+    find -type f -name '*.in' \
45
+        | while read srcpath;
46
+          do
47
+              dstpath=${srcpath%.in}
48
+              perl -pe "s|__FFOO_INIT__|$ffoo_init|;
49
+                        s|__FFOO_INI_PATH__|$FFOO_INI_PATH_GLOBAL:\\\$HOME/$FFOO_INI_PATH_USER|;
50
+                        s|__VERSION__|$VERSION|;" < $srcpath > $dstpath
51
+              echo $dstpath >> built.list
52
+          done
53
+}
54
+
35
 clean() {
55
 clean() {
36
     test -f built.list && {
56
     test -f built.list && {
37
         cat built.list | xargs rm -f
57
         cat built.list | xargs rm -f
64
     test -f .autoclean && clean || :
84
     test -f .autoclean && clean || :
65
 }
85
 }
66
 
86
 
67
-eecc() {
68
-    ffoom init_path >& /dev/null \
69
-        || die "-----" \
70
-               "fastfoo not installed or ffoom is not available for $(id -un)." \
71
-               "In the latter case try running (only) \`make\` under normal" \
72
-               "user and repeating the \`make install\` again." \
73
-               "-----"
74
-    local ffoo_init=$(ffoom init_path)
75
-    local srcpath dstpath
76
-    find -type f -name '*.in' \
77
-        | while read srcpath;
78
-          do
79
-              dstpath=${srcpath%.in}
80
-              perl -pe "s|__FFOO_INIT__|$ffoo_init|;
81
-                        s|__FFOO_INI_PATH__|$FFOO_INI_PATH_GLOBAL:\\\$HOME/$FFOO_INI_PATH_USER|;
82
-                        s|__VERSION__|$VERSION|;" < $srcpath > $dstpath
83
-              echo $dstpath >> built.list
84
-          done
85
-}
86
-
87
 run_test() {
87
 run_test() {
88
     pushd test
88
     pushd test
89
     find -maxdepth 1 -type f \! -name '*.in' | while read test;
89
     find -maxdepth 1 -type f \! -name '*.in' | while read test;
99
 }
99
 }
100
 
100
 
101
 case $1 in
101
 case $1 in
102
-    clean|dist|install|install_manpages|manpages|eecc|uninstall)
102
+    build|clean|dist|install|install_manpages|manpages|uninstall)
103
         $1
103
         $1
104
         ;;
104
         ;;
105
     test)
105
     test)
106
         run_test
106
         run_test
107
         ;;
107
         ;;
108
     *)
108
     *)
109
-        echo "usage: $(basename $0) clean|dist|install|eecc|test|uninstall" >&2
109
+        echo "usage: $(basename $0) build|clean|dist|install|test|uninstall" >&2
110
 esac
110
 esac