summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2007-03-26 16:06:23 +0000
committerEric S. Raymond <esr@thyrsus.com>2007-03-26 16:06:23 +0000
commit1307c6406b8c751285083354b38a652516074d3c (patch)
tree4e6c0ed3708f3791c60a7c24666bc02ae78191c1 /Makefile.am
parent5a72bba10245cb68f1a51e5416e64e8c3849b847 (diff)
downloadgpsd-1307c6406b8c751285083354b38a652516074d3c.tar.gz
More elegant gpsd.h generation.
Have an explicit header file, so the idempotency machinery can be up front where it belongs.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am10
1 files changed, 6 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am
index 7c1dd330..fa2d1597 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -145,14 +145,16 @@ libgps_c_sources = \
bsd-base64.c \
bsd-base64.h \
strl.c \
- hex.c
+ hex.c \
+ gpsd.h-head \
+ gpsd.h-tail
BUILT_SOURCES = packet_names.h gpsd.h
packet_names.h: packet_states.h
sed -e '/^ *\([A-Z][A-Z0-9_]*\),/s// "\1",/' -e '/_states/s//_names/' < `test -f 'packet_states.h' || echo '$(srcdir)/'`packet_states.h > packet_names.h
-gpsd.h: gpsd.h-tail gpsd_config.h
- echo "/* This file is generated. Do not hand-hack it! */" >gpsd.h
+gpsd.h: gpsd.h-head gpsd.h-tail gpsd_config.h
+ cp gpsd.h-head gpsd.h
grep VERSION gpsd_config.h >>gpsd.h
grep ENABLE gpsd_config.h >>gpsd.h
cat gpsd.h-tail >>gpsd.h
@@ -304,7 +306,7 @@ EXTRA_DIST = \
setup.py \
packet_states.h
-CLEANFILES = packet_names.h floattest *.core $(PYEXTENSIONS)
+CLEANFILES = $(BUILT_SOURCES) floattest *.core $(PYEXTENSIONS)
# This is not distributed
libgps: libgps.c .libs/libgps.a