2021-10-20 09:26:37 +08:00
|
|
|
diff --git a/gdal/GDALmake.opt.in b/gdal/GDALmake.opt.in
|
|
|
|
index e8d2b05..1f19a4b 100644
|
|
|
|
--- a/gdal/GDALmake.opt.in
|
|
|
|
+++ b/gdal/GDALmake.opt.in
|
|
|
|
@@ -662,3 +662,6 @@ O_OBJ = $(foreach file,$(OBJ),../o/$(file))
|
2021-09-14 05:41:20 +08:00
|
|
|
|
|
|
|
%-clean:
|
|
|
|
$(MAKE) -C $* clean
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+BUILD_TOOLS = @BUILD_TOOLS@
|
|
|
|
\ No newline at end of file
|
2021-10-20 09:26:37 +08:00
|
|
|
diff --git a/gdal/apps/GNUmakefile b/gdal/apps/GNUmakefile
|
2021-09-14 05:41:20 +08:00
|
|
|
index 9624cf7..f91403d 100644
|
2021-10-20 09:26:37 +08:00
|
|
|
--- a/gdal/apps/GNUmakefile
|
|
|
|
+++ b/gdal/apps/GNUmakefile
|
2021-09-14 05:41:20 +08:00
|
|
|
@@ -43,6 +43,11 @@ NON_DEFAULT_LIST = multireadtest$(EXE) dumpoverviews$(EXE) \
|
|
|
|
gdaltorture$(EXE) gdal2ogr$(EXE) test_ogrsf$(EXE) \
|
|
|
|
gdalasyncread$(EXE) testreprojmulti$(EXE)
|
|
|
|
|
|
|
|
+ifeq ($(BUILD_TOOLS),no)
|
|
|
|
+BIN_LIST =
|
|
|
|
+NON_DEFAULT_LIST =
|
|
|
|
+endif
|
|
|
|
+
|
|
|
|
default: gdal-config-inst gdal-config $(BIN_LIST)
|
|
|
|
|
|
|
|
all: default $(NON_DEFAULT_LIST)
|
2021-10-20 09:26:37 +08:00
|
|
|
diff --git a/gdal/apps/makefile.vc b/gdal/apps/makefile.vc
|
2021-09-14 05:41:20 +08:00
|
|
|
index 6e1fc9b..66f9b29 100644
|
2021-10-20 09:26:37 +08:00
|
|
|
--- a/gdal/apps/makefile.vc
|
|
|
|
+++ b/gdal/apps/makefile.vc
|
2021-09-14 05:41:20 +08:00
|
|
|
@@ -20,6 +20,7 @@ GNM_PROGRAMS = gnmmanage.exe gnmanalyse.exe
|
|
|
|
!ENDIF
|
|
|
|
|
|
|
|
|
|
|
|
+!IF "$(BUILD_TOOLS)" == "1"
|
|
|
|
default: gdal_translate.exe gdalinfo.exe gdaladdo.exe gdalwarp.exe \
|
|
|
|
nearblack.exe gdalmanage.exe gdalenhance.exe gdaltransform.exe\
|
|
|
|
gdaldem.exe gdallocationinfo.exe gdalsrsinfo.exe gdalmdiminfo.exe \
|
|
|
|
@@ -28,6 +29,10 @@ default: gdal_translate.exe gdalinfo.exe gdaladdo.exe gdalwarp.exe \
|
|
|
|
all: default multireadtest.exe \
|
|
|
|
dumpoverviews.exe gdalwarpsimple.exe gdalflattenmask.exe \
|
|
|
|
gdaltorture.exe gdal2ogr.exe test_ogrsf.exe
|
|
|
|
+!ELSE
|
|
|
|
+default:
|
|
|
|
+all:
|
|
|
|
+!ENDIF
|
|
|
|
OBJ = commonutils.obj gdalinfo_lib.obj gdal_translate_lib.obj gdalwarp_lib.obj ogr2ogr_lib.obj \
|
|
|
|
gdaldem_lib.obj nearblack_lib.obj gdal_grid_lib.obj gdal_rasterize_lib.obj gdalbuildvrt_lib.obj \
|
|
|
|
gdalmdiminfo_lib.obj gdalmdimtranslate_lib.obj
|
|
|
|
@@ -223,5 +228,9 @@ clean:
|
|
|
|
-del *.manifest
|
|
|
|
-del *.exp
|
|
|
|
|
|
|
|
+!IF "$(BUILD_TOOLS)" == "1"
|
|
|
|
install: default
|
|
|
|
copy *.exe $(BINDIR)
|
|
|
|
+!ELSE
|
|
|
|
+install:
|
|
|
|
+!ENDIF
|
|
|
|
\ No newline at end of file
|
2021-10-20 09:26:37 +08:00
|
|
|
diff --git a/gdal/configure.ac b/gdal/configure.ac
|
|
|
|
index 1098b39..e4d985e 100644
|
|
|
|
--- a/gdal/configure.ac
|
|
|
|
+++ b/gdal/configure.ac
|
|
|
|
@@ -6165,6 +6165,16 @@ case "${host_os}" in
|
2021-09-14 05:41:20 +08:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
+BUILD_TOOLS=yes
|
|
|
|
+AC_ARG_WITH([tools], AS_HELP_STRING([--with-tools], [Build the tools]),,)
|
|
|
|
+if test "$with_tools" = "yes"; then
|
|
|
|
+ AC_MSG_RESULT([enabled])
|
|
|
|
+else
|
|
|
|
+ BUILD_TOOLS=no
|
|
|
|
+ AC_MSG_RESULT([disabled by user])
|
|
|
|
+fi
|
|
|
|
+AC_SUBST(BUILD_TOOLS,$BUILD_TOOLS)
|
|
|
|
+
|
2021-11-14 06:43:11 +08:00
|
|
|
AC_CONFIG_FILES([GDALmake.opt])
|
|
|
|
AC_OUTPUT
|
2021-09-14 05:41:20 +08:00
|
|
|
|