summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-06-03 02:41:45 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-03 02:41:45 +0300
commita6179f50085b271826fc383efac4d1ef8ef08052 (patch)
tree69213262f6512a89eb22048b7fecdb61356947f2
parentb8a3f582fbcb8cb632bc18e8cc98deb78ec56e48 (diff)
downloaddeheader-a6179f50085b271826fc383efac4d1ef8ef08052.tar.gz
deheader-a6179f50085b271826fc383efac4d1ef8ef08052.tar.bz2
deheader-a6179f50085b271826fc383efac4d1ef8ef08052.tar.xz
deheader-a6179f50085b271826fc383efac4d1ef8ef08052.zip
Add .h extension to know extensions for compilation.
-rwxr-xr-xdeheader4
1 files changed, 2 insertions, 2 deletions
diff --git a/deheader b/deheader
index 6e1087e..d9119ba 100755
--- a/deheader
+++ b/deheader
@@ -1233,7 +1233,7 @@ class InclusionMap:
@staticmethod
def c_source(filename):
"Predicate: return true if the filename appears to be C or C++ source."
- return filename.endswith(".c") or filename.endswith(".cpp") or filename.endswith(".cc")
+ return filename.endswith(".c") or filename.endswith(".cpp") or filename.endswith(".cc") or filename.endswith(".h")
def __init__(self, roots, ignore, excludes, verbosity):
"Build the initial inclusion map."
self.verbosity = verbosity
@@ -1439,7 +1439,7 @@ def deheader(sourcefile, maker, includes, requires, remove, verbose):
(st, _t) = testcompile(sourcefile, maker, verbosity=max(1, verbose), showerrs=True, subdir=subdir)
if st == 0:
# Now do the analysis
- if sourcefile.endswith(".c") or sourcefile.endswith(".cpp") or sourcefile.endswith(".cc"):
+ if sourcefile.endswith(".c") or sourcefile.endswith(".cpp") or sourcefile.endswith(".cc") or sourcefile.endswith(".h"):
unneeded = c_analyze(sourcefile, maker,
includes[:], requires, verbose, subdir=subdir)
if unneeded: