summaryrefslogtreecommitdiff
path: root/src/Makefile.am
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2011-11-01 17:08:55 +0000
committerMorgan Deters <mdeters@gmail.com>2011-11-01 17:08:55 +0000
commit7b568f370f6ec4105414b562ee2a6fcb3d7048f2 (patch)
tree6b2c6ab7e4a426847ce332fc2e522c3c287fb60d /src/Makefile.am
parentcbd5934ffce739fcc5ade1f8fdefcd0a04e0d9ef (diff)
Improvements to header installation on user machines. Internally, we can
still write, for example: #include "expr/node.h" but public CVC4 headers, upon installation to /usr/include/cvc4 (or wherever), have such #includes rewritten automatically to: #include <cvc4/expr/node.h>
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 906a64a65..627a89a67 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -99,6 +99,7 @@ svninfo.tmp:
install-data-local:
(echo include/cvc4.h; \
echo include/cvc4_public.h; \
+ echo include/cvc4parser_public.h; \
find * -name '*.h' | \
xargs grep -l '^# *include *"cvc4.*_public\.h"'; \
(cd "$(srcdir)" && find * -name '*.h' | \
@@ -111,16 +112,21 @@ install-data-local:
$(mkinstalldirs) "$$(dirname "$(DESTDIR)$(includedir)/cvc4/$$d")"; \
if [ -e "$$f" ]; then \
path="$$f"; \
+ fixpath="$$f.fix"; \
else \
path="$(srcdir)/$$f"; \
+ fixpath="$(builddir)/$$f.fix"; \
+ $(MKDIR_P) "`dirname "$$fixpath"`"; \
fi; \
- echo $(INSTALL_DATA) "$$path" "$(DESTDIR)$(includedir)/cvc4/$$d"; \
- $(INSTALL_DATA) "$$path" "$(DESTDIR)$(includedir)/cvc4/$$d"; \
+ sed 's,^\([ \t]*#[ \t]*include[ \t*]\)"\(.*\)"\([ \t]*\)$$,\1<cvc4/\2>\3,' "$$path" > "$$fixpath" || exit 1; \
+ echo $(INSTALL_DATA) "$$fixpath" "$(DESTDIR)$(includedir)/cvc4/$$d"; \
+ $(INSTALL_DATA) "$$fixpath" "$(DESTDIR)$(includedir)/cvc4/$$d" || exit 1; \
done
uninstall-local:
-(echo include/cvc4.h; \
echo include/cvc4_public.h; \
+ echo include/cvc4parser_public.h; \
find * -name '*.h' | \
xargs grep -l '^# *include *"cvc4.*_public\.h"'; \
(cd "$(srcdir)" && find * -name '*.h' | \
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback