diff --git a/docs/user/getting_started.rst b/docs/user/getting_started.rst index 502cca42..27463805 100644 --- a/docs/user/getting_started.rst +++ b/docs/user/getting_started.rst @@ -212,11 +212,11 @@ GLUON_DEBUG Setting ``GLUON_DEBUG=1`` will provide firmware images including debugging symbols usable with GDB or similar tools. Requires a device or target with at least 16 MB of flash space, e.g. `x86-64`. Unset by default. -GLUON_DO_NOT_MINIFY - Setting ``GLUON_DO_NOT_MINIFY`` will omit the minification of scripts during the build process. - This setting is handy if human readable scripts on the devices are desired for development purposes. - Be aware, that this will increase the size of the resulting images and is therefore not suitable - for devices with small flash chips. +GLUON_MINIFY + Setting ``GLUON_MINIFY`` will minify scripts during the build process. This flag is enabled by + default. Disabling this flag is handy if human readable scripts on the devices are desired for + development purposes. Be aware, that this will increase the size of the resulting images and + is therefore not suitable for devices with small flash chips. GLUON_DEVICES List of devices to build. The list contains the Gluon profile name of a device, the profile diff --git a/package/gluon-core/Config.in b/package/gluon-core/Config.in index fca737c1..95465146 100644 --- a/package/gluon-core/Config.in +++ b/package/gluon-core/Config.in @@ -348,5 +348,6 @@ config GLUON_SPECIALIZE_KERNEL select KERNEL_IP_NF_TARGET_MASQUERADE select KERNEL_IP_NF_TARGET_REDIRECT -config GLUON_DO_NOT_MINIFY - bool "Disables minification of gluon scripts during build" +config GLUON_MINIFY + bool "Minify Gluon scripts" + default y diff --git a/package/gluon-status-page/Makefile b/package/gluon-status-page/Makefile index 923f68c7..04d5b119 100644 --- a/package/gluon-status-page/Makefile +++ b/package/gluon-status-page/Makefile @@ -10,12 +10,18 @@ define Package/gluon-status-page DEPENDS:=+gluon-web +gluon-neighbour-info +gluon-respondd +uhttpd +sse-multiplex +libiwinfo +libjson-c +libnl-tiny +libubus-lua endef +PKG_CONFIG_DEPENDS += CONFIG_GLUON_MINIFY + define Package/gluon-status-page/install $(Gluon/Build/Install) $(INSTALL_DIR) $(1)/lib/gluon/status-page/providers $(INSTALL_BIN) $(PKG_BUILD_DIR)/stations $(1)/lib/gluon/status-page/providers/ +ifndef GLUON_MINIFY + $(CP) ./javascript/status-page.js $(1)/lib/gluon/status-page/www/static/status-page.js +endif + $(INSTALL_DIR) $(1)/lib/gluon/status-page/view/ $(LN) /lib/gluon/web/i18n $(1)/lib/gluon/status-page/ $(LN) /lib/gluon/web/view/error $(1)/lib/gluon/status-page/view/ diff --git a/package/gluon.mk b/package/gluon.mk index 7246a318..c489b37c 100644 --- a/package/gluon.mk +++ b/package/gluon.mk @@ -3,6 +3,13 @@ PKG_FILE_DEPENDS += $(GLUON_MK) PKG_BUILD_DEPENDS += luasrcdiet/host +<<<<<<< HEAD +======= +ifneq ($(wildcard ./luasrc/.),) + PKG_CONFIG_DEPENDS += CONFIG_GLUON_MINIFY +endif + +>>>>>>> 51dde9fa... rebase and so on ifneq ($(wildcard ./src/respondd.c),) PKG_BUILD_DEPENDS += respondd endif @@ -57,12 +64,14 @@ endef define GluonSrcDiet rm -rf $(2) $(CP) $(1) $(2) +ifdef GLUON_MINIFY $(FIND) $(2) -type f | while read src; do \ if luasrcdiet --noopt-binequiv -o "$$$$src.o" "$$$$src"; then \ chmod $$$$(stat -c%a "$$$$src") "$$$$src.o"; \ mv "$$$$src.o" "$$$$src"; \ fi; \ done +endif endef diff --git a/targets/generic b/targets/generic index ffb505b3..562d1850 100644 --- a/targets/generic +++ b/targets/generic @@ -60,8 +60,8 @@ if istrue(env.GLUON_DEBUG) then try_config 'CONFIG_TARGET_ROOTFS_PARTSIZE=500' end -if envtrue.GLUON_DO_NOT_MINIFY then - config 'CONFIG_GLUON_DO_NOT_MINIFY=y' +if istrue(env.GLUON_MINIFY) then + config 'CONFIG_GLUON_MINIFY=y' end packages {