source: trunk/Makefile.in @ 3482

Last change on this file since 3482 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
RevLine 
[512]1
[942]2bindir          = @bindir@
[951]3datadir         = @datadir@
4datarootdir     = @datarootdir@
[708]5exec_prefix     = @exec_prefix@
[942]6includedir      = @includedir@
[708]7libdir          = @libdir@
8mandir          = @mandir@
[942]9prefix          = @prefix@
[1018]10srcdir          = @srcdir@
[708]11
[942]12INSTALL         = @INSTALL@
[1018]13SHELL           = @SHELL@
[1183]14MKDIR_P         = @MKDIR_P@
[1018]15RM              = rm -f
16VPATH           = $(srcdir)
[708]17
[942]18build_date      := $(shell date +%Y%m%d)
19machine         := $(shell uname -m | sed 's/\ //')
20os              := $(shell uname -s)
[512]21
[1189]22pkg_path        := $(shell dirname $(prefix))
23pkg_name        := $(shell basename $(prefix))
[498]24
[1189]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
[2811]29runtime_repo = https://nanohub.org/infrastructure/rappture-runtime/svn/trunk
30rappture_repo = https://nanohub.org/infrastructure/rappture/svn/trunk
[1189]31
[1132]32ENABLE_GUI      = @ENABLE_GUI@
[2890]33HAVE_FFMPEG     = @HAVE_FFMPEG_LIBS@
[2396]34TARGETS         = src lang lib
[1132]35
[1018]36ifneq ($(ENABLE_GUI),)
[2396]37  TARGETS += gui builder tester examples
[718]38endif
[3003]39ifneq ($(HAVE_FFMPEG),)
[2890]40  TARGETS += video
41endif
[489]42
[3471]43.PHONY: all test install clean distclean package distrib runtime-distrib $(TARGETS)
[511]44
[1132]45all: $(TARGETS)
[1733]46        for i in $(TARGETS) ; do \
47          $(MAKE) -C $$i all || exit 1 ;\
48        done
[2396]49test:
50        $(MAKE) -C test all
[511]51
[1018]52install:
[1132]53        for i in $(TARGETS) ; do \
54          $(MAKE) -C $$i install || exit 1 ;\
55        done
[489]56
[1733]57clean:
58        for i in $(TARGETS) ; do \
59          $(MAKE) -C $$i clean || exit 1 ;\
60        done
[489]61
[1733]62distclean: clean
[1018]63        $(RM) Makefile config.status config.log  *~
[1733]64        for i in $(TARGETS) ; do \
65          $(MAKE) -C $$i distclean || exit 1 ;\
66        done
[1018]67
68package:
[1189]69        tar -C $(pkg_path) -czlf $(rappture_binary_tarfile) $(pkg_name)
[1183]70
71distrib:
72        $(RM) -r exported
[1944]73        $(MKDIR_P) -m 0755 exported
[1189]74        (cd exported; svn export -q $(rappture_repo) rappture)
75        tar -C exported -czlf $(rappture_source_tarfile) rappture
[1183]76        $(RM) -r exported
[1189]77
78runtime-distrib:
79        $(RM) -r exported
[1944]80        $(MKDIR_P) -m 0755 exported
[1189]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.