Smake: Add mkdtemp module, used by odt output driver.
[pspp] / Smake
1 # -*- makefile -*-
2
3 # Adjust these to reflect where you've installed gnulib.
4 GNULIB = ../gnulib
5 GNULIB_TOOL = $(GNULIB)/gnulib-tool
6
7 GNULIB_MODULES = \
8         assert \
9         byteswap \
10         c-ctype \
11         c-strtod \
12         close \
13         count-one-bits \
14         crypto/md4 \
15         dirname \
16         environ \
17         exit \
18         fatal-signal \
19         fcntl \
20         fpieee \
21         fprintf-posix \
22         full-read \
23         full-write \
24         fseeko \
25         ftello \
26         fwriteerror \
27         getline \
28         getopt \
29         gettext-h \
30         gettimeofday \
31         gitlog-to-changelog \
32         isfinite \
33         isinf \
34         isnan \
35         intprops \
36         inttostr \
37         localcharset \
38         mbchar \
39         memcasecmp \
40         memchr \
41         memcmp \
42         memmove \
43         mempcpy \
44         memset \
45         minmax \
46         mkdtemp \
47         mkstemp \
48         printf-posix \
49         printf-safe \
50         progname \
51         regex \
52         relocatable-prog \
53         rename \
54         round \
55         snprintf \
56         snprintf-posix \
57         sprintf-posix \
58         stdarg \
59         stdbool \
60         stdint \
61         stpcpy \
62         strcase \
63         strcspn \
64         strerror \
65         strftime \
66         strtod \
67         strtok_r \
68         strtol \
69         strtoul \
70         sys_stat \
71         tempname \
72         tmpfile \
73         trunc \
74         unilbrk/ulc-width-linebreaks \
75         unistd \
76         unistr/u8-cpy \
77         unistr/u8-strlen \
78         unistr/u8-strncat \
79         unlocked-io \
80         vasprintf-posix \
81         version-etc \
82         version-etc-fsf \
83         vfprintf-posix \
84         vprintf-posix \
85         vsnprintf \
86         vsnprintf-posix \
87         vsprintf-posix \
88         xalloc \
89         xalloc-die \
90         xmalloca \
91         xmemdup0 \
92         xsize \
93         xstrndup \
94         xvasprintf
95
96 all: 
97         test -e ChangeLog || touch ChangeLog
98         test -d m4 || mkdir m4
99         echo '*' > m4/.cvsignore
100         touch m4/Makefile.am
101         $(GNULIB_TOOL) --import --no-changelog --m4-base=gl/m4 \
102                 --source-base=gl --lib=libgl --tests-base=tests \
103                 --doc-base=gl/doc --aux-dir=. --import $(GNULIB_MODULES)
104         echo '*' > gl/.cvsignore
105         echo '*' > gl/m4/.cvsignore
106         libtoolize --force --automake
107         aclocal -I m4 -I gl/m4
108         autoconf
109         autoheader
110         automake --add-missing --copy --no-force
111
112 gettextize:
113         test -d m4 || mkdir m4
114         touch m4/Makefile.am
115         gettextize --force --no-changelog
116
117 check: all
118         rm -rf _check
119         mkdir _check
120         cd _check && ../configure $(CONFIGUREFLAGS)
121         cd _check && make distcheck
122         rm -rf _check
123
124 _build: all
125         test -d _build || mkdir _build
126         cd _build && ../configure $(CONFIGUREFLAGS)
127
128 _debug: all
129         test -d _debug || mkdir _debug
130         cd _debug && ../configure $(CONFIGUREFLAGS) --enable-debug
131
132 PO_FILES = po/ChangeLog \
133 po/Rules-quot po/boldquot.sed           \
134 po/cat-id-tbl.c po/en@boldquot.header po/en@quot.header                 \
135 po/insert-header.sin po/quot.sed po/remove-potcdate.sin po/stamp-po     \
136 po/Makevars.template po/pspp.pot
137
138 clean:
139         rm -f config.sub config.guess config.rpath
140         rm -f ABOUT-NLS
141         rm -fr autom4te.cache
142         rm -f aclocal.m4
143         rm -f missing mkinstalldirs
144         rm -f install-sh
145         rm -f configure Makefile 
146         rm -f depcomp
147         rm -rf intl gl
148         rm -f m4/*.m4
149         rm -f $(PO_FILES) po/*.gmo 
150         rm -f mdate-sh texinfo.tex
151         rm -f doc/stamp-vti
152         rm -f config.h.in~
153         rm -f config.h.in
154         find . -name Makefile.in -exec rm -f {} \; 
155         rm -f compile
156         rm -f ltmain.sh
157         rm -f reloc-ldflags install-reloc
158
159 .PHONY: all gettextize clean