mirror of https://github.com/ecmwf/eccodes.git
Cmake changes and merges from master
This commit is contained in:
parent
6402af8cfa
commit
523f3df490
|
@ -1,3 +1,27 @@
|
|||
# Generated stuff from libtool, automake etc
|
||||
Makefile
|
||||
Makefile.in
|
||||
*.lo
|
||||
*.la
|
||||
.deps/
|
||||
/libtool
|
||||
config.h.in
|
||||
lex.yy.c
|
||||
stamp-h1
|
||||
src/config.h
|
||||
autom4te.cache/
|
||||
config.log
|
||||
config.status
|
||||
configure
|
||||
grib_api.spec
|
||||
grib_api.pc
|
||||
grib_api_f90.pc
|
||||
perl/GRIB-API/Makefile.PL
|
||||
rpms/grib_api.pc
|
||||
rpms/grib_api.spec
|
||||
rpms/grib_api_f90.pc
|
||||
aclocal.m4
|
||||
|
||||
# compiled source #
|
||||
###################
|
||||
*.com
|
||||
|
|
|
@ -80,7 +80,9 @@ add_subdirectory( definitions )
|
|||
add_subdirectory( tests )
|
||||
add_subdirectory( tigge )
|
||||
add_subdirectory( examples )
|
||||
# add_subdirectory( samples )
|
||||
|
||||
add_subdirectory( samples )
|
||||
add_subdirectory( ifs_samples ) # must come after samples
|
||||
|
||||
# ecbuild_dont_pack( DIRS samples DONT_PACK_REGEX "*.grib" )
|
||||
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
file( GLOB definition_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.def" )
|
||||
file( GLOB table_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.table" )
|
||||
|
||||
install( FILES ${definition_files} ${table_files}
|
||||
DESTINATION share/${PROJECT_NAME}/definitions
|
||||
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ )
|
||||
|
||||
install( DIRECTORY budg cdf common grib1 grib2 gts mars tide
|
||||
DESTINATION share/${PROJECT_NAME}/definitions
|
||||
FILES_MATCHING
|
||||
PATTERN "*.def"
|
||||
PATTERN "*.table"
|
||||
PATTERN "4.2.192.*.table" EXCLUDE
|
||||
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ )
|
|
@ -105,7 +105,7 @@ INPUT = grib_api.dox \
|
|||
../tools/grib_keys.dox \
|
||||
../tools/grib_copy.dox \
|
||||
../tools/grib_index_build.dox \
|
||||
../python/gribapi.py
|
||||
../python/eccode.py
|
||||
FILE_PATTERNS = *.c \
|
||||
*.cc \
|
||||
*.cxx \
|
||||
|
|
|
@ -4,5 +4,6 @@ if( GRB_API_FORTRAN )
|
|||
|
||||
# add here the building of fortran bindings
|
||||
|
||||
install( FILES grib_api_F77.h DESTINATION include/${PROJECT_NAME} )
|
||||
|
||||
endif()
|
||||
|
|
|
@ -2,11 +2,10 @@
|
|||
#
|
||||
# This software is licensed under the terms of the Apache Licence Version 2.0
|
||||
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
|
||||
#
|
||||
#
|
||||
# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
|
||||
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
|
||||
#
|
||||
|
||||
# START grib1::section
|
||||
# SECTION 4, Binary data section
|
||||
# Length of section
|
||||
|
|
|
@ -316,3 +316,5 @@ ecbuild_add_library( TARGET grib_api
|
|||
|
||||
|
||||
# TODO: add support for jpg and png
|
||||
|
||||
install( FILES grib_api.h DESTINATION include/${PROJECT_NAME} )
|
|
@ -3,22 +3,21 @@
|
|||
|
||||
grib_errors.c : grib_errors.txt errors.pl
|
||||
./errors.pl
|
||||
cmp grib_errors.c grib_errors.c.new || (p4 edit grib_errors.c ; cp grib_errors.c.new grib_errors.c)
|
||||
cmp grib_api.h grib_api.h.new || (p4 edit grib_api.h ; cp grib_api.h.new grib_api.h)
|
||||
cmp ../fortran/grib_api_constants.h grib_api_constants.h.new || (p4 edit ../fortran/grib_api_constants.h ; cp grib_api_constants.h.new ../fortran/grib_api_constants.h)
|
||||
cmp ../python/grib_errors.h grib_errors.h.new || (p4 edit ../python/grib_errors.h ; cp grib_errors.h.new ../python/grib_errors.h)
|
||||
cmp grib_errors.c grib_errors.c.new || (cp grib_errors.c.new grib_errors.c)
|
||||
cmp grib_api.h grib_api.h.new || (cp grib_api.h.new grib_api.h)
|
||||
cmp ../fortran/grib_api_constants.h grib_api_constants.h.new || (cp grib_api_constants.h.new ../fortran/grib_api_constants.h)
|
||||
cmp ../python/grib_errors.h grib_errors.h.new || (cp grib_errors.h.new ../python/grib_errors.h)
|
||||
|
||||
|
||||
proto:;-p4 edit grib_api_prototypes.h;mkptypes -A $(libgrib_api_a_prototypes) $(libgrib_api_extra_prototypes) > grib_api_prototypes.h
|
||||
proto:;-chmod +w grib_api_prototypes.h;mkptypes -A $(libgrib_api_a_prototypes) $(libgrib_api_extra_prototypes) > grib_api_prototypes.h
|
||||
test:all;(cd ../tests; make tests)
|
||||
|
||||
templates:
|
||||
-p4 edit grib_templates.h
|
||||
-chmod +w grib_templates.h
|
||||
./grib2c.pl ../templates/*.grib
|
||||
|
||||
grib_lex.c : gribl.l grib_yacc.h
|
||||
$(LEX) gribl.l
|
||||
p4 edit grib_lex.c
|
||||
sed 's/yy/grib_yy/g' < $(LEX_OUTPUT_ROOT).c | sed 's/static void grib_yyunput/void grib_yyunput/' > grib_lex1.c
|
||||
sed 's/fgetc/getc/g' < grib_lex1.c > grib_lex.c
|
||||
rm -f grib_lex1.c
|
||||
|
@ -26,11 +25,9 @@ grib_lex.c : gribl.l grib_yacc.h
|
|||
|
||||
grib_yacc.h grib_yacc.c : griby.y
|
||||
$(YACC) -d griby.y
|
||||
p4 edit grib_yacc.c
|
||||
sed 's/yy/grib_yy/g' < y.tab.c > grib_yacc1.c
|
||||
sed 's/fgetc/getc/g' < grib_yacc1.c > grib_yacc.c
|
||||
rm -f grib_yacc1.c
|
||||
p4 edit grib_yacc.h
|
||||
sed 's/yy/grib_yy/g' < y.tab.h > grib_yacc.h
|
||||
rm -f y.tab.c y.tab.h
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@ use Data::Dumper;
|
|||
my $name;
|
||||
my %entries;
|
||||
|
||||
system("p4 edit grib_templates.h");
|
||||
open(OUT,">grib_templates.h") or "die grib_templates.h: $!";
|
||||
print OUT "/* This file is automatically generated by $0, do not edit */\n\n";
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ EOF
|
|||
|
||||
cat grib_accessor_factory_hash_list | sed 's/\/\*/#/g' >> accessor_class_list.gperf
|
||||
|
||||
p4 edit grib_accessor_classes_hash.c
|
||||
# editing grib_accessor_classes_hash.c
|
||||
|
||||
gperf -W classes -t -G -H grib_accessor_classes_get_id -N grib_accessor_classes_hash -m 1 -j 1 accessor_class_list.gperf | sed s/__inline//g | sed s/inline//g > grib_accessor_classes_hash.c
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ foreach $name ( @ARGV )
|
|||
if(compare_text("$name.tmp",$name))
|
||||
{
|
||||
print "UPDATING file $name\n";
|
||||
system("p4 edit $name") unless(-w $name);
|
||||
system("chmod +w $name") unless(-w $name);
|
||||
cp($name,"$name.old") or die "cp($name,$name.old): $!";
|
||||
cp("$name.tmp",$name) or die "cp($name.tmp,$name): $!";
|
||||
}
|
||||
|
@ -211,7 +211,7 @@ EOF
|
|||
if(-f $file)
|
||||
{
|
||||
local $_;
|
||||
system("p4 edit $file") unless(-w $file);
|
||||
system("chmmod +w $file") unless(-w $file);
|
||||
open(F,"<$file") or die "$file: $!";
|
||||
|
||||
while(<F>)
|
||||
|
|
|
@ -7,7 +7,7 @@ cd ../tests
|
|||
|
||||
cd ../src
|
||||
|
||||
p4 edit keys grib_hash_keys.c
|
||||
# Editing keys grib_hash_keys.c
|
||||
|
||||
gperf -I -t -G -H hash_keys -N grib_keys_hash_get -m 3 ../tests/keys | sed s/__inline//g | sed s/inline//g > grib_hash_keys.c
|
||||
|
||||
|
|
Loading…
Reference in New Issue