Skip to content

Commit

Permalink
Move 'dlg' submodule to subprojects directory.
Browse files Browse the repository at this point in the history
This is for future changes with Meson, which doesn't allow a
different name for its `subprojects` directory.  Having both a
`submodules` and a `subprojects` directory is confusing.

* .gitmodules, autogen.sh (copy_submodule_files, DLG_INC_DIR,
DLG_SRC_DIR): Updated.

* builds/toplevel.mk (<top-level>, do-dist),
builds/windows/vc2010/script.bat: Updated.

* src/tools/no-copyright: Updated.
  • Loading branch information
lemzwerg committed Feb 16, 2021
1 parent 215ae25 commit 92bd99b
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "submodules/dlg"]
path = submodules/dlg
[submodule "dlg"]
path = subprojects/dlg
url = https://github.com/nyorain/dlg.git
16 changes: 16 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
2021-02-16 Werner Lemberg <[email protected]>

Move 'dlg' submodule to `subprojects` directory.

This is for future changes with Meson, which doesn't allow a
different name for its `subprojects` directory. Having both a
`submodules` and a `subprojects` directory is confusing.

* .gitmodules, autogen.sh (copy_submodule_files, DLG_INC_DIR,
DLG_SRC_DIR): Updated.

* builds/toplevel.mk (<top-level>, do-dist),
builds/windows/vc2010/script.bat: Updated.

* src/tools/no-copyright: Updated.

2021-02-16 Dominik Röttsches <[email protected]>

[sfnt] Update paint format values to support non-variable paints.
Expand Down
8 changes: 4 additions & 4 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -172,18 +172,18 @@ chmod +x ./configure
# Copy all necessary 'dlg' files.
copy_submodule_files ()
{
echo "Copying files from \`submodules/dlg' to \`src/dlg' and \`include/dlg'"
echo "Copying files from \`subprojects/dlg' to \`src/dlg' and \`include/dlg'"
mkdir include/dlg 2> /dev/null
cp $DLG_INC_DIR/output.h include/dlg
cp $DLG_INC_DIR/dlg.h include/dlg
cp $DLG_SRC_DIR/* src/dlg
}

DLG_INC_DIR=submodules/dlg/include/dlg
DLG_SRC_DIR=submodules/dlg/src/dlg
DLG_INC_DIR=subprojects/dlg/include/dlg
DLG_SRC_DIR=subprojects/dlg/src/dlg

if ! test -d "$DLG_INC_DIR"; then
echo "Checking out submodule in \`submodules/dlg':"
echo "Checking out submodule in \`subprojects/dlg':"
git submodule init
git submodule update
fi
Expand Down
16 changes: 8 additions & 8 deletions builds/toplevel.mk
Original file line number Diff line number Diff line change
Expand Up @@ -113,23 +113,23 @@ ifdef check_platform
include $(TOP_DIR)/builds/detect.mk

# For builds directly from the git repository we need to copy files
# from `submodule/dlg' to `src/dlg' and `include/dlg'.
# from `subprojects/dlg' to `src/dlg' and `include/dlg'.
#
ifeq ($(wildcard src/dlg/dlg.*),)
ifeq ($(wildcard submodules/dlg/*),)
$(info Checking out submodule in `submodules/dlg')
ifeq ($(wildcard subprojects/dlg/*),)
$(info Checking out submodule in `subprojects/dlg')
$(shell git submodule init)
$(shell git submodule update)
endif

$(info Copying files from `submodules/dlg' to `src/dlg' and `include/dlg')
$(info Copying files from `subprojects/dlg' to `src/dlg' and `include/dlg')
$(shell mkdir $(subst /,$(SEP),include/dlg) $(NO_OUTPUT))
$(shell $(COPY) \
$(subst /,$(SEP),submodules/dlg/include/dlg/output.h include/dlg))
$(subst /,$(SEP),subprojects/dlg/include/dlg/output.h include/dlg))
$(shell $(COPY) \
$(subst /,$(SEP),submodules/dlg/include/dlg/dlg.h include/dlg))
$(subst /,$(SEP),subprojects/dlg/include/dlg/dlg.h include/dlg))
$(shell $(COPY) \
$(subst /,$(SEP),submodules/dlg/src/dlg/dlg.c src/dlg))
$(subst /,$(SEP),subprojects/dlg/src/dlg/dlg.c src/dlg))
endif

# This rule makes sense for Unix only to remove files created by a run of
Expand Down Expand Up @@ -292,6 +292,6 @@ do-dist: distclean refdoc
rm -f docs/mkdocs.yml

@# Remove more stuff related to git.
rm -rf submodules
rm -rf subprojects

# EOF
8 changes: 4 additions & 4 deletions builds/windows/vc2010/script.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
:: Move to Top Dir
cd ..\..\..\

:: Copy dlg's files from `submodules\dlg' to `src\dlg'
:: Copy dlg's files from `subprojects\dlg' to `src\dlg'
IF NOT EXIST include\dlg (
mkdir include\dlg
COPY submodules\dlg\include\dlg\dlg.h include\dlg
COPY submodules\dlg\include\dlg\output.h include\dlg
COPY submodules\dlg\src\dlg\dlg.c src\dlg\ )
COPY subprojects\dlg\include\dlg\dlg.h include\dlg
COPY subprojects\dlg\include\dlg\output.h include\dlg
COPY subprojects\dlg\src\dlg\dlg.c src\dlg\ )
2 changes: 1 addition & 1 deletion src/tools/no-copyright
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@ src/gzip/zutil.h
src/tools/apinames.c
src/tools/ftrandom/ftrandom.c
#
submodules/dlg
subprojects/dlg
#
# EOF

0 comments on commit 92bd99b

Please sign in to comment.