File: make_header

package info (click to toggle)
epix1 1.0.19-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 3,432 kB
  • ctags: 1,529
  • sloc: cpp: 8,250; sh: 4,716; lisp: 667; makefile: 229
file content (35 lines) | stat: -rwxr-xr-x 1,000 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
#
HEADER_FILE="epix.h"

HEADERS="globals.h errors.h triples.h functions.h frame.h domain.h \
     pairs.h camera.h cropping.h path.h segment.h circle.h sphere.h plane.h \
     polyhedron.h lengths.h output.h colors.h Label.h objects.h curves.h \
     plots.h surface.h dataplot.h geometry.h"

# (N.B. Spaces in 2nd line are properly adjusted :)
cat <<HEADER_HEADER > $HEADER_FILE
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\\
 *  $HEADER_FILE -- Automatically created on $(date)  *
\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

#include <iostream>
#include <vector>
#include <sstream>
#include <cmath>
#include <cstdio>
#include <cstdarg>

#ifndef EPIX_H
#define EPIX_H

HEADER_HEADER

cat $HEADERS | grep -v "\#if" | grep -v "\#include" \
    | grep -v "\#define EPIX_" | grep -v "endif" \
    | grep -v "std::string epix_version" >> $HEADER_FILE

echo >> $HEADER_FILE
echo "#endif /* EPIX_H */" >> $HEADER_FILE

exit 0;