Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
4d378d69
Commit
4d378d69
authored
17 years ago
by
Marcel Loose
Browse files
Options
Downloads
Patches
Plain Diff
BugID: 1065
Fixed problem of CPPFLAGS, CXXFLAGS, and LDFLAGS being sorted when duplicates were removed.
parent
2a0fe5c9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
autoconf_share/lofar_external.m4
+16
-10
16 additions, 10 deletions
autoconf_share/lofar_external.m4
with
16 additions
and
10 deletions
autoconf_share/lofar_external.m4
+
16
−
10
View file @
4d378d69
...
...
@@ -412,18 +412,24 @@ else
# Update EXTERNAL_CPPFLAGS and EXTERNAL_LDFLAGS. Do not update
# EXTERNAL_CXXFLAGS, since we do not want to propagate C++ compiler flags.
# Use tr to translate any newline into a space.
EXTERNAL_CPPFLAGS=`cat pkgextcppflags | tr
$
'\n' " "`
EXTERNAL_LDFLAGS=`cat pkgextldflags | tr
$
'\n' " "`
EXTERNAL_CPPFLAGS=`cat pkgextcppflags | tr '\n' " "`
EXTERNAL_LDFLAGS=`cat pkgextldflags | tr '\n' " "`
# Finally, update the flags that will be exported. Remove any remaining
# duplicate tokens. Note that this will sort the flags.
# Do not sort LIBS since the order is usually important.
CPPFLAGS=`echo "$CPPFLAGS $EXTERNAL_CPPFLAGS" | tr " " $'\n' | \
sort | uniq | tr $'\n' " "`
CXXFLAGS=`echo "$CXXFLAGS $EXTERNAL_CXXFLAGS" | tr " " $'\n' | \
sort | uniq | tr $'\n' " "`
LDFLAGS=`echo "$LDFLAGS $EXTERNAL_LDFLAGS" | tr " " $'\n' | \
sort | uniq | tr $'\n' " "`
# duplicate tokens, without sorting the flags.
# WARNING: Spaces act as separators, so neither put any spaces between a
# -D or -I flag and its argument, nor use a -I path with spaces.
CPPFLAGS=`echo "$CPPFLAGS $EXTERNAL_CPPFLAGS" | tr " " '\n' | \
cat -n - | sort -k2 -k1,1n | uniq -f1 | sort -k1,1n | \
cut -f2 | tr '\n' " "`
CXXFLAGS=`echo "$CXXFLAGS $EXTERNAL_CXXFLAGS" | tr " " '\n' | \
cat -n - | sort -k2 -k1,1n | uniq -f1 | sort -k1,1n | \
cut -f2 | tr '\n' " "`
LDFLAGS=`echo "$LDFLAGS $EXTERNAL_LDFLAGS" | tr " " '\n' | \
cat -n - | sort -k2 -k1,1n | uniq -f1 | sort -k1,1n | \
cut -f2 | tr '\n' " "`
# Do not sort LIBS. Usually, order is important and duplicates are
# intentional.
LIBS="$LIBS $EXTERNAL_LIBS"
LOFAR_DEPEND="$LOFAR_DEPEND $lfr_depend"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment