Skip to content

Commit

Permalink
add beautify make rule to remove trailing whitespace. Have not applie…
Browse files Browse the repository at this point in the history
…d it to the source tree yet.
  • Loading branch information
benkirk committed Apr 2, 2013
1 parent aac77e1 commit 896bd8d
Showing 1 changed file with 21 additions and 12 deletions.
33 changes: 21 additions & 12 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

SUBDIRS = include #src

AUTOMAKE_OPTIONS = subdir-objects
AUTOMAKE_OPTIONS = subdir-objects
ACLOCAL_AMFLAGS = -I m4
AM_CFLAGS = $(libmesh_CFLAGS)

# AM_CPPFLAGS are method-independent cppflags that
# AM_CPPFLAGS are method-independent cppflags that
# we use when compiling libmesh proper, or its utility
# codes. These will be augmented with method-specific
# cppflags later on
Expand Down Expand Up @@ -99,6 +99,15 @@ install-data-hook:
cat $(DESTDIR)$(libmesh_configdir)/libmesh-config | $(SED) "s/has_been_installed=no/has_been_installed=yes/g" > $(DESTDIR)$(libmesh_configdir)/libmesh-config.installed
mv $(DESTDIR)$(libmesh_configdir)/libmesh-config.installed $(DESTDIR)$(libmesh_configdir)/libmesh-config && chmod +x $(DESTDIR)$(libmesh_configdir)/libmesh-config


# this rule invokes emacs on each source file to remove trailing whitespace.
beautify:
for file in `find $(srcdir)/{src,include,examples} -name "*.C" -o -name "*.h" -o -name Makefile.am -type f` ; do \
echo $$file ; \
emacs -batch $$file --eval '(delete-trailing-whitespace)' -f save-buffer 2>/dev/null ; \
done


# Additional files to be deleted by 'make distclean'
# _configs.sed seems to be leftover by prefix_config
DISTCLEANFILES = \
Expand All @@ -123,23 +132,23 @@ DISTCLEANFILES = \
# test/Makefile.in \
# test/common/Makefile.in \
# test/comp_ns/Makefile.in \
# test/unit/Makefile.in
# test/unit/Makefile.in



SUBDIRS += contrib

include src/libmesh_SOURCES

# A convenience library to hold proper libMesh
# objects. This will get appended with any contributed
# A convenience library to hold proper libMesh
# objects. This will get appended with any contributed
# sources to create the final library.
lib_LTLIBRARIES =
lib_LTLIBRARIES =

if LIBMESH_DBG_MODE
lib_LTLIBRARIES += libmesh_dbg.la
libmesh_dbg_la_SOURCES = $(libmesh_SOURCES)
libmesh_dbg_la_CPPFLAGS = $(CPPFLAGS_DBG) $(AM_CPPFLAGS)
libmesh_dbg_la_CPPFLAGS = $(CPPFLAGS_DBG) $(AM_CPPFLAGS)
libmesh_dbg_la_CXXFLAGS = $(CXXFLAGS_DBG)
libmesh_dbg_la_CFLAGS = $(CFLAGS_DBG)
libmesh_dbg_la_LIBADD = contrib/libcontrib_dbg.la $(LIBS)
Expand All @@ -148,7 +157,7 @@ endif
if LIBMESH_DEVEL_MODE
lib_LTLIBRARIES += libmesh_devel.la
libmesh_devel_la_SOURCES = $(libmesh_SOURCES)
libmesh_devel_la_CPPFLAGS = $(CPPFLAGS_DEVEL) $(AM_CPPFLAGS)
libmesh_devel_la_CPPFLAGS = $(CPPFLAGS_DEVEL) $(AM_CPPFLAGS)
libmesh_devel_la_CXXFLAGS = $(CXXFLAGS_DEVEL)
libmesh_devel_la_CFLAGS = $(CFLAGS_DEVEL)
libmesh_devel_la_LIBADD = contrib/libcontrib_devel.la $(LIBS)
Expand All @@ -157,7 +166,7 @@ endif
if LIBMESH_OPT_MODE
lib_LTLIBRARIES += libmesh_opt.la
libmesh_opt_la_SOURCES = $(libmesh_SOURCES)
libmesh_opt_la_CPPFLAGS = $(CPPFLAGS_OPT) $(AM_CPPFLAGS)
libmesh_opt_la_CPPFLAGS = $(CPPFLAGS_OPT) $(AM_CPPFLAGS)
libmesh_opt_la_CXXFLAGS = $(CXXFLAGS_OPT)
libmesh_opt_la_CFLAGS = $(CFLAGS_OPT)
libmesh_opt_la_LIBADD = contrib/libcontrib_opt.la $(LIBS)
Expand All @@ -166,7 +175,7 @@ endif
if LIBMESH_PROF_MODE
lib_LTLIBRARIES += libmesh_prof.la
libmesh_prof_la_SOURCES = $(libmesh_SOURCES)
libmesh_prof_la_CPPFLAGS = $(CPPFLAGS_PROF) $(AM_CPPFLAGS)
libmesh_prof_la_CPPFLAGS = $(CPPFLAGS_PROF) $(AM_CPPFLAGS)
libmesh_prof_la_CXXFLAGS = $(CXXFLAGS_PROF)
libmesh_prof_la_CFLAGS = $(CFLAGS_PROF)
libmesh_prof_la_LIBADD = contrib/libcontrib_prof.la $(LIBS)
Expand All @@ -175,7 +184,7 @@ endif
if LIBMESH_OPROF_MODE
lib_LTLIBRARIES += libmesh_oprof.la
libmesh_oprof_la_SOURCES = $(libmesh_SOURCES)
libmesh_oprof_la_CPPFLAGS = $(CPPFLAGS_OPROF) $(AM_CPPFLAGS)
libmesh_oprof_la_CPPFLAGS = $(CPPFLAGS_OPROF) $(AM_CPPFLAGS)
libmesh_oprof_la_CXXFLAGS = $(CXXFLAGS_OPROF)
libmesh_oprof_la_CFLAGS = $(CFLAGS_OPROF)
libmesh_oprof_la_LIBADD = contrib/libcontrib_oprof.la $(LIBS)
Expand Down Expand Up @@ -473,7 +482,7 @@ lcov_dir=$(top_builddir)/doc/lcov/html
lcov_bin=$(top_srcdir)/contrib/lcov/lcov-1.10/bin

# General philosophy is to maintain code coverage for the
# base library as generated by "make check" tests.
# base library as generated by "make check" tests.

lcov-report:
@mkdir -p $(lcov_dir)
Expand Down

0 comments on commit 896bd8d

Please sign in to comment.