source: tags/1.2.0/Makefile.in @ 4585

Last change on this file since 4585 was 3471, checked in by ldelgass, 11 years ago

Makefile fixes: make 'install' target always depend on 'all' target. This
ensures that an up to date build exists before installing, and also permits
the use of "make install" in place of "make all install" or "make all; make install". It doesn't affect the existing build scripts. Likewise, make 'distclean'
always depend on 'clean'. Remove empty contour objects example, as there is no
corresponding object class. Also declare all the standard targets 'all, install,
etc' in the .PHONY section for performance.

File size: 2.0 KB
Line 
1
2bindir          = @bindir@
3datadir         = @datadir@
4datarootdir     = @datarootdir@
5exec_prefix     = @exec_prefix@
6includedir      = @includedir@
7libdir          = @libdir@
8mandir          = @mandir@
9prefix          = @prefix@
10srcdir          = @srcdir@
11
12INSTALL         = @INSTALL@
13SHELL           = @SHELL@
14MKDIR_P         = @MKDIR_P@
15RM              = rm -f
16VPATH           = $(srcdir)
17
18build_date      := $(shell date +%Y%m%d)
19machine         := $(shell uname -m | sed 's/\ //')
20os              := $(shell uname -s)
21
22pkg_path        := $(shell dirname $(prefix))
23pkg_name        := $(shell basename $(prefix))
24
25rappture_binary_tarfile = rappture-$(os)-$(machine)-$(build_date).tar.gz
26rappture_source_tarfile = rappture-src-$(build_date).tar.gz
27runtime_source_tarfile = rappture-runtime-src-$(build_date).tar.gz
28
29runtime_repo = https://nanohub.org/infrastructure/rappture-runtime/svn/trunk
30rappture_repo = https://nanohub.org/infrastructure/rappture/svn/trunk
31
32ENABLE_GUI      = @ENABLE_GUI@
33HAVE_FFMPEG     = @HAVE_FFMPEG_LIBS@
34TARGETS         = src lang lib
35
36ifneq ($(ENABLE_GUI),)
37  TARGETS += gui builder tester examples
38endif
39ifneq ($(HAVE_FFMPEG),)
40  TARGETS += video
41endif
42
43.PHONY: all test install clean distclean package distrib runtime-distrib $(TARGETS)
44
45all: $(TARGETS)
46        for i in $(TARGETS) ; do \
47          $(MAKE) -C $$i all || exit 1 ;\
48        done
49test:
50        $(MAKE) -C test all
51
52install:
53        for i in $(TARGETS) ; do \
54          $(MAKE) -C $$i install || exit 1 ;\
55        done
56
57clean:
58        for i in $(TARGETS) ; do \
59          $(MAKE) -C $$i clean || exit 1 ;\
60        done
61
62distclean: clean
63        $(RM) Makefile config.status config.log  *~
64        for i in $(TARGETS) ; do \
65          $(MAKE) -C $$i distclean || exit 1 ;\
66        done
67
68package:
69        tar -C $(pkg_path) -czlf $(rappture_binary_tarfile) $(pkg_name)
70
71distrib:
72        $(RM) -r exported
73        $(MKDIR_P) -m 0755 exported
74        (cd exported; svn export -q $(rappture_repo) rappture)
75        tar -C exported -czlf $(rappture_source_tarfile) rappture
76        $(RM) -r exported
77
78runtime-distrib:
79        $(RM) -r exported
80        $(MKDIR_P) -m 0755 exported
81        (cd exported; svn export -q $(runtime_repo) runtime)
82        tar -C exported -czlf $(runtime_source_tarfile) runtime
83        $(RM) -r exported
Note: See TracBrowser for help on using the repository browser.