Parcourir la source

Use generic name for build target: "build"

Make it easier to share &  sync installer code across projects from the
same family.
Alois Mahdal il y a 9 ans
Parent
révision
c8a63e9bf4
2 fichiers modifiés avec 26 ajouts et 26 suppressions
  1. 4
    4
      Makefile
  2. 22
    22
      setup/mk.sh

+ 4
- 4
Makefile Voir le fichier

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

+ 22
- 22
setup/mk.sh Voir le fichier

@@ -32,6 +32,26 @@ die() {
32 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 55
 clean() {
36 56
     test -f built.list && {
37 57
         cat built.list | xargs rm -f
@@ -64,26 +84,6 @@ install() {
64 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 87
 run_test() {
88 88
     pushd test
89 89
     find -maxdepth 1 -type f \! -name '*.in' | while read test;
@@ -99,12 +99,12 @@ uninstall() {
99 99
 }
100 100
 
101 101
 case $1 in
102
-    clean|dist|install|install_manpages|manpages|eecc|uninstall)
102
+    build|clean|dist|install|install_manpages|manpages|uninstall)
103 103
         $1
104 104
         ;;
105 105
     test)
106 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 110
 esac