summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@flameeyes.eu>2012-06-29 13:01:19 -0700
committerHarald Welte <laforge@gnumonks.org>2012-06-30 22:01:43 +0200
commitd471a2192015440ec9b8c409268ba6433511f421 (patch)
treed5471b576480d0e670595d4163630616145d6dfc
parentea0e1eca2bc32b531242a3b0a3c471e492a6f493 (diff)
build: simplify headers management and remove recursion
There is no real reason to keep the include directory a multi-level recursion, so instead declare everything within include (so that we can use proper nobase_ declarations) and be it. Please note that since we removed the sub-Makefile.am, ./configure will not create the directory structure for us on out-of-tree builds, so we have to make sure the directory we're generating to exists first. Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
-rw-r--r--configure.ac10
-rw-r--r--include/Makefile.am105
-rw-r--r--include/osmocom/Makefile.am5
-rw-r--r--include/osmocom/codec/Makefile.am3
-rw-r--r--include/osmocom/core/Makefile.am31
-rw-r--r--include/osmocom/crypt/Makefile.am3
-rw-r--r--include/osmocom/gprs/Makefile.am5
-rw-r--r--include/osmocom/gprs/protocol/Makefile.am3
-rw-r--r--include/osmocom/gsm/Makefile.am8
-rw-r--r--include/osmocom/gsm/protocol/Makefile.am6
-rw-r--r--include/osmocom/vty/Makefile.am4
11 files changed, 105 insertions, 78 deletions
diff --git a/configure.ac b/configure.ac
index 7c62f8f1..728173e4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,6 +10,7 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
dnl checks for programs
AC_PROG_MAKE_SET
+AC_PROG_MKDIR_P
AC_PROG_CC
AC_PROG_INSTALL
LT_INIT
@@ -138,15 +139,6 @@ AC_OUTPUT(
libosmovty.pc
libosmogsm.pc
libosmogb.pc
- include/osmocom/Makefile
- include/osmocom/vty/Makefile
- include/osmocom/codec/Makefile
- include/osmocom/crypt/Makefile
- include/osmocom/gsm/Makefile
- include/osmocom/gsm/protocol/Makefile
- include/osmocom/gprs/Makefile
- include/osmocom/gprs/protocol/Makefile
- include/osmocom/core/Makefile
include/Makefile
src/Makefile
src/vty/Makefile
diff --git a/include/Makefile.am b/include/Makefile.am
index 3578a80e..1eae2dd1 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -1 +1,104 @@
-SUBDIRS = osmocom
+nobase_include_HEADERS = \
+ osmocom/codec/codec.h \
+ osmocom/core/application.h \
+ osmocom/core/backtrace.h \
+ osmocom/core/bits.h \
+ osmocom/core/bitvec.h \
+ osmocom/core/conv.h \
+ osmocom/core/crc16.h \
+ osmocom/core/crc16gen.h \
+ osmocom/core/crc32gen.h \
+ osmocom/core/crc64gen.h \
+ osmocom/core/crc8gen.h \
+ osmocom/core/crcgen.h \
+ osmocom/core/gsmtap.h \
+ osmocom/core/gsmtap_util.h \
+ osmocom/core/linuxlist.h \
+ osmocom/core/linuxrbtree.h \
+ osmocom/core/logging.h \
+ osmocom/core/msgb.h \
+ osmocom/core/panic.h \
+ osmocom/core/prim.h \
+ osmocom/core/process.h \
+ osmocom/core/rate_ctr.h \
+ osmocom/core/select.h \
+ osmocom/core/signal.h \
+ osmocom/core/socket.h \
+ osmocom/core/statistics.h \
+ osmocom/core/timer.h \
+ osmocom/core/utils.h \
+ osmocom/core/write_queue.h \
+ osmocom/crypt/auth.h \
+ osmocom/crypt/gprs_cipher.h \
+ osmocom/gprs/gprs_bssgp.h \
+ osmocom/gprs/gprs_msgb.h \
+ osmocom/gprs/gprs_ns.h \
+ osmocom/gprs/gprs_ns_frgre.h \
+ osmocom/gprs/protocol/gsm_08_16.h \
+ osmocom/gprs/protocol/gsm_08_18.h \
+ osmocom/gsm/a5.h \
+ osmocom/gsm/abis_nm.h \
+ osmocom/gsm/comp128.h \
+ osmocom/gsm/gan.h \
+ osmocom/gsm/gsm0411_smc.h \
+ osmocom/gsm/gsm0411_smr.h \
+ osmocom/gsm/gsm0411_utils.h \
+ osmocom/gsm/gsm0480.h \
+ osmocom/gsm/gsm0502.h \
+ osmocom/gsm/gsm0808.h \
+ osmocom/gsm/gsm48.h \
+ osmocom/gsm/gsm48_ie.h \
+ osmocom/gsm/gsm_utils.h \
+ osmocom/gsm/lapd_core.h \
+ osmocom/gsm/lapdm.h \
+ osmocom/gsm/mncc.h \
+ osmocom/gsm/prim.h \
+ osmocom/gsm/protocol/gsm_03_41.h \
+ osmocom/gsm/protocol/gsm_04_08.h \
+ osmocom/gsm/protocol/gsm_04_11.h \
+ osmocom/gsm/protocol/gsm_04_12.h \
+ osmocom/gsm/protocol/gsm_04_80.h \
+ osmocom/gsm/protocol/gsm_08_08.h \
+ osmocom/gsm/protocol/gsm_08_58.h \
+ osmocom/gsm/protocol/gsm_12_21.h \
+ osmocom/gsm/protocol/gsm_44_318.h \
+ osmocom/gsm/protocol/ipaccess.h \
+ osmocom/gsm/rsl.h \
+ osmocom/gsm/rxlev_stat.h \
+ osmocom/gsm/sysinfo.h \
+ osmocom/gsm/tlv.h
+
+if ENABLE_PLUGIN
+nobase_include_HEADERS += osmocom/core/plugin.h
+endif
+
+if ENABLE_TALLOC
+nobase_include_HEADERS += osmocom/core/talloc.h
+endif
+
+if ENABLE_MSGFILE
+nobase_include_HEADERS += osmocom/core/msgfile.h
+endif
+
+if ENABLE_SERIAL
+nobase_include_HEADERS += osmocom/core/serial.h
+endif
+
+
+if ENABLE_VTY
+nobase_include_HEADERS += \
+ osmocom/vty/buffer.h \
+ osmocom/vty/command.h \
+ osmocom/vty/logging.h \
+ osmocom/vty/misc.h \
+ osmocom/vty/telnet_interface.h \
+ osmocom/vty/vector.h \
+ osmocom/vty/vty.h
+endif
+
+noinst_HEADERS = osmocom/core/timer_compat.h
+
+osmocom/core/crc%gen.h: osmocom/core/crcXXgen.h.tpl
+ $(AM_V_GEN)$(MKDIR_P) $(notdir $@)
+ @echo " SED $< -> $@"
+ @sed -e's/XX/$*/g' $< > $@
diff --git a/include/osmocom/Makefile.am b/include/osmocom/Makefile.am
deleted file mode 100644
index bd3b89bd..00000000
--- a/include/osmocom/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-if ENABLE_VTY
-SUBDIRS = vty codec crypt gsm gprs core
-else
-SUBDIRS = codec crypt gsm gprs core
-endif
diff --git a/include/osmocom/codec/Makefile.am b/include/osmocom/codec/Makefile.am
deleted file mode 100644
index c2136023..00000000
--- a/include/osmocom/codec/Makefile.am
+++ /dev/null
@@ -1,3 +0,0 @@
-osmocodec_HEADERS = codec.h
-
-osmocodecdir = $(includedir)/osmocom/codec
diff --git a/include/osmocom/core/Makefile.am b/include/osmocom/core/Makefile.am
deleted file mode 100644
index 1df111af..00000000
--- a/include/osmocom/core/Makefile.am
+++ /dev/null
@@ -1,31 +0,0 @@
-osmocore_HEADERS = signal.h linuxlist.h timer.h select.h msgb.h bits.h \
- bitvec.h statistics.h utils.h socket.h \
- gsmtap.h write_queue.h prim.h \
- logging.h rate_ctr.h gsmtap_util.h \
- crc16.h panic.h process.h linuxrbtree.h \
- backtrace.h conv.h application.h \
- crcgen.h crc8gen.h crc16gen.h crc32gen.h crc64gen.h
-
-noinst_HEADERS = timer_compat.h
-
-if ENABLE_PLUGIN
-osmocore_HEADERS += plugin.h
-endif
-
-if ENABLE_TALLOC
-osmocore_HEADERS += talloc.h
-endif
-
-if ENABLE_MSGFILE
-osmocore_HEADERS += msgfile.h
-endif
-
-if ENABLE_SERIAL
-osmocore_HEADERS += serial.h
-endif
-
-osmocoredir = $(includedir)/osmocom/core
-
-crc%gen.h: crcXXgen.h.tpl
- @echo " SED $< -> $@"
- @sed -e's/XX/$*/g' $< > $@
diff --git a/include/osmocom/crypt/Makefile.am b/include/osmocom/crypt/Makefile.am
deleted file mode 100644
index e4a6e538..00000000
--- a/include/osmocom/crypt/Makefile.am
+++ /dev/null
@@ -1,3 +0,0 @@
-osmocrypt_HEADERS = gprs_cipher.h auth.h
-
-osmocryptdir = $(includedir)/osmocom/crypt
diff --git a/include/osmocom/gprs/Makefile.am b/include/osmocom/gprs/Makefile.am
deleted file mode 100644
index d39592c1..00000000
--- a/include/osmocom/gprs/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-libgb_HEADERS = gprs_bssgp.h gprs_ns.h gprs_ns_frgre.h gprs_msgb.h
-
-libgbdir = $(includedir)/osmocom/gprs
-
-SUBDIRS = protocol
diff --git a/include/osmocom/gprs/protocol/Makefile.am b/include/osmocom/gprs/protocol/Makefile.am
deleted file mode 100644
index 8255a952..00000000
--- a/include/osmocom/gprs/protocol/Makefile.am
+++ /dev/null
@@ -1,3 +0,0 @@
-libgbp_HEADERS = gsm_08_16.h gsm_08_18.h
-
-libgbpdir = $(includedir)/osmocom/gprs/protocol
diff --git a/include/osmocom/gsm/Makefile.am b/include/osmocom/gsm/Makefile.am
deleted file mode 100644
index 60ba48b9..00000000
--- a/include/osmocom/gsm/Makefile.am
+++ /dev/null
@@ -1,8 +0,0 @@
-osmogsm_HEADERS = a5.h comp128.h gsm0808.h gsm48_ie.h mncc.h rxlev_stat.h \
- gsm0480.h gsm48.h gsm_utils.h rsl.h tlv.h abis_nm.h \
- sysinfo.h prim.h gsm0502.h lapd_core.h lapdm.h \
- gsm0411_utils.h gsm0411_smc.h gsm0411_smr.h gan.h
-
-SUBDIRS = protocol
-
-osmogsmdir = $(includedir)/osmocom/gsm
diff --git a/include/osmocom/gsm/protocol/Makefile.am b/include/osmocom/gsm/protocol/Makefile.am
deleted file mode 100644
index 6ed55e46..00000000
--- a/include/osmocom/gsm/protocol/Makefile.am
+++ /dev/null
@@ -1,6 +0,0 @@
-osmogsm_proto_HEADERS = gsm_03_41.h \
- gsm_04_08.h gsm_04_11.h gsm_04_12.h gsm_04_80.h \
- gsm_08_08.h gsm_08_58.h gsm_44_318.h \
- gsm_12_21.h ipaccess.h
-
-osmogsm_protodir = $(includedir)/osmocom/gsm/protocol
diff --git a/include/osmocom/vty/Makefile.am b/include/osmocom/vty/Makefile.am
deleted file mode 100644
index 83d00107..00000000
--- a/include/osmocom/vty/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-osmovty_HEADERS = buffer.h command.h vector.h vty.h \
- telnet_interface.h logging.h misc.h
-
-osmovtydir = $(includedir)/osmocom/vty