blob: c085814f204046d532b8162ead4ef536f747ed4e [file] [log] [blame]
Jason Evans86abd0d2013-11-30 15:25:42 -08001#!/bin/sh
2
3objroot=$1
4
5cat <<EOF
6#ifndef JEMALLOC_H_
7#define JEMALLOC_H_
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12EOF
13
Jason Evansf234dc52014-01-16 17:38:01 -080014for hdr in jemalloc_defs.h jemalloc_rename.h jemalloc_macros.h \
Jason Evans82e88d12014-09-07 19:55:03 -070015 jemalloc_protos.h jemalloc_typedefs.h jemalloc_mangle.h ; do
Jason Evans9f35a712013-12-07 11:53:26 -080016 cat "${objroot}include/jemalloc/${hdr}" \
17 | grep -v 'Generated from .* by configure\.' \
18 | sed -e 's/^#define /#define /g' \
19 | sed -e 's/ $//g'
Jason Evans86abd0d2013-11-30 15:25:42 -080020 echo
21done
22
23cat <<EOF
24#ifdef __cplusplus
Dave Rigby37fd1112015-07-16 11:36:00 +010025}
Jason Evans86abd0d2013-11-30 15:25:42 -080026#endif
27#endif /* JEMALLOC_H_ */
28EOF