FreeBSD sed: ensure that a "-e" option immediately follows "-i"

This commit is contained in:
Henry Weller
2015-11-14 17:03:03 +00:00
parent 6fe856136d
commit 55f7d50be1
6 changed files with 8 additions and 62 deletions

View File

@ -2,7 +2,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
@ -68,16 +68,9 @@ $(SFILES): $(MAKE_DIR)/files
# Add a newline to files to ensure the last line is followed by a newline
@echo "" >> $(SFILES)
# Remove commented lines, blank lines, and trailing blanks from files
@sed -i \
-e '/^#/ d' \
-e '/^[ \t]*$$/ d' \
-e 's,[ \t]*$$,,' \
$(SFILES)
@sed -i -e '/^#/ d' -e '/^[ \t]*$$/ d' -e 's,[ \t]*$$,,' $(SFILES)
# Add backslashes
@sed -i \
-e 's,$$, \\,' \
-e '$$s,\\,,' \
$(SFILES)
@sed -i -e 's,$$, \\,' -e '$$s,\\,,' $(SFILES)
$(VARS): $(SFILES)