Update build to fix in-place builds.
[splint-patched.git] / lib / Makefile.am
blob4fa453c4e96d4538828a2970836769bac42055cb
1 ## Note: starting comments with ## means they don't end up in Makefile
3 .PHONY: all
5 AUTOMAKE_OPTIONS = 1.5 foreign
7 ## Put these files in $prefix/share/splint/lib
8 splintlibdir = $(pkgdatadir)/lib
10 LCDFILES = \
11            standard.lcd standardstrict.lcd \
12            posix.lcd posixstrict.lcd \
13            unix.lcd unixstrict.lcd
15 StdHeaders = \
16              include/stdbool.h \
17              include/stddef.h \
18              include/errno.h \
19              include/assert.h \
20              include/ctype.h \
21              include/locale.h \
22              include/float.h \
23              include/limits.h \
24              include/math.h \
25              include/setjmp.h \
26              include/signal.h \
27              include/stdarg.h \
28              include/stdio.h \
29              include/wctype.h \
30              include/time.h \
31              include/stdlib.h \
32              include/string.h \
33              include/stdint.h
35 PosixHeaders = \
36                include/sys/types.h \
37                $(StdHeaders) \
38                include/dirent.h \
39                include/fcntl.h \
40                include/grp.h \
41                include/pwd.h \
42                include/ucontext.h \
43                include/sys/stat.h \
44                include/sys/times.h \
45                include/sys/utsname.h \
46                include/sys/wait.h \
47                include/termios.h \
48                include/unistd.h \
49                include/utime.h \
50                include/regex.h
52 AllHeaders = \
53              $(PosixHeaders) \
54              unix.h \
55              bool.h
56 MtsFiles = \
57            file.mts file.xh \
58            filerw.mts filerw.xh \
59            tainted.mts tainted.xh
60 LarchFiles = \
61              CTrait.syms \
62              lclinit.lci lslinit.lsi
64 ## List of files
65 splintlib_DATA = $(LCDFILES) $(MtsFiles) $(LarchFiles)
67 ##get rid of lcd files if the user does a make clean
68 CLEANFILES = $(LCDFILES)
70 ## Include them in the distribution
71 EXTRA_DIST = $(AllHeaders)
73 ## Rules to make splint & the dumps
75 SPLINT = $(top_builddir)/src/splint$(EXEEXT)
76 LCDGEN = @if $(AM_V_P); then set -x; else echo "  GEN      $@"; fi; \
77                 $(SPLINT) +quiet -nof -nolib +impconj -nextlinemacros +allimponly +globsimpmodifiesnothing $^ -dump $@
79 $(SPLINT):
80         @$(MAKE) -C $(top_builddir)/src 
82 all: $(SPLINT) $(LCDFILES)
84 standard.lcd: $(StdHeaders)
85         $(LCDGEN)
87 standardstrict.lcd: $(StdHeaders)
88         $(LCDGEN) -DSTRICT
90 posix.lcd: $(PosixHeaders)
91         $(LCDGEN) -DPOSIX
93 posixstrict.lcd: $(PosixHeaders)
94         $(LCDGEN) -DPOSIX -DSTRICT
96 unix.lcd: $(PosixHeaders) unix.h
97         $(LCDGEN) -supcounts -incondefs -DPOSIX -DUNIX
99 unixstrict.lcd: $(PosixHeaders) unix.h
100         $(LCDGEN) -supcounts -incondefs -DPOSIX -DUNIX -DSTRICT