summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorknarf <knarf@17b73243-c579-4c4c-a9d2-2d5706c11dac>2011-09-27 04:10:08 +0000
committerknarf <knarf@17b73243-c579-4c4c-a9d2-2d5706c11dac>2011-09-27 04:10:08 +0000
commitaeebc07e94b8a96c9634b9fdf3a191bcab304a98 (patch)
treea7da38575bea46917a671b1913bb1d3957cd1c52 /lib
parentf8dbd5ccb2c56ea0aa3a5c633fecfa4be576a780 (diff)
Replace the SILENT option with a VERBOSE option (of opposite meaning). Default
is still VERBOSE=no, but this now actually produces a lot less output: almost no "cosmetic" lines (only ---), and no messages for pre- and postprocessing anymore. Add VERBOSE=yes to get the old beavior of SILENT=no. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4737 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib')
-rw-r--r--lib/make/make.config.rules.in115
-rw-r--r--lib/make/make.configuration27
-rw-r--r--lib/make/make.subdir2
-rw-r--r--lib/make/make.thornlib7
-rwxr-xr-xlib/make/setup_configuration.pl2
5 files changed, 88 insertions, 65 deletions
diff --git a/lib/make/make.config.rules.in b/lib/make/make.config.rules.in
index 4140696b..eda4b54c 100644
--- a/lib/make/make.config.rules.in
+++ b/lib/make/make.config.rules.in
@@ -28,8 +28,25 @@ DIVIDER = $(DIVEL)$(DIVEL)$(DIVEL)$(DIVEL)
INCLUDE_LINE = $(patsubst %,-I"%",$(call TRANSFORM_DIRS,$(INC_DIRS)))
#####################################################################
-# Define how to do dependencies
+define NOTIFY_PREPROCESSING
+ { if test "$(VERBOSE)" == "yes"; then echo Preprocessing $<; fi }
+endef
+define NOTIFY_COPYING
+ { if test "$(VERBOSE)" == "yes"; then echo Copying $<; fi }
+endef
+define NOTIFY_COMPILING
+ { if test "$(VERBOSE)" == "yes"; then echo Compiling $<; \
+ else echo COMPILING $<; fi }
+endef
+define NOTIFY_POSTPROCESSING
+ { if test "$(VERBOSE)" == "yes"; then echo Postprocessing $<; fi }
+endef
+define NOTIFY_DIVIDER
+ { if test "$(VERBOSE)" == "yes"; then echo $(DIVIDER); fi }
+endef
+
+# Define how to do dependencies
ifeq ($(strip $(PERL_BACKUP_NECESSARY)),)
define DEPENDENCY_FIXER
$(PERL) -pi -e "s,([^:]*),$(basename $@).o $(basename $@).d, if(m/: /);\
@@ -191,13 +208,13 @@ endef
# Build rules for C
%.c.o: $(SRCDIR)/%.c
- @echo Preprocessing $<
+ $(NOTIFY_PREPROCESSING)
$(PREPROCESS_C)
- @echo Compiling $<
+ $(NOTIFY_COMPILING)
$(COMPILE_C)
- @echo Postprocessing $<
+ $(NOTIFY_POSTPROCESSING)
$(POSTPROCESS_C)
- @echo $(DIVIDER)
+ $(NOTIFY_DIVIDER)
%.c.d: $(SRCDIR)/%.c
$(C_DEPENDENCIES)
@@ -205,50 +222,50 @@ endef
# Build rules for C++
%.cc.o: $(SRCDIR)/%.cc
- @echo Preprocessing $<
+ $(NOTIFY_PREPROCESSING)
$(PREPROCESS_CXX)
- @echo Compiling $<
+ $(NOTIFY_COMPILING)
$(COMPILE_CXX)
- @echo Postprocessing $<
+ $(NOTIFY_POSTPROCESSING)
$(POSTPROCESS_CXX)
- @echo $(DIVIDER)
+ $(NOTIFY_DIVIDER)
%.cc.d: $(SRCDIR)/%.cc
$(CXX_DEPENDENCIES)
%.C.o: $(SRCDIR)/%.C
- @echo Preprocessing $<
+ $(NOTIFY_PREPROCESSING)
$(PREPROCESS_CXX)
- @echo Compiling $<
+ $(NOTIFY_COMPILING)
$(COMPILE_CXX)
- @echo Postprocessing $<
+ $(NOTIFY_POSTPROCESSING)
$(POSTPROCESS_CXX)
- @echo $(DIVIDER)
+ $(NOTIFY_DIVIDER)
%.C.d: $(SRCDIR)/%.C
$(CXX_DEPENDENCIES)
%.cpp.o: $(SRCDIR)/%.cpp
- @echo Preprocessing $<
+ $(NOTIFY_PREPROCESSING)
$(PREPROCESS_CXX)
- @echo Compiling $<
+ $(NOTIFY_COMPILING)
$(COMPILE_CXX)
- @echo Postprocessing $<
+ $(NOTIFY_POSTPROCESSING)
$(POSTPROCESS_CXX)
- @echo $(DIVIDER)
+ $(NOTIFY_DIVIDER)
%.cpp.d: $(SRCDIR)/%.cpp
$(CXX_DEPENDENCIES)
%.cxx.o: $(SRCDIR)/%.cxx
- @echo Preprocessing $<
+ $(NOTIFY_PREPROCESSING)
$(PREPROCESS_CXX)
- @echo Compiling $<
+ $(NOTIFY_COMPILING)
$(COMPILE_CXX)
- @echo Postprocessing $<
+ $(NOTIFY_POSTPROCESSING)
$(POSTPROCESS_CXX)
- @echo $(DIVIDER)
+ $(NOTIFY_DIVIDER)
%.cxx.d: $(SRCDIR)/%.cxx
$(CXX_DEPENDENCIES)
@@ -256,13 +273,13 @@ endef
# Build rules for CUDA
%.cu.o: $(SRCDIR)/%.cu
- @echo Preprocessing $<
+ $(NOTIFY_PREPROCESSING)
$(PREPROCESS_CU)
- @echo Compiling $<
+ $(NOTIFY_COMPILING)
$(COMPILE_CU)
- @echo Postprocessing $<
+ $(NOTIFY_POSTPROCESSING)
$(POSTPROCESS_CU)
- @echo $(DIVIDER)
+ $(NOTIFY_DIVIDER)
%.cu.d: $(SRCDIR)/%.cu
$(CU_DEPENDENCIES)
@@ -270,22 +287,22 @@ endef
# Build rules for F77
%.F77.o: $(SRCDIR)/%.F77
- @echo Preprocessing $<
+ $(NOTIFY_PREPROCESSING)
$(PREPROCESS_F77)
- @echo Compiling $<
+ $(NOTIFY_COMPILING)
$(COMPILE_F77)
- @echo Postprocessing $<
+ $(NOTIFY_POSTPROCESSING)
$(POSTPROCESS_F77)
- @echo $(DIVIDER)
+ $(NOTIFY_DIVIDER)
%.f77.o: $(SRCDIR)/%.f77
- @echo Copying $<
+ $(NOTIFY_COPYING)
$(PREPROCESS_f77)
- @echo Compiling $<
+ $(NOTIFY_COMPILING)
$(COMPILE_F77)
- @echo Postprocessing $<
+ $(NOTIFY_POSTPROCESSING)
$(POSTPROCESS_F77)
- @echo $(DIVIDER)
+ $(NOTIFY_DIVIDER)
%.F77.d: $(SRCDIR)/%.F77
$(F77_DEPENDENCIES)
@@ -296,22 +313,22 @@ endef
# Build rules for F90
%.F.o: $(SRCDIR)/%.F
- @echo Preprocessing $<
+ $(NOTIFY_PREPROCESSING)
$(PREPROCESS_F)
- @echo Compiling $<
+ $(NOTIFY_COMPILING)
$(COMPILE_F)
- @echo Postprocessing $<
+ $(NOTIFY_POSTPROCESSING)
$(POSTPROCESS_F)
- @echo $(DIVIDER)
+ $(NOTIFY_DIVIDER)
%.f.o: $(SRCDIR)/%.f
- @echo Copying $<
+ $(NOTIFY_COPYING)
$(PREPROCESS_f)
- @echo Compiling $<
+ $(NOTIFY_COMPILING)
$(COMPILE_F)
- @echo Postprocessing $<
+ $(NOTIFY_POSTPROCESSING)
$(POSTPROCESS_F)
- @echo $(DIVIDER)
+ $(NOTIFY_DIVIDER)
%.F.d: $(SRCDIR)/%.F
$(F_DEPENDENCIES)
@@ -322,22 +339,22 @@ endef
# Build rules for free-format F90
%.F90.o: $(SRCDIR)/%.F90
- @echo Preprocessing $<
+ $(NOTIFY_PREPROCESSING)
$(PREPROCESS_F90)
- @echo Compiling $<
+ $(NOTIFY_COMPILING)
$(COMPILE_F90)
- @echo Postprocessing $<
+ $(NOTIFY_POSTPROCESSING)
$(POSTPROCESS_F90)
- @echo $(DIVIDER)
+ $(NOTIFY_DIVIDER)
%.f90.o: $(SRCDIR)/%.f90
- @echo Copying $<
+ $(NOTIFY_COPYING)
$(PREPROCESS_f90)
- @echo Compiling $<
+ $(NOTIFY_COMPILING)
$(COMPILE_F90)
- @echo Postprocessing $<
+ $(NOTIFY_POSTPROCESSING)
$(POSTPROCESS_F90)
- @echo $(DIVIDER)
+ $(NOTIFY_DIVIDER)
%.F90.d: $(SRCDIR)/%.F90
$(F90_DEPENDENCIES)
diff --git a/lib/make/make.configuration b/lib/make/make.configuration
index f145eb89..cef05216 100644
--- a/lib/make/make.configuration
+++ b/lib/make/make.configuration
@@ -9,7 +9,7 @@
# @@*/
# Silence all but designated output
-#.SILENT:
+#.VERBOSE:
# Some configuration variables
CONFIG = $(TOP)/config-data
@@ -48,6 +48,9 @@ CACTUSLIBS = $(FLESHLIB) $(BINDINGSLIB)
# Dividers to make the screen output slightly nicer
DIVEL = __________________
DIVIDER = $(DIVEL)$(DIVEL)$(DIVEL)$(DIVEL)
+define NOTIFY_DIVIDER
+ { if test "$(VERBOSE)" == "yes"; then echo $(DIVIDER); fi }
+endef
# Include the definitions for this configuration
include $(CONFIG)/make.config.defn
@@ -63,7 +66,7 @@ export PERLINTERP = $(shell echo $(PERL) | sed 's,^/cygdrive/\(.\)/,\1:/,' | sed
main: $(EXEDIR)$(DIRSEP)$(EXE)
@echo All done !
- @echo $(DIVIDER)
+ $(NOTIFY_DIVIDER)
# Put this in temporarily to make sure that people with existing
@@ -132,7 +135,7 @@ $(EXEDIR)$(DIRSEP)$(EXE): $(CONFIG)/make.thornlist $(CONFIG)/cctki_version.h $(p
$(CC) $(CFLAGS) -DCCTK_COMPILE_DATETIME="$$datetime" $(CCOMPILEONLY)$(OPTIONSEP)"$(call TRANSFORM_DIRS,$(TOP)/datestamp.o)" -I"$(call TRANSFORM_DIRS,$(CCTK_HOME)/src/include)" -I"$(call TRANSFORM_DIRS,$(CONFIG))" "$(call TRANSFORM_DIRS,$(DATESTAMP))"
if [ ! -d $(EXEDIR) ]; then $(MKDIR) $(MKDIRFLAGS) $(EXEDIR) ; fi
$(LD) $(CREATEEXE)$(OPTIONSEP)"$(call TRANSFORM_DIRS,$@)" $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(EXTRAFLAGS) "$(call TRANSFORM_DIRS,$(TOP)/datestamp.o)" $(CACTUSLIBLINKLINE) $(GENERAL_LIBRARIES)
- @echo $(DIVIDER)
+ $(NOTIFY_DIVIDER)
# Version file
$(CONFIG)/cctki_version.h: $(CCTK_HOME)/Makefile
@@ -193,7 +196,7 @@ $(CCTK_LIBDIR)/$(LIBNAME_PREFIX)$(CCTK_LIBNAME_PREFIX)%$(LIBNAME_SUFFIX): update
$(MKDIR) $(MKDIRFLAGS) $(BUILD_DIR)/$$thorn_name ; \
fi ; \
cd $(BUILD_DIR)/$$thorn_name ; \
- echo $(DIVIDER) ; \
+ $(NOTIFY_DIVIDER) ; \
if [ -r "$$src_dir/Makefile" ] ; \
then \
make_file=$$src_dir/Makefile ; \
@@ -201,7 +204,7 @@ $(CCTK_LIBDIR)/$(LIBNAME_PREFIX)$(CCTK_LIBNAME_PREFIX)%$(LIBNAME_SUFFIX): update
make_file=$(MAKE_DIR)/make.thornlib ; \
fi ; \
$(MAKE) TOP=$(TOP) SRCDIR=$$src_dir CONFIG=$(CONFIG) NAME=$@ THORN=$$thorn_name USESTHORNS="$(USESTHORNS_$(@:$(CCTK_LIBDIR)/$(LIBNAME_PREFIX)$(CCTK_LIBNAME_PREFIX)%$(LIBNAME_SUFFIX)=%))" -f $$make_file $(FPARFLAGS)
- @echo $(DIVIDER)
+ $(NOTIFY_DIVIDER)
# Include any extra dependencies
@@ -227,16 +230,16 @@ $(TOP)/ThornList:
while [ "x$$action" = "xyes" -o "x$$action" = "xy" -o "x$$action" = "xYES" -o "x$$action" = "xY" ] ; \
do \
echo The thorn list is ; \
- echo $(DIVIDER) ; \
+ $(NOTIFY_DIVIDER) ; \
cat $@ ; \
- echo $(DIVIDER) ; \
+ $(NOTIFY_DIVIDER) ; \
echo Edit this list \(no\) \? ; \
read action rest ; \
if [ "x$$action" = "xyes" -o "x$$action" = "xy" -o "x$$action" = "xYES" -o "x$$action" = "xY" ] ; \
then $$EDITOR $@ ; fi ; \
done; \
fi
- @echo $(DIVIDER)
+ $(NOTIFY_DIVIDER)
# Allow each thorn to include some global dependencies
ifneq ($(strip $(THORNS)),)
@@ -268,15 +271,15 @@ editthorns:
while [ "x$$action" = "xyes" -o "x$$action" = "xy" -o "x$$action" = "xYES" -o "x$$action" = "xY" ] ; \
do \
echo The thorn list is ; \
- echo $(DIVIDER) ; \
+ $(NOTIFY_DIVIDER) ; \
cat $(TOP)/ThornList ; \
- echo $(DIVIDER) ; \
+ $(NOTIFY_DIVIDER) ; \
echo Edit this list \(no\) \? ; \
read action rest ; \
if [ "x$$action" = "xyes" -o "x$$action" = "xy" -o "x$$action" = "xYES" -o "x$$action" = "xY" ] ; \
then $$EDITOR $(TOP)/ThornList ; fi ; \
done
- @echo $(DIVIDER)
+ $(NOTIFY_DIVIDER)
clean:
@echo Deleting all object and dependency files in $(TOP)
@@ -309,7 +312,7 @@ UNKNOWN_THORNS = $(filter-out $(ALLCACTUSLIBS_BASE), $(BUILDLIST))
build: $(CONFIG)/make.thornlist $(CONFIG)/cctki_version.h $(patsubst %, $(CCTK_LIBDIR)/$(LIBNAME_PREFIX)$(CCTK_LIBNAME_PREFIX)%$(LIBNAME_SUFFIX), $(THORN_BUILDLIST))
if test "x$(UNKNOWN_THORNS)" != "x"; then \
echo "WARNING: Don't know anything about '$(UNKNOWN_THORNS)' !"; \
- echo $(DIVIDER); \
+ $(NOTIFY_DIVIDER); \
fi
diff --git a/lib/make/make.subdir b/lib/make/make.subdir
index cf218a39..676dbdc1 100644
--- a/lib/make/make.subdir
+++ b/lib/make/make.subdir
@@ -9,7 +9,7 @@
# @@*/
# Silence all but designated output
-#.SILENT:
+#.VERBOSE:
# Include the main make definitions for this configuration
include $(CONFIG)/make.config.defn
diff --git a/lib/make/make.thornlib b/lib/make/make.thornlib
index 87dd6ffa..c246ddab 100644
--- a/lib/make/make.thornlib
+++ b/lib/make/make.thornlib
@@ -9,11 +9,14 @@
# @@*/
# Silence all but designated output
-#.SILENT:
+#.VERBOSE:
# Dividers to make the screen output slightly nicer
DIVEL = __________________
DIVIDER = $(DIVEL)$(DIVEL)$(DIVEL)$(DIVEL)
+define NOTIFY_DIVIDER
+ { if test "$(VERBOSE)" == "yes"; then echo $(DIVIDER); fi }
+endef
# Include the main make definitions for this configuration
include $(CONFIG)/make.config.defn
@@ -98,7 +101,7 @@ $(NAME): $(addsuffix /make.checked, $(SUBDIRS) $(THORNBINDINGS))
## to do: use a two-level namespace
## (this requires knowing the dependencies of each thorn library)
# libtool -dynamic -arch_only ppc -o $@ $(OBJS) -flat_namespace -undefined suppress -single_module
- @echo $(DIVIDER)
+ $(NOTIFY_DIVIDER)
# Extra stuff for allowing make to recurse into directories
diff --git a/lib/make/setup_configuration.pl b/lib/make/setup_configuration.pl
index 3f455d57..bb027282 100755
--- a/lib/make/setup_configuration.pl
+++ b/lib/make/setup_configuration.pl
@@ -125,7 +125,7 @@ sub SetConfigureEnv
# while ($commandline =~ /^(.*)\s+(\w+)\s*=\s*([_+\-\.\w\\\/\s]*)\s*/)
while ($commandline =~ /^(.*)\s*\b(\w+)\s*=\s*(.*?)\s*$/)
{
- if ($2 ne 'options' && $2 ne 'SILENT')
+ if ($2 ne 'options' && $2 ne 'VERBOSE')
{
print "Using configuration options from configure line\n"
if (!$line_number);