[GRASS-dev] Makefile: Extra `cat' invocations
Ivan Shmakov
oneingray at gmail.com
Sun Mar 22 08:22:42 EDT 2009
There're some unnecessary `cat' invocations in `Makefile'.
Unless there'll be any objections, I'm going to commit the patch
below to the trunk.
--- Makefile (revision 36440)
+++ Makefile (working copy)
@@ -87,7 +87,7 @@
done
$(MAKE) $(FILES_DST)
$(MAKE) ${ARCH_DISTDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}.tmp
- @if [ `cat "$(ERRORLOG)" | wc -l` -gt 5 ] ; then \
+ @if [ `wc -l < "$(ERRORLOG)"` -gt 5 ] ; then \
echo "--" >> $(ERRORLOG) ; \
echo "In case of errors please change into the directory with error and run 'make'." >> $(ERRORLOG) ; \
echo "If you get multiple errors, you need to deal with them in the order they" >> $(ERRORLOG) ; \
@@ -99,7 +99,7 @@
@echo "--" >> $(ERRORLOG)
@echo "Finished compilation: `date`" >> $(ERRORLOG)
@cat $(ERRORLOG)
- @if [ `cat "$(ERRORLOG)" | wc -l` -gt 8 ] ; then false ; else true ; fi
+ @if [ `wc -l < "$(ERRORLOG)"` -gt 8 ] ; then false ; else true ; fi
${ARCH_DISTDIR}/%: %
$(INSTALL_DATA) $< $@
@@ -230,7 +230,7 @@
-tar cBf - gem/skeleton | tar xBCf ${INST_DIR}/etc - 2>/dev/null
-${INSTALL} gem/gem7 ${BINDIR} 2>/dev/null
@# enable OSX Help Viewer
- @if [ "`cat include/Make/Platform.make | grep -i '^ARCH.*darwin'`" ] ; then /bin/ln -sfh "${INST_DIR}/docs/html" /Library/Documentation/Help/GRASS-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR} ; fi
+ @if [ "`grep -i '^ARCH.*darwin' < include/Make/Platform.make`" ] ; then /bin/ln -sfh "${INST_DIR}/docs/html" /Library/Documentation/Help/GRASS-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR} ; fi
install-strip:
--
FSF associate member #7257
More information about the grass-dev
mailing list