Merge branch 'master' into rewrite-sheet
[pspp-builds.git] / 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         argp \
9         assert \
10         byteswap \
11         c-ctype \
12         c-strtod \
13         crypto/md4 \
14         dirname \
15         environ \
16         exit \
17         fatal-signal \
18         fpieee \
19         fprintf-posix \
20         full-read \
21         full-write \
22         fseeko \
23         ftello \
24         fwriteerror \
25         gethostname \
26         getline \
27         getlogin_r \
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         mkstemp \
47         printf-posix \
48         printf-safe \
49         progname \
50         regex \
51         relocatable-prog \
52         round \
53         snprintf \
54         snprintf-posix \
55         sprintf-posix \
56         stdarg \
57         stdbool \
58         stdint \
59         stpcpy \
60         strcase \
61         strcspn \
62         strerror \
63         strftime \
64         strsep \
65         strtod \
66         strtok_r \
67         strtol \
68         strtoul \
69         sys_stat \
70         tempname \
71         tmpfile \
72         trunc \
73         unilbrk/ulc-width-linebreaks \
74         unistd \
75         unlocked-io \
76         vasprintf-posix \
77         vfprintf-posix \
78         vprintf-posix \
79         vsnprintf \
80         vsnprintf-posix \
81         vsprintf-posix \
82         xalloc \
83         xalloc-die \
84         xmalloca \
85         xsize \
86         xstrndup \
87         xvasprintf
88
89 all: po/POTFILES.in
90         test -e ChangeLog || touch ChangeLog
91         test -d m4 || mkdir m4
92         echo '*' > m4/.cvsignore
93         touch m4/Makefile.am
94         $(GNULIB_TOOL) --import --no-changelog --m4-base=gl/m4 \
95                 --source-base=gl --lib=libgl --tests-base=tests \
96                 --doc-base=gl/doc --aux-dir=. --import $(GNULIB_MODULES)
97         echo '*' > gl/.cvsignore
98         echo '*' > gl/m4/.cvsignore
99         libtoolize --force --automake
100         autopoint --force
101         aclocal -I m4 -I gl/m4
102         autoconf
103         autoheader
104         automake --add-missing --copy --no-force
105
106 gettextize:
107         test -d m4 || mkdir m4
108         touch m4/Makefile.am
109         gettextize --force --no-changelog
110
111 po/POTFILES.in:
112         for f in `find src \( -name \*.[qc] -o -name \*.glade \) ! -name .\* -print` ; do \
113                 if test $$f = src/libpspp/version.c; then continue; fi;   \
114                 if test -e `dirname $$f`/`basename $$f .c`.q ; then continue; fi; \
115                 echo $$f ; \
116         done | sort | uniq > $@.tmp
117         if test ! -e $@ || ! cmp -s $@.tmp $@; then mv $@.tmp $@; fi
118         rm -f $@.tmp
119
120 check: all
121         rm -rf _check
122         mkdir _check
123         cd _check && ../configure $(CONFIGUREFLAGS)
124         cd _check && make distcheck
125         rm -rf _check
126
127 _build: all
128         test -d _build || mkdir _build
129         cd _build && ../configure $(CONFIGUREFLAGS)
130
131 _debug: all
132         test -d _debug || mkdir _debug
133         cd _debug && ../configure $(CONFIGUREFLAGS) --enable-debug
134
135 PO_FILES = po/ChangeLog po/Makefile po/Makefile.in po/Makefile.in.in    \
136 po/POTFILES po/POTFILES.in po/Rules-quot po/boldquot.sed                \
137 po/cat-id-tbl.c po/en@boldquot.header po/en@quot.header                 \
138 po/insert-header.sin po/quot.sed po/remove-potcdate.sin po/stamp-po     \
139 po/Makevars.template po/pspp.pot
140
141 clean:
142         rm -f config.sub config.guess config.rpath
143         rm -f ABOUT-NLS
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 potfiles clean