From 9608320702e8dba9947987cd34001824638c434e Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 22 Nov 1999 13:41:11 +0000 Subject: Patch rtems-rc-19991117-4.diff from Ralf Corsepius : .. a major configuration cleanup ... major enhancement of automake support. ... and it contains a *major* breakthough: Automake support for libchip and libmisc *LEAF* directories. To implement this I have used several nasty tricks * The basical trick is to wrap an old Makefile.in's contents into a Makefile.am and still continue to use (i.e include) the old *.cfg files. * Replaced each INSTALL_IF_CHANGE and INSTALL_VARIANT with make dependencies * Add a gnu-make ifdef AUTOMAKE to main.cfg to avoid conflicts between automake and RTEMS make rules * Replaced each install:: and preinstall:: rule with make dependencies * Replaced SUB_DIRS with SUBDIRS in all Makefile.ins (Automake convention) * Removed each manually added autoconf substitution which automake performs automatically. This is not yet full automake support, because using the temporary installation directory, preinstallation in general and building variants are in contradiction to automake's basic working principles ... ... the new Makefile.ams work still somewhat clumsy ... nevertheless they work (quite well). WARNING: At first glance this patch is small, but * it affects the whole configuration system. * it opens the road to introducing automake to all Makefile.ins currently not being under automake control. JOEL> Does this remove or add any files? Both, all Makefile.ins below libchip and libmisc get replaced with Makefile.ams. --- c/src/exec/posix/configure.in | 2 +- c/src/exec/posix/include/Makefile.am | 12 ++++++------ c/src/exec/posix/include/rtems/posix/Makefile.am | 23 ++++++++++++----------- c/src/exec/posix/include/sys/Makefile.am | 12 ++++++------ c/src/exec/posix/inline/rtems/posix/Makefile.am | 16 ++++++++-------- c/src/exec/posix/macros/rtems/posix/Makefile.am | 14 +++++++------- 6 files changed, 40 insertions(+), 39 deletions(-) (limited to 'c/src/exec/posix') diff --git a/c/src/exec/posix/configure.in b/c/src/exec/posix/configure.in index 3ca21f4d9c..84e04baadf 100644 --- a/c/src/exec/posix/configure.in +++ b/c/src/exec/posix/configure.in @@ -14,7 +14,6 @@ AM_MAINTAINER_MODE RTEMS_ENABLE_MULTIPROCESSING RTEMS_ENABLE_POSIX -RTEMS_ENABLE_POSIX RTEMS_ENABLE_INLINES RTEMS_ENV_RTEMSBSP @@ -48,6 +47,7 @@ else fi AM_CONDITIONAL(INLINE,test "$INLINEdir" = "inline" ) AM_CONDITIONAL(MACROS,test "$INLINEdir" = "macros" ) +AM_CONDITIONAL(HAS_MP,test "$HAS_MP" = "yes" ) ## Needed when using automake for libs/rels RTEMS_CHECK_NEWLIB diff --git a/c/src/exec/posix/include/Makefile.am b/c/src/exec/posix/include/Makefile.am index 57e98bd79d..01adb60973 100644 --- a/c/src/exec/posix/include/Makefile.am +++ b/c/src/exec/posix/include/Makefile.am @@ -6,11 +6,11 @@ AUTOMAKE_OPTIONS = foreign 1.4 ## RTEMS unistd.h needs to be checked against newlib's and removed #noinst_HEADERS= devctl.h intr.h -H_PIECES = pthread.h sched.h aio.h mqueue.h semaphore.h +H_FILES = pthread.h sched.h aio.h mqueue.h semaphore.h -noinst_HEADERS = $(H_PIECES) +noinst_HEADERS = $(H_FILES) -TMPINSTALL_FILES = \ +PREINSTALL_FILES = \ $(PROJECT_INCLUDE) \ $(noinst_HEADERS:%=$(PROJECT_INCLUDE)/%) @@ -19,9 +19,9 @@ $(PROJECT_INCLUDE): $(PROJECT_INCLUDE)/%.h: %.h $(INSTALL_DATA) $< $@ -all-am: $(TMPINSTALL_FILES) -debug-am: $(TMPINSTALL_FILES) -profile-am: $(TMPINSTALL_FILES) +all-am: $(PREINSTALL_FILES) +debug-am: $(PREINSTALL_FILES) +profile-am: $(PREINSTALL_FILES) SUBDIRS = rtems sys diff --git a/c/src/exec/posix/include/rtems/posix/Makefile.am b/c/src/exec/posix/include/rtems/posix/Makefile.am index accf79b5ed..59bf3c281d 100644 --- a/c/src/exec/posix/include/rtems/posix/Makefile.am +++ b/c/src/exec/posix/include/rtems/posix/Makefile.am @@ -4,28 +4,29 @@ AUTOMAKE_OPTIONS = foreign 1.4 +if HAS_MP ## We only build multiprocessing related files if HAS_MP was defined -MP_H_PIECES_yes_V = condmp.h mqueuemp.h mutexmp.h pthreadmp.h semaphoremp.h -MP_H_PIECES = $(MP_H_PIECES_$(HAS_MP)_V) +MP_H_FILES = condmp.h mqueuemp.h mutexmp.h pthreadmp.h semaphoremp.h +endif -H_PIECES = cancel.h cond.h config.h key.h mqueue.h mutex.h posixapi.h \ +H_FILES = cancel.h cond.h config.h key.h mqueue.h mutex.h posixapi.h \ priority.h psignal.h pthread.h ptimer.h semaphore.h seterr.h threadsup.h \ - time.h timer.h $(MP_H_PIECES) -#H_PIECES= intr.h threadsup.h time.h + time.h timer.h $(MP_H_FILES) +#H_FILES= intr.h threadsup.h time.h -noinst_HEADERS = $(H_PIECES) +noinst_HEADERS = $(H_FILES) -TMPINSTALL_FILES = \ +PREINSTALL_FILES = \ $(PROJECT_INCLUDE)/rtems/posix \ -$(H_PIECES:%=$(PROJECT_INCLUDE)/rtems/posix/%) +$(H_FILES:%=$(PROJECT_INCLUDE)/rtems/posix/%) $(PROJECT_INCLUDE)/rtems/posix: @$(mkinstalldirs) $@ $(PROJECT_INCLUDE)/rtems/posix/%.h: %.h $(INSTALL_DATA) $< $@ -all-am: $(TMPINSTALL_FILES) -debug-am: $(TMPINSTALL_FILES) -profile-am: $(TMPINSTALL_FILES) +all-am: $(PREINSTALL_FILES) +debug-am: $(PREINSTALL_FILES) +profile-am: $(PREINSTALL_FILES) include $(top_srcdir)/../../../../automake/local.am diff --git a/c/src/exec/posix/include/sys/Makefile.am b/c/src/exec/posix/include/sys/Makefile.am index 04a1fc00c7..2ac2975304 100644 --- a/c/src/exec/posix/include/sys/Makefile.am +++ b/c/src/exec/posix/include/sys/Makefile.am @@ -4,11 +4,11 @@ AUTOMAKE_OPTIONS = foreign 1.4 -H_PIECES = utsname.h +H_FILES = utsname.h -noinst_HEADERS = $(H_PIECES) +noinst_HEADERS = $(H_FILES) -TMPINSTALL_FILES = \ +PREINSTALL_FILES = \ $(PROJECT_INCLUDE)/sys \ $(noinst_HEADERS:%=$(PROJECT_INCLUDE)/sys/%) @@ -17,8 +17,8 @@ $(PROJECT_INCLUDE)/sys: $(PROJECT_INCLUDE)/sys/%.h: %.h $(INSTALL_DATA) $< $@ -all-am: $(TMPINSTALL_FILES) -debug-am: $(TMPINSTALL_FILES) -profile-am: $(TMPINSTALL_FILES) +all-am: $(PREINSTALL_FILES) +debug-am: $(PREINSTALL_FILES) +profile-am: $(PREINSTALL_FILES) include $(top_srcdir)/../../../../automake/local.am diff --git a/c/src/exec/posix/inline/rtems/posix/Makefile.am b/c/src/exec/posix/inline/rtems/posix/Makefile.am index 01c6016324..be7b9cf367 100644 --- a/c/src/exec/posix/inline/rtems/posix/Makefile.am +++ b/c/src/exec/posix/inline/rtems/posix/Makefile.am @@ -4,15 +4,15 @@ AUTOMAKE_OPTIONS = foreign 1.4 if INLINE -#I_PIECES= intr.inl -I_PIECES = cond.inl key.inl mqueue.inl mutex.inl pthread.inl priority.inl \ +#I_FILES= intr.inl +I_FILES = cond.inl key.inl mqueue.inl mutex.inl pthread.inl priority.inl \ semaphore.inl -noinst_HEADERS = $(I_PIECES) +noinst_HEADERS = $(I_FILES) -TMPINSTALL_FILES = \ +PREINSTALL_FILES = \ $(PROJECT_INCLUDE)/rtems/posix \ -$(I_PIECES:%=$(PROJECT_INCLUDE)/rtems/posix/%) +$(I_FILES:%=$(PROJECT_INCLUDE)/rtems/posix/%) $(PROJECT_INCLUDE)/rtems/posix: @$(mkinstalldirs) $@ @@ -20,9 +20,9 @@ $(PROJECT_INCLUDE)/rtems/posix/%.inl: %.inl $(INSTALL_DATA) $< $@ endif -all-am: $(TMPINSTALL_FILES) -debug-am: $(TMPINSTALL_FILES) -profile-am: $(TMPINSTALL_FILES) +all-am: $(PREINSTALL_FILES) +debug-am: $(PREINSTALL_FILES) +profile-am: $(PREINSTALL_FILES) EXTRA_DIST = intr.inl diff --git a/c/src/exec/posix/macros/rtems/posix/Makefile.am b/c/src/exec/posix/macros/rtems/posix/Makefile.am index 3b563a0132..32f810b57c 100644 --- a/c/src/exec/posix/macros/rtems/posix/Makefile.am +++ b/c/src/exec/posix/macros/rtems/posix/Makefile.am @@ -5,13 +5,13 @@ AUTOMAKE_OPTIONS = foreign 1.4 if MACROS -I_PIECES = +I_FILES = -noinst_HEADERS = $(I_PIECES) +noinst_HEADERS = $(I_FILES) -TMPINSTALL_FILES = \ +PREINSTALL_FILES = \ $(PROJECT_INCLUDE)/rtems/posix \ -$(I_PIECES:%=$(PROJECT_INCLUDE)/rtems/posix/%) +$(I_FILES:%=$(PROJECT_INCLUDE)/rtems/posix/%) $(PROJECT_INCLUDE)/rtems/posix: @$(mkinstalldirs) $@ @@ -19,8 +19,8 @@ $(PROJECT_INCLUDE)/rtems/posix/%.inl: %.inl $(INSTALL_DATA) $< $@ endif -all-am: $(TMPINSTALL_FILES) -debug-am: $(TMPINSTALL_FILES) -profile-am: $(TMPINSTALL_FILES) +all-am: $(PREINSTALL_FILES) +debug-am: $(PREINSTALL_FILES) +profile-am: $(PREINSTALL_FILES) include $(top_srcdir)/../../../../automake/local.am -- cgit v1.2.3