Nicer handling of hand-generated files by build system
[splint-patched.git] / lib / Makefile.am
bloba8c68c712c98369df01eb4d8fa4de5f772d96325
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 UnixHeaders = stdio.h stdlib.h
17 ## List of files
18 splintlib_DATA = \
19                  $(LCDFILES) \
20                  standard.h \
21                  posix.h \
22                  unix.h \
23                  bool.h \
24                  $(UnixHeaders) \
25                  CTrait.syms CTraitGen.lcl \
26                  file.mts file.xh \
27                  filerw.mts filerw.xh \
28                  tainted.mts tainted.xh \
29                  lclinit.lci lslinit.lsi
31 ## Include them in the distribution
32 EXTRA_DIST = $(splintlib_DATA)
34 ##get rid of lcd files if the user does a make clean
35 CLEANFILES = $(LCDFILES)
37 ## Rules to make splint & the dumps
39 SPLINT = $(top_builddir)/src/splint$(EXEEXT)
40 LCDGEN = @if $(AM_V_P); then set -x; else echo "  GEN      $@"; fi; \
41                 $(SPLINT) +quiet -nof -nolib +impconj $^ -dump $@
43 $(SPLINT):
44         @$(MAKE) -C $(top_builddir)/src 
46 all: $(SPLINT) $(LCDFILES)
48 standard.lcd: standard.h
49         $(LCDGEN)
51 standardstrict.lcd: standard.h
52         $(LCDGEN) -DSTRICT
54 posix.lcd: standard.h posix.h
55         $(LCDGEN)
57 posixstrict.lcd: standard.h posix.h
58         $(LCDGEN) -DSTRICT
60 unix.lcd: standard.h posix.h unix.h $(UnixHeaders)
61         $(LCDGEN) -supcounts -incondefs
63 unixstrict.lcd: standard.h posix.h unix.h $(UnixHeaders)
64         $(LCDGEN) -supcounts -incondefs -DSTRICT