chiark
/
gitweb
/
~mdw
/
cfd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
207202a
)
mdwsetup.py (pkg_config): Rearrange and reformat.
author
Mark Wooding
<mdw@distorted.org.uk>
Tue, 1 Oct 2019 21:56:27 +0000
(22:56 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Fri, 8 May 2020 11:30:13 +0000
(12:30 +0100)
mdwsetup.py
patch
|
blob
|
blame
|
history
diff --git
a/mdwsetup.py
b/mdwsetup.py
index a1f56b628f200ae326e7594a39ccf3cc779afa98..45772fb6f3a70a7ecff1040501747973f650a62a 100644
(file)
--- a/
mdwsetup.py
+++ b/
mdwsetup.py
@@
-97,22
+97,21
@@
def pkg_config(pkg, version):
library-directory names are in LIBDIRS; and the library names themselves
are in LIBS.
"""
library-directory names are in LIBDIRS; and the library names themselves
are in LIBS.
"""
- spec = '%s >= %s' % (pkg, version)
+
def weird(what, word):
raise ValueError \
("Unexpected `%s' item `%s' from package `%s'" % (what, word, pkg))
def weird(what, word):
raise ValueError \
("Unexpected `%s' item `%s' from package `%s'" % (what, word, pkg))
+
+ spec = '%s >= %s' % (pkg, version)
+
for word in progoutput(['pkg-config', '--cflags', spec]).split():
for word in progoutput(['pkg-config', '--cflags', spec]).split():
- if word.startswith('-I'):
- INCLUDEDIRS.append(word[2:])
- else:
- weird('--cflags', word)
+ if word.startswith('-I'): INCLUDEDIRS.append(word[2:])
+ else: weird('--cflags', word)
+
for word in progoutput(['pkg-config', '--libs', spec]).split():
for word in progoutput(['pkg-config', '--libs', spec]).split():
- if word.startswith('-L'):
- LIBDIRS.append(word[2:])
- elif word.startswith('-l'):
- LIBS.append(word[2:])
- else:
- weird('--libs', word)
+ if word.startswith('-L'): LIBDIRS.append(word[2:])
+ elif word.startswith('-l'): LIBS.append(word[2:])
+ else: weird('--libs', word)
###--------------------------------------------------------------------------
### Substituting variables in files.
###--------------------------------------------------------------------------
### Substituting variables in files.