"Initial commit to Gerrit"
[profile/ivi/libcroco.git] / Makefile.am
1 SUBDIRS = src csslint docs
2 SUBDIRS += tests
3
4 PKG_CONFIG_FILE_UNINSTALLED=libcroco-@LIBCROCO_MAJOR_VERSION@.@LIBCROCO_MINOR_VERSION@-uninstalled.pc
5 PKG_CONFIG_FILE=libcroco-@LIBCROCO_MAJOR_VERSION@.@LIBCROCO_MINOR_VERSION@.pc
6
7 pkgconfigdir=$(libdir)/pkgconfig
8 pkgconfig_DATA=$(PKG_CONFIG_FILE)
9
10 INCLUDE_DIR_NAME=@PACKAGE@-@LIBCROCO_MAJOR_VERSION@.@LIBCROCO_MINOR_VERSION@
11 extraincludedir=$(includedir)/$INCLUDE_DIR_NAME
12
13 CROCO_CONFIG_FILE_UNINSTALLED=croco-@LIBCROCO_MAJOR_VERSION@.@LIBCROCO_MINOR_VERSION@-config-uninstalled
14 CROCO_CONFIG_FILE=croco-@LIBCROCO_MAJOR_VERSION@.@LIBCROCO_MINOR_VERSION@-config
15 bin_SCRIPTS=$(CROCO_CONFIG_FILE)
16
17 #man_MANS = croco-config.1
18
19 EXTRA_DIST= croco-config.in $(PKG_CONFIG_FILE) TODO Doxyfile \
20 HACKING COPYING.LIB COPYING libcroco.spec libcroco-zip.in 
21
22 all-local: $(PKG_CONFIG_FILE_UNINSTALLED) $(PKG_CONFIG_FILE) \
23 $(CROCO_CONFIG_FILE_UNINSTALLED) $(CROCO_CONFIG_FILE)
24
25
26 %-@LIBCROCO_MAJOR_VERSION@.@LIBCROCO_MINOR_VERSION@.pc: %.pc
27         cp $< $@
28
29 %-@LIBCROCO_MAJOR_VERSION@.@LIBCROCO_MINOR_VERSION@-uninstalled.pc: %.pc
30         cp $< $@
31
32 %-@LIBCROCO_MAJOR_VERSION@.@LIBCROCO_MINOR_VERSION@-config: %-config
33         cp $< $@
34
35 %-@LIBCROCO_MAJOR_VERSION@.@LIBCROCO_MINOR_VERSION@-config-uninstalled: %-config
36         cp $< $@
37
38 clean-local: cleantest
39 distclean-local:
40         -rm ./croco-0.6-config ./libcroco-0.6.pc ./libcroco-0.6-uninstalled.pc ./croco-0.6-config-uninstalled
41
42 cleantest:
43         if test -x $(top_srcdir)/tests/testctl ; then $(top_srcdir)/tests/testctl cleanup ; fi
44
45 cleantar:
46         @(rm -f libcroco*.tar.gz)
47         @(rm -rf $(top_srcdir)/rpmbuildroot)
48
49 rpm: cleantar
50         @(mkdir -p $(top_srcdir)/rpmbuildroot ; $(MAKE) dist && rpmbuild  -ta --buildroot $(top_srcdir)/rpmbuildroot $(distdir).tar.gz)
51
52 test:   all
53         if test -x $(top_srcdir)/tests/testctl ; then $(top_srcdir)/tests/testctl cleanup ; $(top_srcdir)/tests/testctl run ; fi 
54
55 apidoc:
56         if ! test -d docs/apis ; then  mkdir -p docs/apis ;  fi ;
57         doxygen Doxyfile