source: rtems/cpukit/posix/Makefile.am @ 2afb22b

Last change on this file since 2afb22b was 2afb22b, checked in by Chris Johns <chrisj@…>, on Dec 23, 2017 at 7:18:56 AM

Remove make preinstall

A speciality of the RTEMS build system was the make preinstall step. It
copied header files from arbitrary locations into the build tree. The
header files were included via the -Bsome/build/tree/path GCC command
line option.

This has at least seven problems:

  • The make preinstall step itself needs time and disk space.
  • Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error.
  • There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult.
  • The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit.
  • An introduction of a new build system is difficult.
  • Include paths specified by the -B option are system headers. This may suppress warnings.
  • The parallel build had sporadic failures on some hosts.

This patch removes the make preinstall step. All installed header
files are moved to dedicated include directories in the source tree.
Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc,
etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g.
erc32, imx, qoriq, etc.

The new cpukit include directories are:

  • cpukit/include
  • cpukit/score/cpu/@RTEMS_CPU@/include
  • cpukit/libnetworking

The new BSP include directories are:

  • bsps/include
  • bsps/@RTEMS_CPU@/include
  • bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include

There are build tree include directories for generated files.

The include directory order favours the most general header file, e.g.
it is not possible to override general header files via the include path
order.

The "bootstrap -p" option was removed. The new "bootstrap -H" option
should be used to regenerate the "headers.am" files.

Update #3254.

  • Property mode set to 100644
File size: 7.0 KB
Line 
1include $(top_srcdir)/automake/multilib.am
2include $(top_srcdir)/automake/compile.am
3
4EXTRA_DIST =
5
6noinst_LIBRARIES = libposix.a
7libposix_a_CPPFLAGS = $(AM_CPPFLAGS)
8libposix_a_SOURCES =
9
10# Some POSIX functions that are nice to always have
11libposix_a_SOURCES += src/nanosleep.c src/clockgettime.c src/clocksettime.c \
12    src/clockgetres.c src/sysconf.c
13
14## Some POSIX threads features are needed all the time
15if HAS_PTHREADS
16# include
17# include/rtems/posix
18## src
19libposix_a_SOURCES += src/aio_cancel.c src/aio_error.c src/aio_fsync.c \
20    src/aio_read.c src/aio_return.c src/aio_suspend.c src/aio_write.c \
21    src/lio_listio.c src/aio_misc.c
22
23libposix_a_SOURCES += src/_execve.c
24endif
25
26libposix_a_SOURCES += src/fork.c src/vfork.c
27
28libposix_a_SOURCES += src/wait.c src/waitpid.c
29libposix_a_SOURCES += src/pthreadgetnamenp.c
30libposix_a_SOURCES += src/pthreadsetnamenp.c
31
32## BARRIER_C_FILES
33libposix_a_SOURCES += src/barrierattrdestroy.c src/barrierattrgetpshared.c \
34    src/barrierattrinit.c src/barrierattrsetpshared.c \
35    src/pbarrierdestroy.c src/pbarrierinit.c \
36    src/pbarrierwait.c
37
38## CONDITION_VARIABLE_C_FILES
39libposix_a_SOURCES += src/condattrdestroy.c \
40    src/condattrinit.c  \
41    src/condattrgetpshared.c src/condattrsetpshared.c \
42    src/condattrgetclock.c src/condattrsetclock.c \
43    src/condbroadcast.c src/conddefaultattributes.c src/conddestroy.c \
44    src/condinit.c src/condsignal.c src/condsignalsupp.c \
45    src/condtimedwait.c src/condwait.c src/condwaitsupp.c
46
47## MUTEX_C_FILES
48libposix_a_SOURCES += src/mutexattrdestroy.c src/mutexattrgetprioceiling.c \
49    src/mutexattrgetprotocol.c src/mutexattrgetpshared.c \
50    src/mutexattrgettype.c src/mutexattrinit.c src/mutexattrsetprioceiling.c \
51    src/mutexattrsetprotocol.c src/mutexattrsetpshared.c \
52    src/mutexattrsettype.c src/mutexdestroy.c \
53    src/mutexgetprioceiling.c src/mutexinit.c src/mutexlock.c \
54    src/mutexlocksupp.c src/mutexsetprioceiling.c src/mutextimedlock.c \
55    src/mutextrylock.c src/mutexunlock.c
56
57## PTHREAD_C_FILES
58libposix_a_SOURCES += src/psxpriorityisvalid.c
59
60## PTHREAD_ATTR_C_FILES
61libposix_a_SOURCES += src/pthreadattrdefault.c src/pthreadattrdestroy.c \
62   src/pthreadattrgetdetachstate.c src/pthreadattrgetguardsize.c \
63   src/pthreadattrgetinheritsched.c src/pthreadattrgetschedparam.c \
64   src/pthreadattrgetschedpolicy.c src/pthreadattrgetscope.c \
65   src/pthreadattrgetstackaddr.c src/pthreadattrgetstack.c \
66   src/pthreadattrgetstacksize.c src/pthreadattrinit.c \
67   src/pthreadattrsetdetachstate.c src/pthreadattrsetguardsize.c \
68   src/pthreadattrsetinheritsched.c src/pthreadattrsetschedparam.c \
69   src/pthreadattrsetschedpolicy.c src/pthreadattrsetscope.c \
70   src/pthreadattrsetstackaddr.c src/pthreadattrsetstack.c \
71   src/pthreadattrsetstacksize.c
72
73## PTHREAD_AFFINITY_C_FILES
74libposix_a_SOURCES += src/pthreadattrsetaffinitynp.c \
75    src/pthreadattrgetaffinitynp.c  src/pthreadgetaffinitynp.c   \
76    src/pthreadsetaffinitynp.c
77
78if HAS_PTHREADS
79## CANCEL_C_FILES
80libposix_a_SOURCES += src/cancel.c \
81    src/cleanuppush.c src/setcancelstate.c \
82    src/setcanceltype.c src/testcancel.c
83
84## MEMORY_C_FILES
85libposix_a_SOURCES += src/mlockall.c
86libposix_a_SOURCES += src/mlock.c
87libposix_a_SOURCES += src/mmap.c
88libposix_a_SOURCES += src/mprotect.c
89libposix_a_SOURCES += src/msync.c
90libposix_a_SOURCES += src/munlockall.c
91libposix_a_SOURCES += src/munlock.c
92libposix_a_SOURCES += src/munmap.c
93libposix_a_SOURCES += src/posix_madvise.c
94libposix_a_SOURCES += src/shm.c
95libposix_a_SOURCES += src/shmheap.c
96libposix_a_SOURCES += src/shmopen.c
97libposix_a_SOURCES += src/shmunlink.c
98libposix_a_SOURCES += src/shmwkspace.c
99
100## MESSAGE_QUEUE_C_FILES
101libposix_a_SOURCES += src/mqueue.c src/mqueueclose.c \
102    src/mqueuedeletesupp.c src/mqueuegetattr.c \
103    src/mqueuenotify.c src/mqueueopen.c \
104    src/mqueuereceive.c src/mqueuerecvsupp.c src/mqueuesend.c \
105    src/mqueuesendsupp.c src/mqueuesetattr.c src/mqueuetimedreceive.c \
106    src/mqueuetimedsend.c \
107    src/mqueueunlink.c
108
109## PTHREAD_C_FILES
110libposix_a_SOURCES += src/pthreadatfork.c \
111    src/pthreadgetattrnp.c \
112    src/pthread.c \
113    src/pthreadconcurrency.c \
114    src/pthreadcreate.c src/pthreaddetach.c src/pthreadequal.c \
115    src/pthreadexit.c src/pthreadgetcpuclockid.c \
116    src/pthreadgetschedparam.c \
117    src/pthreadinitthreads.c src/pthreadjoin.c src/pthreadkill.c \
118    src/pthreadself.c \
119    src/pthreadsetschedparam.c src/pthreadsigmask.c \
120    src/psxtransschedparam.c
121libposix_a_SOURCES += src/pthreadsetschedprio.c
122
123## PSIGNAL_C_FILES
124libposix_a_SOURCES += src/psignal.c src/alarm.c src/kill.c src/killinfo.c \
125    src/kill_r.c src/pause.c src/psignalclearprocesssignals.c \
126    src/psignalsetprocesssignals.c \
127    src/psignalclearsignals.c src/psignalunblockthread.c src/pthreadkill.c \
128    src/pthreadsigmask.c src/sigaction.c
129endif
130
131## KEY_C_FILES
132libposix_a_SOURCES += src/key.c src/keycreate.c src/keydelete.c \
133    src/keygetspecific.c \
134    src/keysetspecific.c
135
136## ONCE_C_FILES
137libposix_a_SOURCES += src/pthreadonce.c
138
139libposix_a_SOURCES += src/sigaddset.c src/sigdelset.c src/sigfillset.c \
140   src/sigemptyset.c src/sigismember.c
141
142libposix_a_SOURCES += src/sigprocmask.c
143
144## SPINLOCK_C_FILES
145libposix_a_SOURCES += src/pspindestroy.c
146libposix_a_SOURCES += src/pspininit.c
147libposix_a_SOURCES += src/pspinlock.c
148libposix_a_SOURCES += src/pspinunlock.c
149
150## SEMAPHORE_C_FILES
151libposix_a_SOURCES += src/semdestroy.c
152libposix_a_SOURCES += src/semgetvalue.c
153libposix_a_SOURCES += src/seminit.c
154libposix_a_SOURCES += src/sempost.c
155libposix_a_SOURCES += src/semtimedwait.c
156libposix_a_SOURCES += src/semtrywait.c
157libposix_a_SOURCES += src/semwait.c
158
159## RWLOCK_C_FILES
160libposix_a_SOURCES += src/prwlockdestroy.c src/prwlockinit.c \
161    src/prwlockrdlock.c src/prwlocktimedrdlock.c src/prwlocktimedwrlock.c \
162    src/prwlocktryrdlock.c src/prwlocktrywrlock.c src/prwlockunlock.c \
163    src/prwlockwrlock.c src/rwlockattrdestroy.c src/rwlockattrgetpshared.c \
164    src/rwlockattrinit.c src/rwlockattrsetpshared.c
165
166if HAS_PTHREADS
167libposix_a_SOURCES += src/sigpending.c \
168    src/sigqueue.c src/sigsuspend.c src/sigtimedwait.c \
169    src/sigwait.c src/sigwaitinfo.c src/signal_2.c src/ualarm.c
170
171## SEMAPHORE_C_FILES
172libposix_a_SOURCES += src/semaphore.c
173libposix_a_SOURCES += src/semaphoredeletesupp.c
174libposix_a_SOURCES += src/semclose.c
175libposix_a_SOURCES += src/semopen.c
176libposix_a_SOURCES += src/semunlink.c
177
178## TIME_C_FILES
179libposix_a_SOURCES += src/adjtime.c src/clockgetcpuclockid.c
180
181## TIMER_C_FILES
182libposix_a_SOURCES += src/ptimer.c src/timercreate.c src/timerdelete.c \
183    src/timergetoverrun.c src/timergettime.c src/timersettime.c
184
185## ITIMER_C_FILES
186libposix_a_SOURCES += src/getitimer.c src/setitimer.c
187
188## SUPPORT_C_FILES
189libposix_a_SOURCES += src/psxpriorityisvalid.c
190libposix_a_SOURCES += src/psxnametoid.c
191
192EXTRA_DIST += src/README.mqueue
193
194libposix_a_SOURCES += src/sched_getparam.c \
195    src/sched_getscheduler.c \
196    src/sched_rr_get_interval.c src/sched_setparam.c \
197    src/sched_setscheduler.c src/sched_yield.c
198endif
199
200libposix_a_SOURCES += src/sched_getprioritymin.c
201libposix_a_SOURCES += src/sched_getprioritymax.c
202
203include $(top_srcdir)/automake/local.am
Note: See TracBrowser for help on using the repository browser.