Browse Source

Move headers from include to include/grass (#1350)

The include contained the header files are there directly while distribution
has them in include/grass which is an unnecessary difference.
Having them in a subdirectory can make it easier for code editing tools
and other operations directly running on the source tree. See also:

* https://trac.osgeo.org/grass/wiki/G8SourceLayout

This creates the new grass directory, moves the header files, and
updates build system to use this new layout.
Makefile for makefiles and for header files is now split into two.
Vaclav Petras 4 years ago
parent
commit
61d6f8c7db
100 changed files with 55 additions and 44 deletions
  1. 2 2
      .gitignore
  2. 1 1
      Makefile
  3. 3 3
      configure
  4. 2 2
      configure.in
  5. 4 36
      include/Makefile
  6. 43 0
      include/grass/Makefile
  7. 0 0
      include/grass/arraystats.h
  8. 0 0
      include/grass/bitmap.h
  9. 0 0
      include/grass/blas.h
  10. 0 0
      include/grass/btree.h
  11. 0 0
      include/grass/calc.h
  12. 0 0
      include/grass/cdhc.h
  13. 0 0
      include/grass/cluster.h
  14. 0 0
      include/grass/colors.h
  15. 0 0
      include/grass/config.h.in
  16. 0 0
      include/grass/datetime.h
  17. 0 0
      include/grass/dbmi.h
  18. 0 0
      include/grass/defs/Paintlib.h
  19. 0 0
      include/grass/defs/arraystats.h
  20. 0 0
      include/grass/defs/bitmap.h
  21. 0 0
      include/grass/defs/btree.h
  22. 0 0
      include/grass/defs/calc.h
  23. 0 0
      include/grass/defs/cdhc.h
  24. 0 0
      include/grass/defs/cluster.h
  25. 0 0
      include/grass/defs/colors.h
  26. 0 0
      include/grass/defs/datetime.h
  27. 0 0
      include/grass/defs/dbmi.h
  28. 0 0
      include/grass/defs/devlib.h
  29. 0 0
      include/grass/defs/dig_atts.h
  30. 0 0
      include/grass/defs/display.h
  31. 0 0
      include/grass/defs/form.h
  32. 0 0
      include/grass/defs/gis.h
  33. 0 0
      include/grass/defs/glocale.h
  34. 0 0
      include/grass/defs/gmath.h
  35. 0 0
      include/grass/defs/gprojects.h
  36. 0 0
      include/grass/defs/imagery.h
  37. 0 0
      include/grass/defs/la.h
  38. 0 0
      include/grass/defs/linkm.h
  39. 0 0
      include/grass/defs/manage.h
  40. 0 0
      include/grass/defs/neta.h
  41. 0 0
      include/grass/defs/nviz.h
  42. 0 0
      include/grass/defs/ogsf.h
  43. 0 0
      include/grass/defs/ortholib.h
  44. 0 0
      include/grass/defs/raster.h
  45. 0 0
      include/grass/defs/raster3d.h
  46. 0 0
      include/grass/defs/rbtree.h
  47. 0 0
      include/grass/defs/rowio.h
  48. 0 0
      include/grass/defs/segment.h
  49. 0 0
      include/grass/defs/spawn.h
  50. 0 0
      include/grass/defs/sqlp.h
  51. 0 0
      include/grass/defs/stats.h
  52. 0 0
      include/grass/defs/symbol.h
  53. 0 0
      include/grass/defs/vector.h
  54. 0 0
      include/grass/defs/vedit.h
  55. 0 0
      include/grass/display.h
  56. 0 0
      include/grass/fontcap.h
  57. 0 0
      include/grass/form.h
  58. 0 0
      include/grass/gis.h
  59. 0 0
      include/grass/glocale.h
  60. 0 0
      include/grass/gmath.h
  61. 0 0
      include/grass/gprojects.h
  62. 0 0
      include/grass/imagery.h
  63. 0 0
      include/grass/iostream/ami.h
  64. 0 0
      include/grass/iostream/ami_config.h
  65. 0 0
      include/grass/iostream/ami_sort.h
  66. 0 0
      include/grass/iostream/ami_sort_impl.h
  67. 0 0
      include/grass/iostream/ami_stream.h
  68. 0 0
      include/grass/iostream/embuffer.h
  69. 0 0
      include/grass/iostream/empq.h
  70. 0 0
      include/grass/iostream/empq_adaptive.h
  71. 0 0
      include/grass/iostream/empq_adaptive_impl.h
  72. 0 0
      include/grass/iostream/empq_impl.h
  73. 0 0
      include/grass/iostream/imbuffer.h
  74. 0 0
      include/grass/iostream/mem_stream.h
  75. 0 0
      include/grass/iostream/minmaxheap.h
  76. 0 0
      include/grass/iostream/mm.h
  77. 0 0
      include/grass/iostream/mm_utils.h
  78. 0 0
      include/grass/iostream/pqheap.h
  79. 0 0
      include/grass/iostream/queue.h
  80. 0 0
      include/grass/iostream/quicksort.h
  81. 0 0
      include/grass/iostream/replacementHeap.h
  82. 0 0
      include/grass/iostream/replacementHeapBlock.h
  83. 0 0
      include/grass/iostream/rtimer.h
  84. 0 0
      include/grass/la.h
  85. 0 0
      include/grass/lapack.h
  86. 0 0
      include/grass/linkm.h
  87. 0 0
      include/grass/manage.h
  88. 0 0
      include/grass/neta.h
  89. 0 0
      include/grass/nviz.h
  90. 0 0
      include/grass/ogsf.h
  91. 0 0
      include/grass/ortholib.h
  92. 0 0
      include/grass/raster.h
  93. 0 0
      include/grass/raster3d.h
  94. 0 0
      include/grass/rbtree.h
  95. 0 0
      include/grass/rowio.h
  96. 0 0
      include/grass/segment.h
  97. 0 0
      include/grass/spawn.h
  98. 0 0
      include/grass/sqlp.h
  99. 0 0
      include/grass/stats.h
  100. 0 0
      include/symbol.h

+ 2 - 2
.gitignore

@@ -18,8 +18,8 @@ gui/wxpython/xml/module_tree_menudata.xml
 include/Make/Doxyfile_arch_html
 include/Make/Doxyfile_arch_html
 include/Make/Doxyfile_arch_latex
 include/Make/Doxyfile_arch_latex
 include/Make/Platform.make
 include/Make/Platform.make
-include/config.h
-include/version.h
+include/grass/config.h
+include/grass/version.h
 lib/db/sqlp/sqlp.output
 lib/db/sqlp/sqlp.output
 lib/db/sqlp/sqlp.tab.c
 lib/db/sqlp/sqlp.tab.c
 lib/db/sqlp/sqlp.tab.h
 lib/db/sqlp/sqlp.tab.h

+ 1 - 1
Makefile

@@ -122,7 +122,7 @@ libsclean: cleandistdirs
 distclean: clean
 distclean: clean
 	-rm -f config.cache config.log config.status config.status.$(ARCH) 2>/dev/null
 	-rm -f config.cache config.log config.status config.status.$(ARCH) 2>/dev/null
 	-rm -f ChangeLog ChangeLog.bak $(ERRORLOG) grass.pc
 	-rm -f ChangeLog ChangeLog.bak $(ERRORLOG) grass.pc
-	-rm -f include/config.h include/version.h
+	-rm -f include/grass/config.h include/grass/version.h
 	-rm -f include/Make/Platform.make include/Make/Doxyfile_arch_html include/Make/Doxyfile_arch_latex 2>/dev/null
 	-rm -f include/Make/Platform.make include/Make/Doxyfile_arch_html include/Make/Doxyfile_arch_latex 2>/dev/null
 
 
 include $(MODULE_TOPDIR)/include/Make/Install.make
 include $(MODULE_TOPDIR)/include/Make/Install.make

+ 3 - 3
configure

@@ -14181,7 +14181,7 @@ done
 ac_given_srcdir=$srcdir
 ac_given_srcdir=$srcdir
 ac_given_INSTALL="$INSTALL"
 ac_given_INSTALL="$INSTALL"
 
 
-trap 'rm -fr `echo "include/Make/Platform.make include/Make/Doxyfile_arch_html include/Make/Doxyfile_arch_latex include/version.h grass.pc include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "include/Make/Platform.make include/Make/Doxyfile_arch_html include/Make/Doxyfile_arch_latex include/grass/version.h grass.pc include/grass/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 EOF
 EOF
 cat >> $CONFIG_STATUS <<EOF
 cat >> $CONFIG_STATUS <<EOF
 
 
@@ -14435,7 +14435,7 @@ EOF
 
 
 cat >> $CONFIG_STATUS <<EOF
 cat >> $CONFIG_STATUS <<EOF
 
 
-CONFIG_FILES=\${CONFIG_FILES-"include/Make/Platform.make include/Make/Doxyfile_arch_html include/Make/Doxyfile_arch_latex include/version.h grass.pc"}
+CONFIG_FILES=\${CONFIG_FILES-"include/Make/Platform.make include/Make/Doxyfile_arch_html include/Make/Doxyfile_arch_latex include/grass/version.h grass.pc"}
 EOF
 EOF
 cat >> $CONFIG_STATUS <<\EOF
 cat >> $CONFIG_STATUS <<\EOF
 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
@@ -14516,7 +14516,7 @@ ac_eD='%g'
 if test "${CONFIG_HEADERS+set}" != set; then
 if test "${CONFIG_HEADERS+set}" != set; then
 EOF
 EOF
 cat >> $CONFIG_STATUS <<EOF
 cat >> $CONFIG_STATUS <<EOF
-  CONFIG_HEADERS="include/config.h"
+  CONFIG_HEADERS="include/grass/config.h"
 EOF
 EOF
 cat >> $CONFIG_STATUS <<\EOF
 cat >> $CONFIG_STATUS <<\EOF
 fi
 fi

+ 2 - 2
configure.in

@@ -31,7 +31,7 @@ $2
 AC_INIT(configure.in)
 AC_INIT(configure.in)
 AC_PREREQ(2.13)
 AC_PREREQ(2.13)
 AC_PREFIX_DEFAULT(/usr/local)
 AC_PREFIX_DEFAULT(/usr/local)
-AC_CONFIG_HEADER(include/config.h)
+AC_CONFIG_HEADER(include/grass/config.h)
 AC_CANONICAL_HOST
 AC_CANONICAL_HOST
 AC_PROG_CC
 AC_PROG_CC
 LOC_EXEEXT
 LOC_EXEEXT
@@ -1987,7 +1987,7 @@ AC_SUBST(STRIPFLAG)
 GRASS_HOME="${DSTDIR}"
 GRASS_HOME="${DSTDIR}"
 AC_SUBST(GRASS_HOME)
 AC_SUBST(GRASS_HOME)
 
 
-AC_OUTPUT(include/Make/Platform.make include/Make/Doxyfile_arch_html include/Make/Doxyfile_arch_latex include/version.h grass.pc)
+AC_OUTPUT(include/Make/Platform.make include/Make/Doxyfile_arch_html include/Make/Doxyfile_arch_latex include/grass/version.h grass.pc)
 
 
 LOC_MSG([Copying config.status to config.status.${ARCH}])
 LOC_MSG([Copying config.status to config.status.${ARCH}])
 cp -f config.status config.status.${ARCH}
 cp -f config.status config.status.${ARCH}

+ 4 - 36
include/Makefile

@@ -3,38 +3,10 @@ MODULE_TOPDIR = ..
 include $(MODULE_TOPDIR)/include/Make/Vars.make
 include $(MODULE_TOPDIR)/include/Make/Vars.make
 include $(MODULE_TOPDIR)/include/Make/Rules.make
 include $(MODULE_TOPDIR)/include/Make/Rules.make
 
 
-SRCH := $(wildcard ../include/*.h ../include/defs/*.h ../include/vect/*.h ../include/iostream/*.h)
-DSTH := $(patsubst ../include/%.h,$(ARCH_INCDIR)/%.h,$(SRCH))
-DSTH_EXTRA = $(ARCH_INCDIR)/copying.h $(ARCH_INCDIR)/citing.h $(ARCH_INCDIR)/confparms.h
-
 SRCMAKE := $(wildcard ../include/Make/*.make)
 SRCMAKE := $(wildcard ../include/Make/*.make)
 DSTMAKE := $(patsubst ../include/Make/%.make,$(ARCH_DISTDIR)/include/Make/%.make,$(SRCMAKE))
 DSTMAKE := $(patsubst ../include/Make/%.make,$(ARCH_DISTDIR)/include/Make/%.make,$(SRCMAKE))
 
 
-default: $(DSTH) $(DSTH_EXTRA) $(DSTMAKE)
-
-# cancel rule from Rules.make
-$(ARCH_INCDIR)/%.h: %.h
-
-$(ARCH_INCDIR)/defs/%.h: defs/%.h | $(ARCH_INCDIR)/defs
-	$(INSTALL_DATA) $< $@
-
-$(ARCH_INCDIR)/vect/%.h: vect/%.h | $(ARCH_INCDIR)/vect
-	$(INSTALL_DATA) $< $@
-
-$(ARCH_INCDIR)/iostream/%.h: iostream/%.h | $(ARCH_INCDIR)/iostream
-	$(INSTALL_DATA) $< $@
-
-$(ARCH_INCDIR)/%.h: %.h | $(ARCH_INCDIR)
-	$(INSTALL_DATA) $< $@
-
-$(ARCH_INCDIR)/defs: | $(ARCH_INCDIR)
-	$(MKDIR) $@
-
-$(ARCH_INCDIR)/vect: | $(ARCH_INCDIR)
-	$(MKDIR) $@
-
-$(ARCH_INCDIR)/iostream: | $(ARCH_INCDIR)
-	$(MKDIR) $@
+default: $(DSTMAKE) parsubdirs
 
 
 $(ARCH_DISTDIR)/include/Make/%.make: Make/%.make | $(ARCH_DISTDIR)/include/Make
 $(ARCH_DISTDIR)/include/Make/%.make: Make/%.make | $(ARCH_DISTDIR)/include/Make
 	$(INSTALL_DATA) $< $@
 	$(INSTALL_DATA) $< $@
@@ -42,11 +14,7 @@ $(ARCH_DISTDIR)/include/Make/%.make: Make/%.make | $(ARCH_DISTDIR)/include/Make
 $(ARCH_DISTDIR)/include/Make:
 $(ARCH_DISTDIR)/include/Make:
 	$(MKDIR) $@
 	$(MKDIR) $@
 
 
-$(ARCH_INCDIR)/copying.h: $(MODULE_TOPDIR)/COPYING | $(ARCH_INCDIR)
-	sed -e 's/^\(.*\)$$/"\1\\n"/' $< > $@
-
-$(ARCH_INCDIR)/citing.h: $(MODULE_TOPDIR)/CITING | $(ARCH_INCDIR)
-	sed -e 's/^\(.*\)$$/"\1\\n"/' $< > $@
+SUBDIRS = \
+	grass
 
 
-$(ARCH_INCDIR)/confparms.h: $(MODULE_TOPDIR)/config.status | $(ARCH_INCDIR)
-	sed -n '7s/^#\(.*\)$$/"\1"/p' $< > $@
+include $(MODULE_TOPDIR)/include/Make/Dir.make

+ 43 - 0
include/grass/Makefile

@@ -0,0 +1,43 @@
+MODULE_TOPDIR = ../..
+
+include $(MODULE_TOPDIR)/include/Make/Vars.make
+include $(MODULE_TOPDIR)/include/Make/Rules.make
+
+SRCH := $(wildcard ../../include/grass/*.h ../../include/grass/defs/*.h ../../include/grass/vect/*.h ../../include/grass/iostream/*.h)
+DSTH := $(patsubst ../../include/grass/%.h,$(ARCH_INCDIR)/%.h,$(SRCH))
+DSTH_EXTRA = $(ARCH_INCDIR)/copying.h $(ARCH_INCDIR)/citing.h $(ARCH_INCDIR)/confparms.h
+
+default: $(DSTH) $(DSTH_EXTRA)
+
+# cancel rule from Rules.make
+$(ARCH_INCDIR)/%.h: %.h
+
+$(ARCH_INCDIR)/defs/%.h: defs/%.h | $(ARCH_INCDIR)/defs
+	$(INSTALL_DATA) $< $@
+
+$(ARCH_INCDIR)/vect/%.h: vect/%.h | $(ARCH_INCDIR)/vect
+	$(INSTALL_DATA) $< $@
+
+$(ARCH_INCDIR)/iostream/%.h: iostream/%.h | $(ARCH_INCDIR)/iostream
+	$(INSTALL_DATA) $< $@
+
+$(ARCH_INCDIR)/%.h: %.h | $(ARCH_INCDIR)
+	$(INSTALL_DATA) $< $@
+
+$(ARCH_INCDIR)/defs: | $(ARCH_INCDIR)
+	$(MKDIR) $@
+
+$(ARCH_INCDIR)/vect: | $(ARCH_INCDIR)
+	$(MKDIR) $@
+
+$(ARCH_INCDIR)/iostream: | $(ARCH_INCDIR)
+	$(MKDIR) $@
+
+$(ARCH_INCDIR)/copying.h: $(MODULE_TOPDIR)/COPYING | $(ARCH_INCDIR)
+	sed -e 's/^\(.*\)$$/"\1\\n"/' $< > $@
+
+$(ARCH_INCDIR)/citing.h: $(MODULE_TOPDIR)/CITING | $(ARCH_INCDIR)
+	sed -e 's/^\(.*\)$$/"\1\\n"/' $< > $@
+
+$(ARCH_INCDIR)/confparms.h: $(MODULE_TOPDIR)/config.status | $(ARCH_INCDIR)
+	sed -n '7s/^#\(.*\)$$/"\1"/p' $< > $@

include/arraystats.h → include/grass/arraystats.h


include/bitmap.h → include/grass/bitmap.h


include/blas.h → include/grass/blas.h


include/btree.h → include/grass/btree.h


include/calc.h → include/grass/calc.h


include/cdhc.h → include/grass/cdhc.h


include/cluster.h → include/grass/cluster.h


include/colors.h → include/grass/colors.h


include/config.h.in → include/grass/config.h.in


include/datetime.h → include/grass/datetime.h


include/dbmi.h → include/grass/dbmi.h


include/defs/Paintlib.h → include/grass/defs/Paintlib.h


include/defs/arraystats.h → include/grass/defs/arraystats.h


include/defs/bitmap.h → include/grass/defs/bitmap.h


include/defs/btree.h → include/grass/defs/btree.h


include/defs/calc.h → include/grass/defs/calc.h


include/defs/cdhc.h → include/grass/defs/cdhc.h


include/defs/cluster.h → include/grass/defs/cluster.h


include/defs/colors.h → include/grass/defs/colors.h


include/defs/datetime.h → include/grass/defs/datetime.h


include/defs/dbmi.h → include/grass/defs/dbmi.h


include/defs/devlib.h → include/grass/defs/devlib.h


include/defs/dig_atts.h → include/grass/defs/dig_atts.h


include/defs/display.h → include/grass/defs/display.h


include/defs/form.h → include/grass/defs/form.h


include/defs/gis.h → include/grass/defs/gis.h


include/defs/glocale.h → include/grass/defs/glocale.h


include/defs/gmath.h → include/grass/defs/gmath.h


include/defs/gprojects.h → include/grass/defs/gprojects.h


include/defs/imagery.h → include/grass/defs/imagery.h


include/defs/la.h → include/grass/defs/la.h


include/defs/linkm.h → include/grass/defs/linkm.h


include/defs/manage.h → include/grass/defs/manage.h


include/defs/neta.h → include/grass/defs/neta.h


include/defs/nviz.h → include/grass/defs/nviz.h


include/defs/ogsf.h → include/grass/defs/ogsf.h


include/defs/ortholib.h → include/grass/defs/ortholib.h


include/defs/raster.h → include/grass/defs/raster.h


include/defs/raster3d.h → include/grass/defs/raster3d.h


include/defs/rbtree.h → include/grass/defs/rbtree.h


include/defs/rowio.h → include/grass/defs/rowio.h


include/defs/segment.h → include/grass/defs/segment.h


include/defs/spawn.h → include/grass/defs/spawn.h


include/defs/sqlp.h → include/grass/defs/sqlp.h


include/defs/stats.h → include/grass/defs/stats.h


include/defs/symbol.h → include/grass/defs/symbol.h


include/defs/vector.h → include/grass/defs/vector.h


include/defs/vedit.h → include/grass/defs/vedit.h


include/display.h → include/grass/display.h


include/fontcap.h → include/grass/fontcap.h


include/form.h → include/grass/form.h


include/gis.h → include/grass/gis.h


include/glocale.h → include/grass/glocale.h


include/gmath.h → include/grass/gmath.h


include/gprojects.h → include/grass/gprojects.h


include/imagery.h → include/grass/imagery.h


include/iostream/ami.h → include/grass/iostream/ami.h


include/iostream/ami_config.h → include/grass/iostream/ami_config.h


include/iostream/ami_sort.h → include/grass/iostream/ami_sort.h


include/iostream/ami_sort_impl.h → include/grass/iostream/ami_sort_impl.h


include/iostream/ami_stream.h → include/grass/iostream/ami_stream.h


include/iostream/embuffer.h → include/grass/iostream/embuffer.h


include/iostream/empq.h → include/grass/iostream/empq.h


include/iostream/empq_adaptive.h → include/grass/iostream/empq_adaptive.h


include/iostream/empq_adaptive_impl.h → include/grass/iostream/empq_adaptive_impl.h


include/iostream/empq_impl.h → include/grass/iostream/empq_impl.h


include/iostream/imbuffer.h → include/grass/iostream/imbuffer.h


include/iostream/mem_stream.h → include/grass/iostream/mem_stream.h


include/iostream/minmaxheap.h → include/grass/iostream/minmaxheap.h


include/iostream/mm.h → include/grass/iostream/mm.h


include/iostream/mm_utils.h → include/grass/iostream/mm_utils.h


include/iostream/pqheap.h → include/grass/iostream/pqheap.h


include/iostream/queue.h → include/grass/iostream/queue.h


include/iostream/quicksort.h → include/grass/iostream/quicksort.h


include/iostream/replacementHeap.h → include/grass/iostream/replacementHeap.h


include/iostream/replacementHeapBlock.h → include/grass/iostream/replacementHeapBlock.h


include/iostream/rtimer.h → include/grass/iostream/rtimer.h


include/la.h → include/grass/la.h


include/lapack.h → include/grass/lapack.h


include/linkm.h → include/grass/linkm.h


include/manage.h → include/grass/manage.h


include/neta.h → include/grass/neta.h


include/nviz.h → include/grass/nviz.h


include/ogsf.h → include/grass/ogsf.h


include/ortholib.h → include/grass/ortholib.h


include/raster.h → include/grass/raster.h


include/raster3d.h → include/grass/raster3d.h


include/rbtree.h → include/grass/rbtree.h


include/rowio.h → include/grass/rowio.h


include/segment.h → include/grass/segment.h


include/spawn.h → include/grass/spawn.h


include/sqlp.h → include/grass/sqlp.h


include/stats.h → include/grass/stats.h


+ 0 - 0
include/symbol.h


Some files were not shown because too many files changed in this diff