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