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