Merge lp:~smspillaz/compiz-core/compiz-core.dist-buildsystem into lp:compiz-core/trunk

Proposed by Sam Spilsbury
Status: Merged
Merged at revision: 2760
Proposed branch: lp:~smspillaz/compiz-core/compiz-core.dist-buildsystem
Merge into: lp:compiz-core/trunk
Diff against target: 394 lines (+287/-32)
5 files modified
CMakeLists.txt (+7/-7)
VERSION (+1/-0)
cmake/CompizCommon.cmake (+272/-20)
cmake/CompizPlugin.cmake (+6/-0)
include/compiz-common.h.in (+1/-5)
To merge this branch: bzr merge lp:~smspillaz/compiz-core/compiz-core.dist-buildsystem
Reviewer Review Type Date Requested Status
Jason Smith (community) Approve
Review via email: mp+67100@code.launchpad.net

Description of the change

Adds new release targets to the buildsystem

make release-prep: generates NEWS ChangeLog and AUTHORS file
make distcheck: generates a tarball
make release-signoff: signs the tarball using the key in RELEASE_KEY and if
in a git repository, creates tags and branches for that

To post a comment you must log in.
2760. By Sam Spilsbury

Add various fixes for distcheck, source distributions without a VCS
and non-C sources (eg python bindings where we can't do try_compile
because C and CXX are not in the enabled languages)

Revision history for this message
Aurélien Gâteau (agateau) wrote :

(disclaimer: I only read the diff, didn't try it for real)

Some questions and suggestions:

1. You could get rid of one line when reading the version number by directly using the VERSION variable instead of an intermediate COMPIZ_RELEASE_VERSION one.

2. is there a real reason to support both bz2 and gz? I would expect everybody to be able to decode bz2 now. Supporting only bz2 would simplify this diff quite a bit.

3. The check for whether you are in a git or a bzr repository could be moved outside the macros to avoid duplication. I would also simplify it to something like this (untested):

if (IS_DIRECTORY ${CMAKE_SOURCE_DIR}/.git)
    set(IS_GIT_REPO TRUE)
elseif (IS_DIRECTORY ${CMAKE_SOURCE_DIR}/.git)
    set(IS_GIT_REPO FALSE)
endif (IS_DIRECTORY ${CMAKE_SOURCE_DIR}/.git)

if (IS_DIRECTORY ${CMAKE_SOURCE_DIR}/.bzr)
    set(IS_BZR_REPO TRUE)
elseif (IS_DIRECTORY ${CMAKE_SOURCE_DIR}/.bzr)
    set(IS_BZR_REPO FALSE)
endif (IS_DIRECTORY ${CMAKE_SOURCE_DIR}/.bzr)

You can then replace your tests with easier-to-read checks on IS_GIT_REPO and IS_BZR_REPO

2761. By Sam Spilsbury

Drop support for bz2, add targets for release uploads, cleanup

Revision history for this message
Aurélien Gâteau (agateau) wrote :

Looks nicer, just two minor nitpicks:
1. The "if" cmake command allows you to simplify the tests from "if (${IS_GIT_REPO})" to "if (IS_GIT_REPO)".
2. There is some commented code, not sure if it is intentional or not.

2762. By Sam Spilsbury

Nitpicking and fix FTBFS on bzr

Revision history for this message
Jason Smith (jassmith) wrote :

Can this be run by someone without commit access to compiz?

Revision history for this message
Jason Smith (jassmith) wrote :

+1

review: Approve
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Yes, the targets are independent of each other

release-prep: updates the NEWS, ChangeLog, AUTHORS (in /build, NOT in the working tree)
distcheck: checks for build failure, does tests
release-signoff: creates git branches, tags, copies NEWS etc into working tree, commits, updates tarball, signs it + checksums it and bumps VERSION
release-push: pushes objects into git
release-upload: uploads tarball to releases.compiz.org

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2011-07-06 19:52:01 +0000
+++ CMakeLists.txt 2011-07-07 16:29:45 +0000
@@ -15,13 +15,10 @@
15 set (CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build type (Debug/Release/RelWithDebInfo/MinSizeRe)" FORCE)15 set (CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build type (Debug/Release/RelWithDebInfo/MinSizeRe)" FORCE)
16endif (NOT CMAKE_BUILD_TYPE)16endif (NOT CMAKE_BUILD_TYPE)
1717
18# compiz package version number18file (READ ${CMAKE_SOURCE_DIR}/VERSION COMPIZ_RELEASE_VERSION LIMIT 12 OFFSET 0)
19# An odd micro number indicates in-progress development.19string (STRIP ${COMPIZ_RELEASE_VERSION} COMPIZ_RELEASE_VERSION)
20# An even micro number indicates a released version.20
21set (COMPIZ_VERSION_MAJOR 0)21set (VERSION ${COMPIZ_RELEASE_VERSION})
22set (COMPIZ_VERSION_MINOR 9)
23set (COMPIZ_VERSION_MICRO 5)
24set (VERSION ${COMPIZ_VERSION_MAJOR}.${COMPIZ_VERSION_MINOR}.${COMPIZ_VERSION_MICRO})
2522
26set (DECOR_INTERFACE_VERSION 20110504)23set (DECOR_INTERFACE_VERSION 20110504)
2724
@@ -126,6 +123,9 @@
126compiz_package_generation ("Compiz")123compiz_package_generation ("Compiz")
127compiz_add_uninstall ()124compiz_add_uninstall ()
128compiz_add_git_dist ()125compiz_add_git_dist ()
126compiz_add_distcheck ()
127compiz_add_release ()
128compiz_add_release_signoff ()
129129
130_print_configure_results ()130_print_configure_results ()
131131
132132
=== added file 'VERSION'
--- VERSION 1970-01-01 00:00:00 +0000
+++ VERSION 2011-07-07 16:29:45 +0000
@@ -0,0 +1,1 @@
10.9.5.0
02
=== modified file 'cmake/CompizCommon.cmake'
--- cmake/CompizCommon.cmake 2011-02-22 11:27:28 +0000
+++ cmake/CompizCommon.cmake 2011-07-07 16:29:45 +0000
@@ -49,6 +49,24 @@
49 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")49 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
50endif ()50endif ()
5151
52if (IS_DIRECTORY ${CMAKE_SOURCE_DIR}/.git)
53 set(IS_GIT_REPO 1)
54else (IS_DIRECTORY ${CMAKE_SOURCE_DIR}/.git)
55 set(IS_GIT_REPO 0)
56endif (IS_DIRECTORY ${CMAKE_SOURCE_DIR}/.git)
57
58if (IS_DIRECTORY ${CMAKE_SOURCE_DIR}/.gitmodules)
59 set(IS_GIT_SUBMODULES_REPO 1)
60else (IS_DIRECTORY ${CMAKE_SOURCE_DIR}/.gitmodules)
61 set(IS_GIT_SUBMODULES_REPO 0)
62endif (IS_DIRECTORY ${CMAKE_SOURCE_DIR}/.gitmodules)
63
64if (IS_DIRECTORY ${CMAKE_SOURCE_DIR}/.bzr)
65 set(IS_BZR_REPO 1)
66elseif (IS_DIRECTORY ${CMAKE_SOURCE_DIR}/.bzr)
67 set(IS_BZR_REPO 0)
68endif (IS_DIRECTORY ${CMAKE_SOURCE_DIR}/.bzr)
69
52function (compiz_ensure_linkage)70function (compiz_ensure_linkage)
53 find_program (LDCONFIG_EXECUTABLE ldconfig)71 find_program (LDCONFIG_EXECUTABLE ldconfig)
54 mark_as_advanced (FORCE LDCONFIG_EXECUTABLE)72 mark_as_advanced (FORCE LDCONFIG_EXECUTABLE)
@@ -64,12 +82,243 @@
64endfunction ()82endfunction ()
6583
66macro (compiz_add_git_dist)84macro (compiz_add_git_dist)
67 set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${VERSION})85
68 add_custom_target(dist86 # Try to use the git and bzr inbuilt functions for generating
69 COMMAND git archive --prefix=${ARCHIVE_NAME}/ HEAD87 # archives first, otherwise do it manually
70 | bzip2 > ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz288 if (${IS_GIT_REPO})
71 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})89
72endmacro ()90 if (${IS_GIT_SUBMODULES_REPO})
91 find_program (GIT_ARCHIVE_ALL git-archive-all.sh)
92
93 if (NOT (${GIT_ARCHIVE_ALL} STREQUAL "GIT_ARCHIVE_ALL-NOTFOUND"))
94 add_custom_target (dist ${GIT_ARCHIVE_ALL} --prefix ${CMAKE_PROJECT_NAME}-${VERSION}/ ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${VERSION}.tar
95 COMMAND bzip2 ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${VERSION}.tar
96 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
97 COMMENT "Creating bz2 archive")
98 else (NOT (${GIT_ARCHIVE_ALL} STREQUAL "GIT_ARCHIVE_ALL-NOTFOUND"))
99 message ("[WARNING]: git-archive-all.sh is needed to make releases of git submodules, get it from https://github.com/meitar/git-archive-all.sh.git and install it into your PATH")
100 endif (NOT (${GIT_ARCHIVE_ALL} STREQUAL "GIT_ARCHIVE_ALL-NOTFOUND"))
101 else (${IS_GIT_SUBMODULES_REPO})
102 add_custom_target (dist git archive --format=tar --prefix ${CMAKE_PROJECT_NAME}-${VERSION}/ -o ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${VERSION}.tar HEAD
103 COMMAND bzip2 ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${VERSION}.tar
104 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
105 COMMENT "Creating bz2 archive")
106 endif (${IS_GIT_SUBMODULES_REPO})
107 else (${IS_GIT_REPO})
108 if (${IS_BZR_REPO})
109 add_custom_target (dist
110 COMMAND bzr export --root=${CMAKE_PROJECT_NAME}-${VERSION} ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${VERSION}.tar.bz2
111 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
112 else (${IS_BZR_REPO})
113 add_custom_target (dist)
114 #add_custom_target (dist
115 # COMMAND tar -cvf ${CMAKE_SOURCE_DIR} | bzip2 > ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${VERSION}.tar.bz2
116 # WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../)
117 endif (${IS_BZR_REPO})
118 endif (${IS_GIT_REPO})
119
120endmacro ()
121
122macro (compiz_add_distcheck)
123 add_custom_target (distcheck
124 COMMAND mkdir -p ${CMAKE_BINARY_DIR}/dist-build
125 && cp ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${VERSION}.tar.bz2 ${CMAKE_BINARY_DIR}/dist-build
126 && cd ${CMAKE_BINARY_DIR}/dist-build
127 && tar xvf ${CMAKE_BINARY_DIR}/dist-build/${CMAKE_PROJECT_NAME}-${VERSION}.tar.bz2
128 && mkdir -p ${CMAKE_BINARY_DIR}/dist-build/${CMAKE_PROJECT_NAME}-${VERSION}/build
129 && cd ${CMAKE_BINARY_DIR}/dist-build/${CMAKE_PROJECT_NAME}-${VERSION}/build
130 && cmake -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/dist-build/buildroot -DCOMPIZ_PLUGIN_INSTALL_TYPE='package' .. -DCMAKE_MODULE_PATH=/usr/share/cmake -DCOMPIZ_DISABLE_PLUGIN_KDE=ON
131 && make -j4
132 && make -j4 install
133 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
134 add_dependencies (distcheck dist)
135endmacro ()
136
137macro (compiz_add_release_signoff)
138
139 add_custom_target (release-signoff)
140
141 add_custom_target (release-update-working-tree
142 COMMAND cp NEWS ${CMAKE_SOURCE_DIR} &&
143 cp AUTHORS ${CMAKE_SOURCE_DIR} &&
144 cp ChangeLog ${CMAKE_SOURCE_DIR})
145
146 if (${IS_GIT_REPO})
147 add_custom_target (release-commits
148 COMMAND git commit -a -m "Update NEWS for ${VERSION}"
149 COMMENT "Release Commit"
150 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
151 add_custom_target (release-tags
152 COMMAND git tag -u $ENV{RELEASE_KEY} compiz-${VERSION} HEAD -m "Compiz ${VERSION} Release"
153 COMMENT "Release Tags"
154 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
155 add_custom_target (release-branch
156 COMMAND git checkout -b compiz-${VERSION}-series &&
157 touch RELEASED &&
158 git add RELEASED &&
159 cat VERSION > RELEASED &&
160 git commit -a -m "Add RELEASED file"
161 COMMENT "Release Branch"
162 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
163 add_custom_target (release-update-dist
164 COMMAND git checkout master &&
165 rm ${CMAKE_PROJECT_NAME}-${VERSION}.tar.bz2 &&
166 make dist
167 COMMENT "Updating bz2 archive"
168 WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
169 add_custom_target (release-version-bump
170 COMMAND git checkout master &&
171 $ENV{EDITOR} VERSION &&
172 git add VERSION &&
173 git commit VERSION -m "Bump VERSION"
174 COMMENT "Bumping VERSION"
175 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
176 else (${IS_GIT_REPO})
177 add_custom_target (release-commits)
178 add_custom_target (release-tags)
179 add_custom_target (release-branch)
180 add_custom_target (release-update-dist)
181 add_custom_target (release-version-bump)
182
183 endif (${IS_GIT_REPO})
184
185 add_custom_target (release-sign-tarballs
186 COMMAND gpg --armor --sign --detach-sig ${CMAKE_PROJECT_NAME}-${VERSION}.tar.bz2
187 COMMENT "Signing tarball"
188 WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
189 add_custom_target (release-sha1-tarballs
190 COMMAND sha1sum ${CMAKE_PROJECT_NAME}-${VERSION}.tar.bz2 > ${CMAKE_PROJECT_NAME}-${VERSION}.tar.bz2.sha1
191 COMMENT "SHA1Summing tarball"
192 WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
193 add_custom_target (release-sign-sha1-tarballs
194 COMMAND gpg --armor --sign --detach-sig ${CMAKE_PROJECT_NAME}-${VERSION}.tar.bz2.sha1
195 COMMENT "Signing SHA1Sum checksum"
196 WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
197
198 add_dependencies (release-commits release-update-working-tree)
199 add_dependencies (release-tags release-commits)
200 add_dependencies (release-branch release-tags)
201 add_dependencies (release-update-dist release-branch)
202 add_dependencies (release-version-bump release-update-dist)
203 add_dependencies (release-sign-tarballs release-version-bump)
204 add_dependencies (release-sha1-tarballs release-sign-tarballs)
205 add_dependencies (release-sign-sha1-tarballs release-sha1-tarballs)
206
207 # This means that releasing needs to be done from a git repo for now
208 # But that's fine
209 add_dependencies (release-signoff release-sign-sha1-tarballs)
210
211 # Actually pushes the release
212 if (${IS_GIT_REPO})
213 add_custom_target (push-master
214 COMMAND git push origin master
215 COMMENT "Pushing to master"
216 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
217 add_custom_target (push-release-branch
218 COMMAND git push origin compiz-${VERISON}-series
219 COMMENT "Pushing to compiz-${VERISON}-series"
220 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
221 add_custom_target (push-tag
222 COMMAND git push origin compiz-${VERSION}
223 COMMENT "Pushing tag compiz-${VERSION}"
224 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
225 else (${IS_GIT_REPO})
226 add_custom_target (push-master)
227 add_custom_target (push-release-branch)
228 add_custom_target (push-tag)
229 endif (${IS_GIT_REPO})
230
231 add_custom_target (release-push)
232
233 add_dependencies (release-push push-release-branch)
234 add_dependencies (push-release-branch push-tag)
235 add_dependencies (push-tag push-master)
236
237 # Push the tarball to releases.compiz.org
238 set (COMPIZ_RELEASE_UPLOAD_HOST releases.compiz.org)
239 set (COMPIZ_RELEASE_UPLOAD_BASE /home/releases)
240 set (COMPIZ_RELEASE_UPLOAD_DIR_VERSION ${COMPIZ_RELEASE_UPLOAD_BASE}/${VERSION}/)
241 set (COMPIZ_RELEASE_UPLOAD_DIR_COMPONENT ${COMPIZ_RELEASE_UPLOAD_BASE}/components/${CMAKE_PROJECT_NAME})
242
243 message ("releasing to " ${COMPIZ_RELEASE_UPLOAD_HOST})
244 message (" base: " ${COMPIZ_RELEASE_UPLOAD_BASE})
245 message (" version: " ${COMPIZ_RELEASE_UPLOAD_BASE}/${VERSION})
246 message (" component: ${COMPIZ_RELEASE_UPLOAD_BASE}/components/${CMAKE_PROJECT_NAME}")
247
248 add_custom_target (release-upload-version
249 COMMAND ssh $ENV{USER}@${COMPIZ_RELEASE_UPLOAD_HOST} "mkdir -p ${COMPIZ_RELEASE_UPLOAD_BASE}/${VERSION}" && scp ${CMAKE_PROJECT_NAME}-${VERSION}.tar.bz2 $ENV{USER}@${COMPIZ_RELEASE_UPLOAD_HOST}:${COMPIZ_RELEASE_UPLOAD_DIR_VERSION}
250 COMMENT "Uploading ${CMAKE_PROJECT_NAME}-${VERSION} to ${VERSION}"
251 WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
252
253 # Does nothing for now
254 add_custom_target (release-upload-component)
255 #add_custom_target (release-upload-component
256 # COMMAND ssh $ENV{USER}@${COMPIZ_RELEASE_UPLOAD_HOST} "mkdir -p ${COMPIZ_RELEASE_UPLOAD_BASE}/${VERSION}" && scp ${CMAKE_PROJECT_NAME}-${VERSION}.tar.bz2 ${CMAKE_PROJECT_NAME}-${VERSION}.tar.bz2.asc ${CMAKE_PROJECT_NAME}-${VERSION}.tar.bz2.sha1 ${CMAKE_PROJECT_NAME}-${VERSION}.tar.bz2.sha1.asc $ENV{USER}@${COMPIZ_RELEASE_UPLOAD_HOST}:${COMPIZ_RELEASE_UPLOAD_BASE_DIR_COMPONENT}
257 # COMMENT "Uploading ${CMAKE_PROJECT_NAME}-${VERSION} to ${CMAKE_PROJECT_NAME}/${VERSION}"
258 # WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
259
260 add_custom_target (release-upload)
261
262 add_dependencies (release-upload-component release-upload-version)
263 add_dependencies (release-upload release-upload-component)
264
265endmacro ()
266
267macro (compiz_add_release)
268
269 if (${IS_GIT_REPO})
270 find_program (GEN_GIT_LOG gen-git-log.sh)
271 add_custom_target (authors
272 COMMAND git shortlog -se | cut -c8- > AUTHORS
273 COMMENT "Generating AUTHORS"
274 WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
275 if (NOT (${GEN_GIT_LOG} STREQUAL "GEN_GIT_LOG-NOTFOUND"))
276 add_custom_target (changelog
277 COMMAND ${GEN_GIT_LOG} > ChangeLog
278 COMMENT "Generating ChangeLog"
279 WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
280 else (NOT (${GEN_GIT_LOG} STREQUAL "GEN_GIT_LOG-NOTFOUND"))
281 message ("[WARNING]: gen-git-log.sh is required to make releases, ensure that it is installed into your PATH")
282 endif (NOT (${GEN_GIT_LOG} STREQUAL "GEN_GIT_LOG-NOTFOUND"))
283
284 add_custom_target (news-header echo 'Release ${VERSION} ('`date +%Y-%m-%d`' '`git config user.name`' <'`git config user.email`'>)' > ${CMAKE_BINARY_DIR}/NEWS.update && seq -s "=" `cat ${CMAKE_BINARY_DIR}/NEWS.update | wc -c` | sed 's/[0-9]//g' >> ${CMAKE_BINARY_DIR}/NEWS.update && $ENV{EDITOR} ${CMAKE_BINARY_DIR}/NEWS.update && echo >> ${CMAKE_BINARY_DIR}/NEWS.update
285 COMMAND $ENV{EDITOR} ${CMAKE_BINARY_DIR}/NEWS.update
286 COMMENT "Generating NEWS Header"
287 WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
288 else (${IS_GIT_REPO})
289 if (${IS_BZR_REPO})
290 add_custom_target (authors
291 COMMAND bzr log --long --levels=0 | grep -e "^\\s*author:" -e "^\\s*committer:" | cut -d ":" -f 2 | sort -u > AUTHORS
292 COMMENT "Generating AUTHORS")
293 add_custom_target (changelog
294 COMMAND bzr log --gnu-changelog > ChangeLog
295 COMMENT "Generating ChangeLog")
296
297 add_custom_target (news-header echo > ${CMAKE_BINARY_DIR}/NEWS.update
298 COMMAND echo 'Release ${VERSION} ('`date +%Y-%m-%d`' '`bzr config email`')' > ${CMAKE_BINARY_DIR}/NEWS.update && seq -s "=" `cat ${CMAKE_BINARY_DIR}/NEWS.update | wc -c` | sed 's/[0-9]//g' >> ${CMAKE_BINARY_DIR}/NEWS.update && $ENV{EDITOR} ${CMAKE_BINARY_DIR}/NEWS.update && echo >> ${CMAKE_BINARY_DIR}/NEWS.update
299 COMMENT "Generating NEWS Header"
300 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
301 else (${IS_BZR_REPO})
302 add_custom_target (authors)
303 add_custom_target (changelog)
304 add_custom_target (news-header)
305 endif (${IS_BZR_REPO})
306 endif (${IS_GIT_REPO})
307
308 add_custom_target (news
309 COMMAND cat ${CMAKE_SOURCE_DIR}/NEWS > NEWS.old &&
310 cat NEWS.old >> ${CMAKE_BINARY_DIR}/NEWS.update &&
311 cat NEWS.update > NEWS
312 WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
313
314 add_dependencies (changelog authors)
315 add_dependencies (news-header changelog)
316 add_dependencies (news news-header)
317
318 add_custom_target (release-prep)
319 add_dependencies (release-prep news)
320
321endmacro (compiz_add_release)
73322
74# unsets the given variable323# unsets the given variable
75macro (compiz_unset var)324macro (compiz_unset var)
@@ -120,6 +369,7 @@
120endfunction ()369endfunction ()
121370
122function (compiz_add_plugins_in_folder folder)371function (compiz_add_plugins_in_folder folder)
372 set (COMPIZ_PLUGIN_PACK_BUILD 1)
123 file (373 file (
124 GLOB _plugins_in374 GLOB _plugins_in
125 RELATIVE "${folder}"375 RELATIVE "${folder}"
@@ -256,21 +506,23 @@
256endmacro ()506endmacro ()
257507
258#posix 2008 scandir check508#posix 2008 scandir check
259include (CheckCXXSourceCompiles)509if (CMAKE_CXX_COMPILER)
260CHECK_CXX_SOURCE_COMPILES (510 include (CheckCXXSourceCompiles)
261 "# include <dirent.h>511 CHECK_CXX_SOURCE_COMPILES (
262 int func (const char *d, dirent ***list, void *sort)512 "# include <dirent.h>
263 {513 int func (const char *d, dirent ***list, void *sort)
264 int n = scandir(d, list, 0, (int(*)(const dirent **, const dirent **))sort);514 {
265 return n;515 int n = scandir(d, list, 0, (int(*)(const dirent **, const dirent **))sort);
266 }516 return n;
517 }
267518
268 int main (int, char **)519 int main (int, char **)
269 {520 {
270 return 0;521 return 0;
271 }522 }
272 "523 "
273 HAVE_SCANDIR_POSIX)524 HAVE_SCANDIR_POSIX)
525endif (CMAKE_CXX_COMPILER)
274526
275if (HAVE_SCANDIR_POSIX)527if (HAVE_SCANDIR_POSIX)
276 add_definitions (-DHAVE_SCANDIR_POSIX)528 add_definitions (-DHAVE_SCANDIR_POSIX)
277529
=== modified file 'cmake/CompizPlugin.cmake'
--- cmake/CompizPlugin.cmake 2011-05-17 23:51:02 +0000
+++ cmake/CompizPlugin.cmake 2011-07-07 16:29:45 +0000
@@ -423,6 +423,12 @@
423423
424 compiz_add_uninstall ()424 compiz_add_uninstall ()
425425
426 if (NOT COMPIZ_PLUGIN_PACK_BUILD)
427 compiz_add_git_dist ()
428 compiz_add_release ()
429 compiz_add_release_signoff ()
430 endif (NOT COMPIZ_PLUGIN_PACK_BUILD)
431
426 else ()432 else ()
427 message (STATUS "[WARNING] One or more dependencies for compiz plugin ${plugin} not found. Skipping plugin.")433 message (STATUS "[WARNING] One or more dependencies for compiz plugin ${plugin} not found. Skipping plugin.")
428 message (STATUS "Missing dependencies :${COMPIZ_${_PLUGIN}_MISSING_DEPS}")434 message (STATUS "Missing dependencies :${COMPIZ_${_PLUGIN}_MISSING_DEPS}")
429435
=== modified file 'include/compiz-common.h.in'
--- include/compiz-common.h.in 2009-03-15 23:01:06 +0000
+++ include/compiz-common.h.in 2011-07-07 16:29:45 +0000
@@ -1,9 +1,5 @@
1#ifndef COMPIZ_COMMON_H1#ifndef COMPIZ_COMMON_H
2#define COMPIZ_COMMON_H2#define COMPIZ_COMMON_H
33
4#define COMPIZ_VERSION_MAJOR @COMPIZ_VERSION_MAJOR@4#define COMPIZ_VERSION_STRING "@VERSION@"
5#define COMPIZ_VERSION_MINOR @COMPIZ_VERSION_MINOR@
6#define COMPIZ_VERSION_MICRO @COMPIZ_VERSION_MICRO@
7
8#define COMPIZ_VERSION_STRING "@COMPIZ_VERSION_MAJOR@.@COMPIZ_VERSION_MINOR@.@COMPIZ_VERSION_MICRO@"
9#endif5#endif

Subscribers

People subscribed via source and target branches

to all changes: