-
Notifications
You must be signed in to change notification settings - Fork 675
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Finish the quieting of "./clean -a" (#789)
TYPE: enhancement KEYWORDS: clean script SOURCE: internal DESCRIPTION OF CHANGES: The purpose of the `clean` script is to run through multiple directories and either remove files directly or to issue some `make clean` or `make superclean` command. In the `clean` script itself, remove `set echo`, so the script does not report each command contained within the script: cd here, cd there, this if test, that else branch, etc. To stop the "Entering such and such dir" and "Leaving such and such dir" paired messages as the Makefiles traverse the source code, add the `-s` option to all `make clean` and `make superclean` commands. This stops make from printing a rule before executing it. We still get error messages if they should occur. With a much smaller output from `clean -a`, we can actually notice the error messages. We have not added the `-s` option to any other portion of the makefile system than the `make clean` or `make superclean` options. Remove an outright echo statement from grib2 IO. Add a small, new makefile for CRTM, expressly for the `clean` option. This is because the full Makefile assumes that the configure.wrf file exists, the Makefile cannot include it (if it does not exist), and immediately fails the clean step in that directory. LIST OF MODIFIED FILES: M clean M external/Makefile M external/io_grib_share/build/library_rules.mk M var/Makefile A var/external/crtm_2.3.0/libsrc/makefile_clean M var/external/crtm_2.3.0/makefile TESTS CONDUCTED: - [x] Before mods, output from `clean -a` was 60 lines; now it is quiet. - [x] The small amount of output pointed out an obvious error that needed to be fixed. - [x] Before mods, CRTM directory was not actually cleaned - [x] `clean -a` still reports errors ``` /bin/rm: cannot remove ‘foo_foo_fee_doo’: No such file or directory ``` - [x] Build still works
- Loading branch information
Showing
6 changed files
with
30 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
|
||
|
||
superclean : | ||
@( cd esmf_time_f90 ; make superclean ) | ||
@( cd io_pnetcdf ; make superclean ) | ||
@( cd io_pio ; make superclean ) | ||
@( cd io_int ; make superclean ) | ||
@( cd io_netcdf ; make superclean ) | ||
@( cd io_mcel ; make superclean ) | ||
@( cd io_phdf5 ; make superclean ) | ||
@( cd io_grib1 ; make superclean ) | ||
@( cd io_grib_share ; make superclean ) | ||
@( cd io_grib2 ; make superclean ) | ||
@( cd io_esmf ; make superclean ) | ||
@( cd ioapi_share ; make superclean ) | ||
@( cd RSL_LITE ; make superclean ) | ||
@( cd fftpack/fftpack5 ; make superclean ) | ||
@( cd atm_ocn ; make superclean ) | ||
@( cd esmf_time_f90 ; make -s superclean ) | ||
@( cd io_pnetcdf ; make -s superclean ) | ||
@( cd io_pio ; make -s superclean ) | ||
@( cd io_int ; make -s superclean ) | ||
@( cd io_netcdf ; make -s superclean ) | ||
@( cd io_mcel ; make -s superclean ) | ||
@( cd io_phdf5 ; make -s superclean ) | ||
@( cd io_grib1 ; make -s superclean ) | ||
@( cd io_grib_share ; make -s superclean ) | ||
@( cd io_grib2 ; make -s superclean ) | ||
@( cd io_esmf ; make -s superclean ) | ||
@( cd ioapi_share ; make -s superclean ) | ||
@( cd RSL_LITE ; make -s superclean ) | ||
@( cd fftpack/fftpack5 ; make -s superclean ) | ||
@( cd atm_ocn ; make -s superclean ) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
package = CRTM | ||
|
||
# The file definitions. This include must occur before targets. | ||
include make.filelist | ||
|
||
clean: | ||
@$(RM) *.o *.mod *.a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
MAKE = make -i -r | ||
|
||
# Target specification | ||
all clean: | ||
all : | ||
@cd libsrc && $(MAKE) $@ | ||
|
||
clean: | ||
@cd libsrc && $(MAKE) -s -f makefile_clean $@ |