Improve setup for 'dlg' library.
* autogen.sh (copy_submodule_file), builds/toplevel.mk: Redirect stderr to `/dev/null`. * builds/toplevel.mk: Move code block to handle 'dlg' stuff into `check_platform` conditional. Also fix wildcard expressions for guarding `git submodule` commands. Also make file copying work with non-Unix platforms (untested).
This commit is contained in:
parent
fcdab61ed1
commit
f6b0fd7b79
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
||||||
|
2020-12-02 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
|
Improve setup for 'dlg' library.
|
||||||
|
|
||||||
|
* autogen.sh (copy_submodule_file), builds/toplevel.mk: Redirect
|
||||||
|
stderr to `/dev/null`.
|
||||||
|
|
||||||
|
* builds/toplevel.mk: Move code block to handle 'dlg' stuff into
|
||||||
|
`check_platform` conditional.
|
||||||
|
Also fix wildcard expressions for guarding `git submodule` commands.
|
||||||
|
Also make file copying work with non-Unix platforms (untested).
|
||||||
|
|
||||||
2020-12-01 Werner Lemberg <wl@gnu.org>
|
2020-12-01 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
[build] Use gcc (and clang) in C99 mode.
|
[build] Use gcc (and clang) in C99 mode.
|
||||||
|
|
|
@ -166,7 +166,7 @@ chmod +x ./configure
|
||||||
copy_submodule_files ()
|
copy_submodule_files ()
|
||||||
{
|
{
|
||||||
echo "Copying files from \`submodules/dlg' to \`src/dlg'"
|
echo "Copying files from \`submodules/dlg' to \`src/dlg'"
|
||||||
mkdir src/dlg/dlg
|
mkdir src/dlg/dlg 2> /dev/null
|
||||||
cp $DLG_INC_DIR/dlg.h src/dlg/dlg
|
cp $DLG_INC_DIR/dlg.h src/dlg/dlg
|
||||||
cp $DLG_INC_DIR/output.h src/dlg/dlg
|
cp $DLG_INC_DIR/output.h src/dlg/dlg
|
||||||
cp $DLG_SRC_DIR/* src/dlg
|
cp $DLG_SRC_DIR/* src/dlg
|
||||||
|
|
|
@ -103,23 +103,6 @@ ifneq ($(findstring setup,$(MAKECMDGOALS)),)
|
||||||
check_platform := 1
|
check_platform := 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# For builds directly from the git repository we need to copy files
|
|
||||||
# from `submodule/dlg' to `src/dlg'.
|
|
||||||
#
|
|
||||||
ifeq ($(wildcard src/dlg/dlg.*),)
|
|
||||||
ifeq ($(wildcard submodules/dlg/dlg.*),)
|
|
||||||
$(info Checking out submodule in `submodules/dlg')
|
|
||||||
$(shell git submodule init)
|
|
||||||
$(shell git submodule update)
|
|
||||||
endif
|
|
||||||
|
|
||||||
$(info Copying files from `submodules/dlg' to `src/dlg')
|
|
||||||
$(shell mkdir src/dlg/dlg)
|
|
||||||
$(shell cp submodules/dlg/include/dlg/dlg.h src/dlg/dlg)
|
|
||||||
$(shell cp submodules/dlg/include/dlg/output.h src/dlg/dlg)
|
|
||||||
$(shell cp submodules/dlg/src/dlg/dlg.c src/dlg/)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Include the automatic host platform detection rules when we need to
|
# Include the automatic host platform detection rules when we need to
|
||||||
# check the platform.
|
# check the platform.
|
||||||
#
|
#
|
||||||
|
@ -129,6 +112,26 @@ ifdef check_platform
|
||||||
|
|
||||||
include $(TOP_DIR)/builds/detect.mk
|
include $(TOP_DIR)/builds/detect.mk
|
||||||
|
|
||||||
|
# For builds directly from the git repository we need to copy files
|
||||||
|
# from `submodule/dlg' to `src/dlg'.
|
||||||
|
#
|
||||||
|
ifeq ($(wildcard src/dlg/dlg.*),)
|
||||||
|
ifeq ($(wildcard submodules/dlg/*),)
|
||||||
|
$(info Checking out submodule in `submodules/dlg')
|
||||||
|
$(shell git submodule init)
|
||||||
|
$(shell git submodule update)
|
||||||
|
endif
|
||||||
|
|
||||||
|
$(info Copying files from `submodules/dlg' to `src/dlg')
|
||||||
|
$(shell mkdir $(subst /,$(SEP),src/dlg/dlg) $(NO_OUTPUT))
|
||||||
|
$(shell $(COPY) \
|
||||||
|
$(subst /,$(SEP),submodules/dlg/include/dlg/dlg.h src/dlg/dlg))
|
||||||
|
$(shell $(COPY) \
|
||||||
|
$(subst /,$(SEP),submodules/dlg/include/dlg/output.h src/dlg/dlg))
|
||||||
|
$(shell $(COPY) \
|
||||||
|
$(subst /,$(SEP),submodules/dlg/src/dlg/dlg.c src/dlg))
|
||||||
|
endif
|
||||||
|
|
||||||
# This rule makes sense for Unix only to remove files created by a run of
|
# This rule makes sense for Unix only to remove files created by a run of
|
||||||
# the configure script which hasn't been successful (so that no
|
# the configure script which hasn't been successful (so that no
|
||||||
# `config.mk' has been created). It uses the built-in $(RM) command of
|
# `config.mk' has been created). It uses the built-in $(RM) command of
|
||||||
|
|
Loading…
Reference in New Issue