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