aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/utils/Makefile.in36
-rw-r--r--src/utils/hammer.cc2
-rw-r--r--src/utils/hash-table.H2
-rw-r--r--src/utils/sexpr.H2
-rw-r--r--src/utils/sexpr.cc2
-rw-r--r--src/utils/storage.H2
-rw-r--r--src/utils/storage.cc4
-rw-r--r--src/utils/string-pool.H2
-rw-r--r--src/utils/string-pool.cc2
10 files changed, 45 insertions, 15 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index f1563733..03f24094 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2010-08-26 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * utils/Makefile.in: Install headers.
+
+2010-08-25 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
2010-08-25 Gabriel Dos Reis <gdr@cs.tamu.edu>
* interp/i-output.boot (newlineIfDisplaying): New.
diff --git a/src/utils/Makefile.in b/src/utils/Makefile.in
index b3adb6b9..4f43e115 100644
--- a/src/utils/Makefile.in
+++ b/src/utils/Makefile.in
@@ -40,9 +40,18 @@ libOpenAxiom_HEADERS = storage.H hash-table.H string-pool.H sexpr.H
libOpenAxiom_SOURCES = storage.cc string-pool.cc sexpr.cc
libOpenAxiom_OBJECTS = $(libOpenAxiom_SOURCES:.cc=.lo)
+oa_public_headers = storage hash-table string-pool sexpr
+
+## Where we store public header files
+oa_target_headerdir = $(oa_target_includedir)/open-axiom
+
+oa_include_flags = -I. -I$(oa_target_includedir) -I$(top_builddir)/config
+
.PHONY: all all-ax all-utils
.SUFFIXES:
-.SUFFIXES: .cc .H $(OBJEXT) $(LIBEXT)
+.SUFFIXES: .cc .H .$(OBJEXT) .$(LIBEXT)
+.PRECIOUS: %.lo %.$(OBJEXT)
+
all: all-ax
@@ -52,9 +61,23 @@ stamp: libOpenAxiom.$(LIBEXT) hammer$(EXEEXT)
-rm -f stamp
$(STAMP) stamp
-.SUFFIXES:
-.SUFFIXES: .c .h .lo .$(OBJEXT)
-.PRECIOUS: %.lo %.obj
+stamp-headers: $(libOpenAxiom_HEADERS) Makefile
+ rm -f stamp-headers
+ if [ ! -d $(oa_target_headerdir) ]; then \
+ mkdir -p -- $(oa_target_headerdir) || exit 1; \
+ fi ; \
+ c1=$(top_builddir)/config/openaxiom-c-macros.h; \
+ c2=$(oa_target_headerdir)/config; \
+ if [ ! -r $$c2 ] || ! cmp -s $$c1 $$c2 ; then \
+ cp -p $$c1 $$c2; \
+ fi ; \
+ for h in $(oa_public_headers); do \
+ f1=$(srcdir)/$$h.H; f2=$(oa_target_headerdir)/$$h; \
+ if [ ! -r $$f2 ] || ! cmp -s $$f1 $$f2 ; then \
+ cp -p $$f1 $$f2; \
+ fi; \
+ done ; \
+ $(STAMP) stamp-headers
hammer$(EXEEXT): $(hammer_OBJECTS) libOpenAxiom.$(LIBEXT)
$(CXXLINK) -o $@ $(hammer_OBJECTS) $(hammer_LDADD) $(LDFLAGS)
@@ -62,12 +85,13 @@ hammer$(EXEEXT): $(hammer_OBJECTS) libOpenAxiom.$(LIBEXT)
libOpenAxiom.$(LIBEXT): $(libOpenAxiom_OBJECTS)
$(CXXLINK) -o $@ $(libOpenAxiom_OBJECTS)
-%.lo: %.cc $(libOpenAxiom_HEADERS)
- $(CXXCOMPILE) ${CXXFLAGS} -I. -I$(top_builddir)/config -o $@ $<
+%.lo: %.cc stamp-headers
+ $(CXXCOMPILE) ${CXXFLAGS} $(oa_include_flags) -o $@ $<
mostlyclean-local:
@rm -rf .libs
+ @rm -rf $(oa_include_headerdir) stamp-headers
@rm -f $(libOpenAxiom_OBJECTS)
@rm -f *~ core
diff --git a/src/utils/hammer.cc b/src/utils/hammer.cc
index 35ef5c1f..3ab56c72 100644
--- a/src/utils/hammer.cc
+++ b/src/utils/hammer.cc
@@ -48,7 +48,7 @@
#include <list>
#include <vector>
#include <map>
-#include "storage.H"
+#include <open-axiom/storage>
namespace OpenAxiom {
namespace Hammer {
diff --git a/src/utils/hash-table.H b/src/utils/hash-table.H
index 75b485ff..f5a2c7d0 100644
--- a/src/utils/hash-table.H
+++ b/src/utils/hash-table.H
@@ -37,7 +37,7 @@
// --% Simple hash table facility. To be replaced by C++0x
// --% hash tables when C++0x compilers become common place.
-#include "storage.H"
+#include <open-axiom/storage>
namespace OpenAxiom {
// --------------------
diff --git a/src/utils/sexpr.H b/src/utils/sexpr.H
index 5139b453..3059dce5 100644
--- a/src/utils/sexpr.H
+++ b/src/utils/sexpr.H
@@ -44,7 +44,7 @@
#include <iosfwd>
#include <vector>
#include <set>
-#include "string-pool.H"
+#include <open-axiom/string-pool>
// Helpers for defining token type values for lexeme with more
// than characters.
diff --git a/src/utils/sexpr.cc b/src/utils/sexpr.cc
index d9d38220..248c0649 100644
--- a/src/utils/sexpr.cc
+++ b/src/utils/sexpr.cc
@@ -34,7 +34,7 @@
#include <ctype.h>
#include <iostream>
#include <iterator>
-#include "sexpr.H"
+#include <open-axiom/sexpr>
namespace OpenAxiom {
namespace Sexpr {
diff --git a/src/utils/storage.H b/src/utils/storage.H
index 60d5c0b4..03b03604 100644
--- a/src/utils/storage.H
+++ b/src/utils/storage.H
@@ -43,7 +43,7 @@
#include <cmath>
#include <string>
-#include "openaxiom-c-macros.h"
+#include <open-axiom/config>
namespace OpenAxiom {
// -----------------
diff --git a/src/utils/storage.cc b/src/utils/storage.cc
index 4883de6c..a023e945 100644
--- a/src/utils/storage.cc
+++ b/src/utils/storage.cc
@@ -31,7 +31,7 @@
// --%: Gabriel Dos Reis.
-#include "openaxiom-c-macros.h"
+#include <open-axiom/config>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
@@ -56,7 +56,7 @@
#include <stdlib.h>
#include <string.h>
#include <new> // for placement new.
-#include "storage.H"
+#include <open-axiom/storage>
namespace OpenAxiom {
// ----------------
diff --git a/src/utils/string-pool.H b/src/utils/string-pool.H
index f3692a79..ae90409b 100644
--- a/src/utils/string-pool.H
+++ b/src/utils/string-pool.H
@@ -33,7 +33,7 @@
#define OPENAXIOM_STRING_POOL_INCLUDED
#include <string.h>
-#include "hash-table.H"
+#include <open-axiom/hash-table>
// --% Author: Gabriel Dos Reis.
// --% Description:
diff --git a/src/utils/string-pool.cc b/src/utils/string-pool.cc
index 5ae6b15d..0c529ace 100644
--- a/src/utils/string-pool.cc
+++ b/src/utils/string-pool.cc
@@ -31,7 +31,7 @@
// --% Author: Gabriel Dos Reis
-#include "string-pool.H"
+#include <open-axiom/string-pool>
namespace OpenAxiom {
// ----------------