Browse code

* clean build does not throw away dependencies, use clean full for that

Nat! authored on 15-08-2017 15:54:05
Showing 3 changed files
... ...
@@ -1,6 +1,9 @@
1 1
 ## 3.11.0
2 2
 
3
-* clean command 'build' is now different, so that `mulle-boostrap clean build` followed by `mulle-bootstrap build` actually rebuilds everything as one would expect. The old functionality is now called `mulle-bootstrap clean cruft`
3
+Clean command reworked
4
+
5
+* `mulle-boostrap clean build` followed by `mulle-bootstrap build` actually rebuilds everything as one would expect. The old functionality is now called `mulle-bootstrap clean cruft`
6
+* `clean build` does not throw away dependencies, use `clean full` for that
4 7
 
5 8
 ## 3.10.0
6 9
 
... ...
@@ -43,27 +43,31 @@ Usage:
43 43
    Default clean command is "full".
44 44
 
45 45
 Commands:
46
-   cruft : remove intermediate build files to conserve space. It deletes
47
-`echo "${CRUFT_CLEANABLE_SUBDIRS}" | sort -u | sed '/^$/d' | sed -e 's/^/      /'`
48
-
49
-   install : keep only addictions and dependencies
50
-`echo "${CRUFT_CLEANABLE_SUBDIRS}
51
-${INSTALL_CLEANABLE_SUBDIRS}" | sort -u | sed '/^$/d' | sed -e 's/^/      /'`
52
-
53
-   build : useful to rebuild. It deletes
46
+   build : useful to run mulle-bootstrap build again. It deletes
54 47
 `echo "${CRUFT_CLEANABLE_SUBDIRS}
55 48
 ${BUILD_CLEANABLE_SUBDIRS}
56 49
 ${BUILD_CLEANABLE_FILES}
57 50
 ${BUILD_CLEANABLE_SUBDIRS}"  | sort -u | sed '/^$/d' | sed -e 's/^/      /'`
58 51
 
59
-   full : useful to pickup config changes and to rebuild
52
+   cruft   : remove intermediate build files to conserve space.
53
+             It deletes:
54
+`echo "${CRUFT_CLEANABLE_SUBDIRS}" | sort -u | sed '/^$/d' | sed -e 's/^/      /'`
55
+
56
+   full    : useful to pickup config changes and file removals on rebuild.
57
+             You may need to bootstrap again though. It deletes:
60 58
 `echo "${CRUFT_CLEANABLE_SUBDIRS}
61 59
 ${BUILD_CLEANABLE_SUBDIRS}
62 60
 ${BUILD_CLEANABLE_FILES}
63 61
 ${BUILD_CLEANABLE_SUBDIRS}
64 62
 ${FULL_CLEANABLE_SUBDIRS}" | sort -u | sed '/^$/d' | sed -e 's/^/      /'`
65 63
 
66
-   dist : remove all clones, dependencies, addictions. It deletes
64
+   install : keep only addictions and dependencies, if you don't expect to
65
+             rebuild. It deletes:
66
+`echo "${CRUFT_CLEANABLE_SUBDIRS}
67
+${INSTALL_CLEANABLE_SUBDIRS}" | sort -u | sed '/^$/d' | sed -e 's/^/      /'`
68
+
69
+   dist    : remove all clones, dependencies, addictions.
70
+             It deletes
67 71
 `echo "${CRUFT_CLEANABLE_SUBDIRS}
68 72
 ${BUILD_CLEANABLE_SUBDIRS}
69 73
 ${BUILD_CLEANABLE_FILES}
... ...
@@ -192,14 +196,15 @@ ${DEPENDENCIES_DIR}/tmp"`"
192 196
    BUILD_CLEANABLE_FILES="${REPOS_DIR}/.build_done"
193 197
 
194 198
    # BUILD is: CRUFT +  ...
195
-   BUILD_CLEANABLE_SUBDIRS="`read_sane_config_path_setting "output_clean_folders" "${DEPENDENCIES_DIR}"`"
199
+   BUILD_CLEANABLE_SUBDIRS="`read_sane_config_path_setting "build_clean_folders" ""`"
196 200
 
197 201
    # INSTALL is: CRUFT + ...
198 202
    INSTALL_CLEANABLE_SUBDIRS="`read_sane_config_path_setting "install_clean_folders" "${REPOS_DIR}
199 203
 ${STASHES_DEFAULT_DIR}"`"
200 204
 
201 205
    # FULL is: CRUFT + BUILD + ...
202
-   FULL_CLEANABLE_SUBDIRS="`read_sane_config_path_setting "full_clean_folders" "${BOOTSTRAP_DIR}.auto"`"
206
+   FULL_CLEANABLE_SUBDIRS="`read_sane_config_path_setting "full_clean_folders" "${DEPENDENCIES_DIR}
207
+${BOOTSTRAP_DIR}.auto"`"
203 208
 
204 209
    # DIST is: CRUFT + BUILD + FULL + INSTALL + ...
205 210
    DIST_CLEANABLE_SUBDIRS="`read_sane_config_path_setting "dist_clean_folders" \
... ...
@@ -739,7 +739,7 @@ read_sane_config_path_setting()
739 739
    local value
740 740
 
741 741
    value="`read_config_setting "${key}" "${default}"`"
742
-   if [ $? -eq 0 ]
742
+   if [ $? -eq 0 -a ! -z "${value}" ]
743 743
    then
744 744
       assert_sane_subdir_path "${value}"
745 745
       echo "$value"