/[debburn]/cdrkit/trunk/Makefile
ViewVC logotype

Contents of /cdrkit/trunk/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 750 - (show annotations) (download)
Sat Apr 21 09:43:17 2007 UTC (6 years ago) by blade
File size: 1927 byte(s)
+  * resync with cosmetical last-minute changes from Peter Samuelson
+  * Makefile: "release" target extension to make the Debian related source
+    file creation more convinient

1 ifneq ($(CFLAGS),)
2 CMAKETWEAKS += ( cd build ; cmake .. -DCMAKE_C_FLAGS="$(CFLAGS)" ) || exit 1;
3 endif
4
5 ifneq ($(LDFLAGS),)
6 CMAKETWEAKS += (cd build ; cmake .. -DCMAKE_EXE_LINKER_FLAGS:STRING="$(LDFLAGS)" -DCMAKE_MODULE_LINKER_FLAGS:STRING="$(LDFLAGS)" -DCMAKE_SHARED_LINKER_FLAGS:STRING="$(LDFLAGS)" ) || exit 1;
7 endif
8
9 ifneq ($(PREFIX),)
10 CMAKETWEAKS += ( cd build ; cmake .. -DCMAKE_INSTALL_PREFIX="$(PREFIX)") || exit 1;
11 endif
12
13 default_target: all
14
15 DISTNAME=cdrkit-$(shell cat VERSION)
16 DEBSRCNAME=cdrkit_$(shell cat VERSION | sed -e "s,pre,~pre,").orig.tar.gz
17
18 build/Makefile:
19 @-mkdir build 2>/dev/null
20 cd build && cmake ..
21
22 cmakepurge:
23 rm -rf install_manifest.txt progress.make CMakeFiles CMakeCache.txt cmake_install.cmake
24 rm -rf */install_manifest.txt */progress.make */CMakeFiles */CMakeCache.txt */cmake_install.cmake
25 rm -rf */*/install_manifest.txt */*/progress.make */*/CMakeFiles */*/CMakeCache.txt */*/cmake_install.cmake
26 rm */Makefile */*/Makefile
27
28 clean:
29 rm -rf build
30
31 release:
32 # if test "$(shell svn status | grep -v -i make)" ; then echo Uncommited files found. Run \"svn status\" to display them. ; exit 1 ; fi
33 @if test -f ../$(DISTNAME).tar.gz ; then echo ../$(DISTNAME).tar.gz exists, not overwritting ; exit 1; fi
34 rm -rf tmp
35 mkdir tmp
36 svn export . tmp/$(DISTNAME)
37 rm -rf tmp/$(DISTNAME)/debian
38 tar -f - -c -C tmp $(DISTNAME) | gzip -9 > ../$(DISTNAME).tar.gz
39 rm -rf tmp
40 test -e /etc/debian_version && ln -f ../$(DISTNAME).tar.gz ../$(DEBSRCNAME) || true
41 test -e ../tarballs && ln -f ../$(DISTNAME).tar.gz ../tarballs/$(DEBSRCNAME) || true
42
43 #%::
44 # $(MAKE) $(MAKE_FLAGS) build/Makefile
45 # $(CMAKETWEAKS)
46 # $(MAKE) -C build $(MAKE_FLAGS) $@
47
48 # needs to be explicite, for PHONY and install (AKA INSTALL) file on cygwin
49 install: build/Makefile
50 $(CMAKETWEAKS)
51 $(MAKE) -C build $(MAKE_FLAGS) $@
52
53 all: build/Makefile
54 $(CMAKETWEAKS)
55 $(MAKE) -C build $(MAKE_FLAGS) $@
56
57 .PHONY: install all
58
59

  ViewVC Help
Powered by ViewVC 1.1.5