summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wong <mark@2ndQuadrant.com>2019-06-11 23:10:55 +0000
committerMark Wong <mark@2ndQuadrant.com>2019-06-26 22:30:23 +0000
commita495133121b3ed9881564e2d7269de88d0f89856 (patch)
tree066d17374e1a745d0fc67998376d142a8b9c45ae
parente63267fb25f26072ef0bfbecb933dce9491f7e28 (diff)
Add make target for creating source packages
Updated cpack rules to ignore additional files that don't need to be included in the packaging.
-rw-r--r--CMakeLists.txt10
-rw-r--r--Makefile7
-rw-r--r--README.git11
3 files changed, 13 insertions, 15 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dbc93cc..4c0f661 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -301,6 +301,10 @@ set(
)
set(
CPACK_SOURCE_IGNORE_FILES
+ "${CPACK_SOURCE_IGNORE_FILES};/\\\\.gitignore\\$"
+)
+set(
+ CPACK_SOURCE_IGNORE_FILES
"${CPACK_SOURCE_IGNORE_FILES};/CMakeCache\\\\.txt\\$"
)
set(
@@ -333,15 +337,15 @@ set(
)
set(
CPACK_SOURCE_IGNORE_FILES
- "${CPACK_SOURCE_IGNORE_FILES};/pg_top\\\\.1\\$"
+ "${CPACK_SOURCE_IGNORE_FILES};/Makefile\\$"
)
set(
CPACK_SOURCE_IGNORE_FILES
- "${CPACK_SOURCE_IGNORE_FILES};/sigdesc\\\\.h\\$"
+ "${CPACK_SOURCE_IGNORE_FILES};/pg_top\\\\.1\\$"
)
set(
CPACK_SOURCE_IGNORE_FILES
- "${CPACK_SOURCE_IGNORE_FILES};/README\\\\.git\\$"
+ "${CPACK_SOURCE_IGNORE_FILES};/sigdesc\\\\.h\\$"
)
include(CPack)
diff --git a/Makefile b/Makefile
index 65c3d4d..4964ca4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
default:
- @echo "targets: clean, debug, release"
+ @echo "targets: clean, debug, package, release"
clean:
-rm -rf _builds
@@ -8,6 +8,11 @@ debug:
cmake -H. -B_builds/debug -DCMAKE_BUILD_TYPE=Debug
cd _builds/debug && make
+package:
+ git checkout-index --prefix=_builds/source/ -a
+ cmake -H_builds/source -B_builds/source
+ cd _builds/source && make package_source
+
release:
cmake -H. -B_builds/release
cd _builds/release && make
diff --git a/README.git b/README.git
deleted file mode 100644
index cecdb25..0000000
--- a/README.git
+++ /dev/null
@@ -1,11 +0,0 @@
-(This file does not appear in release tarballs.)
-
-If you are using a git checkout, here are the packaging instructions.
-
-Creating Source Packages
-------------------------
-
-git checkout-index --prefix=/tmp/pg_top/ -a
-cd /tmp/pg_top
-cmake CMakeLists.txt
-make package_source