-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New script to create a source package
TN: TA19-011
- Loading branch information
Showing
3 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- libadalang.gpr.old | ||
+++ libadalang.gpr | ||
@@ -25,10 +25,7 @@ library project Libadalang is | ||
Enable_Warnings : Boolean := | ||
external ("LIBADALANG_WARNINGS", "false"); | ||
|
||
- Primary_Source_Dirs := | ||
- ("/tmp/libadalang-21.0.0/include/libadalang", "/tmp/lal-21.0.0/ada/extensions/src"); | ||
- | ||
- for Source_Dirs use Primary_Source_Dirs; | ||
+ for Source_Dirs use ("src"); | ||
|
||
for Languages use | ||
("Ada", "C") | ||
@@ -41,8 +38,8 @@ library project Libadalang is | ||
; | ||
|
||
for Library_Dir use | ||
- "../libadalang/" & Library_Kind_Param & "/" & Build_Mode; | ||
- for Object_Dir use "../../obj/libadalang/" & Build_Mode; | ||
+ "lib/" & Build_Mode; | ||
+ for Object_Dir use "obj/" & Build_Mode; | ||
|
||
Target := Libadalang'Target; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- mains.gpr.old | ||
+++ mains.gpr | ||
@@ -1,4 +1,3 @@ | ||
- | ||
with "langkit_support"; | ||
with "libadalang"; | ||
|
||
@@ -9,12 +8,10 @@ | ||
|
||
for Languages use ("Ada"); | ||
|
||
- | ||
for Source_Dirs use ( | ||
- ".", "../../lal-21.0.0/ada/testsuite/ada", "../../lal-21.0.0/ada/testsuite/ada/gnat_compare" | ||
+ "src-mains" | ||
); | ||
- for Exec_Dir use "../bin"; | ||
- for Object_Dir use "../obj/mains"; | ||
+ for Object_Dir use "obj-mains"; | ||
|
||
for Main use ( | ||
"gnat_compare.adb", "nameres.adb", "navigate.adb", "parse.adb" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#! /bin/sh | ||
|
||
set -e | ||
|
||
RELEASE=21.0.0 | ||
SRC_PKG=/tmp/libadalang-$RELEASE.tar.gz | ||
|
||
# Make sure the appropriate Langkit sources are checked out in | ||
# /tmp/langkit-$RELEASE and Libadalang sources in /tmp/lal-$RELEASE | ||
SRC_DIR=/tmp/lal-$RELEASE | ||
cd $SRC_DIR | ||
export PYTHONPATH=/tmp/langkit-$RELEASE:$PYTHONPATH | ||
|
||
BUILD_DIR=/tmp/libadalang-$RELEASE | ||
rm -rf $BUILD_DIR | ||
|
||
# Generate the Libadalang and Mains projects | ||
ada/manage.py --build-dir=$BUILD_DIR --no-langkit-support generate | ||
|
||
# Reorganize the trees for libadalang.gpr | ||
mv $BUILD_DIR/lib/gnat/libadalang.gpr $BUILD_DIR/ | ||
patch -d $BUILD_DIR -p0 -f -i $SRC_DIR/utils/libadalang.gpr.patch | ||
|
||
mv $BUILD_DIR/include/libadalang.h $BUILD_DIR/src/ | ||
mv $BUILD_DIR/include/libadalang/*.ad* $BUILD_DIR/src/ | ||
mv $BUILD_DIR/include/libadalang/*.c $BUILD_DIR/src/ | ||
cp -a $SRC_DIR/ada/extensions/src/* $BUILD_DIR/src/ | ||
|
||
# Reorganize the trees for mains.gpr | ||
mv $BUILD_DIR/src/mains.gpr $BUILD_DIR/ | ||
patch -d $BUILD_DIR -p0 -f -i $SRC_DIR/utils/mains.gpr.patch | ||
|
||
mkdir $BUILD_DIR/src-mains | ||
mv $BUILD_DIR/src/parse.adb $BUILD_DIR/src-mains/ | ||
cp -ar $SRC_DIR/ada/testsuite/ada/*.ad* $BUILD_DIR/src-mains/ | ||
cp -ar $SRC_DIR/ada/testsuite/ada/gnat_compare/*.ad* $BUILD_DIR/src-mains/ | ||
|
||
mv $BUILD_DIR/bin/lal_playground $BUILD_DIR/python | ||
rm -r $BUILD_DIR/bin | ||
rm -r $BUILD_DIR/include | ||
rm -r $BUILD_DIR/lib | ||
rm -r $BUILD_DIR/obj | ||
|
||
# Create the release tarball | ||
tar czf $SRC_PKG -C /tmp libadalang-$RELEASE | ||
sha512sum $SRC_PKG |