working with submodules

This commit is contained in:
Norayr Chilingarian 2022-01-10 20:50:00 +04:00
parent 42dc7d3a41
commit 4a233403ed
3 changed files with 25 additions and 28 deletions

9
.gitmodules vendored
View file

@ -1,9 +1,6 @@
[submodule "Internet"]
path = Internet
url = https://github.com/norayr/Internet
[submodule "lists"]
path = lists
url = https://github.com/norayr/lists
[submodule "dps/opts"] [submodule "dps/opts"]
path = dps/opts path = dps/opts
url = git@github.com:norayr/opts url = git@github.com:norayr/opts
[submodule "dps/time"]
path = dps/time
url = git@github.com:norayr/time

1
dps/time Submodule

@ -0,0 +1 @@
Subproject commit c17a1c7d884c5238f3d532bc8943c4121b25bf88

View file

@ -1,26 +1,25 @@
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
mkfile_dir_path := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
build_dir_path := $(mkfile_dir_path)/build
current_dir := $(notdir $(patsubst %/,%,$(dir $(mkfile_path))))
BLD := $(mkfile_dir_path)/build
VOC = voc VOC = voc
VERSION_FILE = ./VersionFile.json VERSION_FILE = ./VersionFile.json
BUILDDIR = build BLD = build
VIPACK = vipack VIPACK = vipack
all: all:
git submodule init #git submodule init
git submodule update #git submodule update
mkdir -p $(BUILDDIR) mkdir -p $(build_dir_path)
#later like this: cd $(build_dir_path)
#cd Internet && make make -f $(mkfile_dir_path)/dps/lists/makefile BUILD=$(build_dir_path)
#cd lists && make make -f $(mkfile_dir_path)/dps/Internet/makefile BUILD=$(build_dir_path)
cd $(BUILDDIR) && \ make -f $(mkfile_dir_path)/dps/time/makefile BUILD=$(build_dir_path)
make -f $(mkfile_dir_path)/dps/opts/makefile BUILD=$(build_dir_path)
cd $(build_dir_path) && \
$(VOC) -s \ $(VOC) -s \
../Internet/src/netTypes.Mod \
../Internet/src/netdb.Mod \
../Internet/src/netSockets.Mod \
../Internet/src/Internet.Mod \
../lists/src/lDefs.Mod \
../lists/src/strutils.Mod \
../lists/src/List.Mod \
../lists/src/StringList.Mod \
../src/vpkSettings.Mod \ ../src/vpkSettings.Mod \
../src/unix/vpkFiles.Mod \ ../src/unix/vpkFiles.Mod \
../src/unix/vpkTime.Mod \ ../src/unix/vpkTime.Mod \
@ -41,13 +40,13 @@ all:
../src/vipack.Mod -m ../src/vipack.Mod -m
tests: tests:
mkdir -p $(BUILDDIR) mkdir -p $(BLD)
cd $(BUILDDIR) && $(VOC) -s ../src/unix/vpkFiles.Mod ../tst/testFiles.Mod -m cd $(BLD) && $(VOC) -s ../src/unix/vpkFiles.Mod ../tst/testFiles.Mod -m
cd $(BUILDDIR) && $(VOC) -s ../src/vpkJsonParser.Mod ../tst/testJsonParser.Mod -m cd $(BLD) && $(VOC) -s ../src/vpkJsonParser.Mod ../tst/testJsonParser.Mod -m
mkfifo /tmp/fifo mkfifo /tmp/fifo
$(BUILDDIR)/testFiles $(BLD)/testFiles
rm /tmp/fifo rm /tmp/fifo
$(BUILDDIR)/testJsonParser $(BLD)/testJsonParser
clean: clean:
if [ -d "$(BUILDDIR)" ]; then rm -rf $(BUILDDIR); fi if [ -d "$(BLD)" ]; then rm -rf $(BLD); fi