source: trunk/Makefile.in @ 5004

Last change on this file since 5004 was 4364, checked in by ldelgass, 10 years ago

Fix for exported source package build: svnversion will return "Unversioned
directory" when run on an exported source tree, but the space causes a compiler
error. Replace this string with 'unknown'. A better fix would be to capture
the svn revision at the time the tree is exported. See nanohub ticket
#265649 for a report of the problem on Mac OS X (that was with clang, but I
verified it occurs with gcc on Linux as well).

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