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>
This commit is contained in:
Diego Elio Pettenò 2012-06-29 13:01:19 -07:00 committed by Harald Welte
parent ea0e1eca2b
commit d471a21920
11 changed files with 105 additions and 78 deletions

View File

@ -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

View File

@ -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' $< > $@

View File

@ -1,5 +0,0 @@
if ENABLE_VTY
SUBDIRS = vty codec crypt gsm gprs core
else
SUBDIRS = codec crypt gsm gprs core
endif

View File

@ -1,3 +0,0 @@
osmocodec_HEADERS = codec.h
osmocodecdir = $(includedir)/osmocom/codec

View File

@ -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' $< > $@

View File

@ -1,3 +0,0 @@
osmocrypt_HEADERS = gprs_cipher.h auth.h
osmocryptdir = $(includedir)/osmocom/crypt

View File

@ -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

View File

@ -1,3 +0,0 @@
libgbp_HEADERS = gsm_08_16.h gsm_08_18.h
libgbpdir = $(includedir)/osmocom/gprs/protocol

View File

@ -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

View File

@ -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

View File

@ -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