Need to make sure m4/Makefile.am exists before running gnulib-tool.
[pspp-builds.git] / Smake
1 # -*- makefile -*-
2
3 GNULIB = ../gnulib
4 GNULIB_TOOL = $(GNULIB)/gnulib-tool
5
6 all: po/POTFILES.in
7         test -d m4 || mkdir m4
8         touch m4/Makefile.am
9         $(GNULIB_TOOL) --import
10         autoreconf --install
11
12 gettextize:
13         test -d m4 || mkdir m4
14         touch m4/Makefile.am
15         gettextize -f -c --intl --no-changelog
16
17 po/POTFILES.in:
18         for f in `find src -name \*.[qc] -print | sed 's/\.[qc]$$//'`; do \
19                 if test $$f = src/version.c; then break; fi;              \
20                 if test -e $$f.q; then echo $$f.q; else echo $$f.c; fi    \
21         done | sort | uniq > $@.tmp
22         if test ! -e $@ || ! cmp -s $@.tmp $@; then mv $@.tmp $@; fi
23         rm -f $@.tmp
24
25 PO_FILES = po/ChangeLog po/Makefile po/Makefile.in po/Makefile.in.in    \
26 po/POTFILES po/POTFILES.in po/Rules-quot po/boldquot.sed                \
27 po/cat-id-tbl.c po/en@boldquot.header po/en@quot.header                 \
28 po/insert-header.sin po/quot.sed po/remove-potcdate.sin po/stamp-po     \
29 po/Makevars.template
30
31 clean:
32         rm -f config.sub config.guess config.rpath
33         rm -f ABOUT-NLS
34         rm -fr autom4te.cache
35         rm -f aclocal.m4
36         rm -f missing mkinstalldirs
37         rm -f install-sh
38         rm -f configure Makefile Makefile.in
39         rm -f depcomp
40         rm -fr intl gl
41         rm -f m4/*.m4
42         rm -f $(PO_FILES)
43
44 .PHONY: all gettextize potfiles clean