From 40ee0eedd9d5011de6daecaf4837ecb16dee1078 Mon Sep 17 00:00:00 2001 From: Thomas Walker Lynch Date: Thu, 28 Mar 2019 02:33:43 +0100 Subject: [PATCH] prefer modules to src- dirs --- makefile | 4 +- {da => module/da}/makefile | 0 {da => module/da}/makefile-flags | 8 +- {da => module/da}/src/da.lib.c | 0 {da => module/da}/src/da.lib.h | 0 {da => module/da}/test/makefile | 0 {da => module/da}/test/makefile-dep | 0 {da => module/da}/test/makefile-flags | 8 +- {da => module/da}/test/results | 0 {da => module/da}/test/test.dat | 0 {da => module/da}/test/test_da.cli.c | 0 {da => module/da}/test/test_da.cli.o | Bin {da => module/da}/test/test_da.lib.c | 0 {da => module/da}/test/test_da.lib.h | 0 {da => module/da}/test/test_da.lib.o | Bin {db => module/db}/0_makefile | 0 .../deprecated => module/db}/0_makefile-flags | 2 +- .../db}/1_doc/return-from-transaction.txt | 0 {db => module/db}/dbprintf.lib.c | 0 {dispatch => module/dispatch}/makefile | 0 {dispatch => module/dispatch}/makefile-flags | 0 .../dispatch}/src/dispatch.lib.c | 0 {stage => module/share}/include/da.h | 0 {stage => module/share}/include/tranche.h | 0 {subu-0 => module/subu-0}/0_makefile | 0 {db => module/subu-0}/0_makefile-flags | 2 +- .../subu-0}/1_deprecated/dispatch_exec.lib.c | 0 .../subu-0}/1_deprecated/dispatch_f.lib.c | 0 .../1_deprecated/dispatch_useradd.lib.c | 0 .../subu-0}/1_deprecated/subu-rm-0.lib.c | 0 .../1_deprecated/subudb-number-next.cli.c | 0 {subu-0 => module/subu-0}/1_doc/to_do.txt | 0 {subu-0 => module/subu-0}/1_tests/0_makefile | 0 .../subu-0}/1_tests/0_makefile_flags | 2 +- .../subu-0}/1_tests/1_tmp/makefile_deps | 0 {subu-0 => module/subu-0}/1_tests/da.cli.c | 0 {subu-0 => module/subu-0}/1_tests/libtests.a | 0 {subu-0 => module/subu-0}/1_tmp/da.lib.h | 0 .../subu-0}/1_tmp/dbprintf.lib.h | 0 .../subu-0}/1_tmp/dispatch.lib.h | 0 .../subu-0}/1_tmp/subu-bind-all.cli.h | 0 .../subu-0}/1_tmp/subu-bind.cli.h | 0 .../subu-0}/1_tmp/subu-common.lib.h | 0 .../subu-0}/1_tmp/subu-mk-0.cli.h | 0 .../subu-0}/1_tmp/subu-rm-0.cli.h | 0 {subu-0 => module/subu-0}/1_tmp/subu.lib.h | 0 .../subu-0}/1_tmp/subudb-init.cli.h | 0 .../subu-0}/1_tmp/subudb-number.cli.h | 0 .../subu-0}/1_tmp/subudb-rel-get.cli.h | 0 .../subu-0}/1_tmp/subudb-rel-put.cli.h | 0 .../subu-0}/1_tmp/subudb-rel-rm.cli.h | 0 .../subu-0}/1_tmp/subudb-subus.cli.h | 0 {subu-0 => module/subu-0}/1_tmp/subudb.lib.h | 0 {subu-0 => module/subu-0}/1_try/split.c | 0 {subu-0 => module/subu-0}/1_try/split_arg.c | 0 {subu-0 => module/subu-0}/1_try/subudb | 0 {subu-0 => module/subu-0}/1_try/voidptr.c | 0 {subu-0 => module/subu-0}/common.lib.c | 0 {subu-0 => module/subu-0}/db.lib.c | 0 {subu-0 => module/subu-0}/subu-bind-all.cli.c | 0 {subu-0 => module/subu-0}/subu-bind.cli.c | 0 {subu-0 => module/subu-0}/subu-mk-0.cli.c | 0 {subu-0 => module/subu-0}/subu-rm-0.cli.c | 0 {subu-0 => module/subu-0}/subu.lib.c | 0 {subu-0 => module/subu-0}/subudb-init.cli.c | 0 {subu-0 => module/subu-0}/subudb-number.cli.c | 0 .../subu-0}/subudb-rel-get.cli.c | 0 .../subu-0}/subudb-rel-put.cli.c | 0 {subu-0 => module/subu-0}/subudb-rel-rm.cli.c | 0 {subu-0 => module/subu-0}/subudb-subus.cli.c | 0 {subu-1 => module/subu-1}/subu-mk.py | 0 .../tranche}/deprecated/0_makefile | 0 .../tranche/deprecated}/0_makefile-flags | 2 +- {tranche => module/tranche}/doc/todo.txt | 0 {tranche => module/tranche}/makefile | 0 {tranche => module/tranche}/makefile-flags | 12 +- {tranche => module/tranche}/src/tranche.cli.c | 0 {tranche => module/tranche}/src/tranche.lib.c | 0 {tranche => module/tranche}/src/tranche.lib.h | 0 {tranche => module/tranche}/test/test1.dat | 0 {tranche => module/tranche}/test/test1.sh | 0 .../tranche}/test/test11.dat.expected | 0 .../tranche}/test/test12.dat.expected | 0 .../tranche}/test/test13.dat.expected | 0 .../tranche}/test/test14.dat.expected | 0 .../tranche}/test/test15.dat.expected | 0 .../tranche}/test/test1stdout.dat.expected | 0 .../tranche}/test/test2.c.expected | 0 .../tranche}/test/test2.h.expected | 0 {tranche => module/tranche}/test/test2.trc.c | 0 {tranche => module/tranche}/test/tranche | 0 temp | 23 ++++ {tools => tool}/bin/gitadd | 0 {tools => tool}/bin/makeheaders | Bin {tools => tool}/bin/setuid_root.sh | 0 {tools => tool}/bin/tranche | Bin {tools => tool}/doc/makefile.txt | 0 {tools => tool}/doc/makeheaders-notes.txt | 0 {tools => tool}/doc/makeheaders.html | 0 {tools => tool}/lib/bashrc | 2 +- {tools => tool}/lib/dot_emacs | 0 {tools => tool}/lib/makefile_cc | 2 +- {tools => tool}/lib/makefile_trc | 0 {tools => tool}/src/makeheaders.c | 0 ...~82b14679df98a141dbf8dac2f51f30d5fc84863b~ | 113 ------------------ 105 files changed, 45 insertions(+), 135 deletions(-) rename {da => module/da}/makefile (100%) rename {da => module/da}/makefile-flags (79%) rename {da => module/da}/src/da.lib.c (100%) rename {da => module/da}/src/da.lib.h (100%) rename {da => module/da}/test/makefile (100%) rename {da => module/da}/test/makefile-dep (100%) rename {da => module/da}/test/makefile-flags (79%) rename {da => module/da}/test/results (100%) rename {da => module/da}/test/test.dat (100%) rename {da => module/da}/test/test_da.cli.c (100%) rename {da => module/da}/test/test_da.cli.o (100%) rename {da => module/da}/test/test_da.lib.c (100%) rename {da => module/da}/test/test_da.lib.h (100%) rename {da => module/da}/test/test_da.lib.o (100%) rename {db => module/db}/0_makefile (100%) rename {tranche/deprecated => module/db}/0_makefile-flags (98%) rename {db => module/db}/1_doc/return-from-transaction.txt (100%) rename {db => module/db}/dbprintf.lib.c (100%) rename {dispatch => module/dispatch}/makefile (100%) rename {dispatch => module/dispatch}/makefile-flags (100%) rename {dispatch => module/dispatch}/src/dispatch.lib.c (100%) rename {stage => module/share}/include/da.h (100%) rename {stage => module/share}/include/tranche.h (100%) rename {subu-0 => module/subu-0}/0_makefile (100%) rename {db => module/subu-0}/0_makefile-flags (98%) rename {subu-0 => module/subu-0}/1_deprecated/dispatch_exec.lib.c (100%) rename {subu-0 => module/subu-0}/1_deprecated/dispatch_f.lib.c (100%) rename {subu-0 => module/subu-0}/1_deprecated/dispatch_useradd.lib.c (100%) rename {subu-0 => module/subu-0}/1_deprecated/subu-rm-0.lib.c (100%) rename {subu-0 => module/subu-0}/1_deprecated/subudb-number-next.cli.c (100%) rename {subu-0 => module/subu-0}/1_doc/to_do.txt (100%) rename {subu-0 => module/subu-0}/1_tests/0_makefile (100%) rename {subu-0 => module/subu-0}/1_tests/0_makefile_flags (98%) rename {subu-0 => module/subu-0}/1_tests/1_tmp/makefile_deps (100%) rename {subu-0 => module/subu-0}/1_tests/da.cli.c (100%) rename {subu-0 => module/subu-0}/1_tests/libtests.a (100%) rename {subu-0 => module/subu-0}/1_tmp/da.lib.h (100%) rename {subu-0 => module/subu-0}/1_tmp/dbprintf.lib.h (100%) rename {subu-0 => module/subu-0}/1_tmp/dispatch.lib.h (100%) rename {subu-0 => module/subu-0}/1_tmp/subu-bind-all.cli.h (100%) rename {subu-0 => module/subu-0}/1_tmp/subu-bind.cli.h (100%) rename {subu-0 => module/subu-0}/1_tmp/subu-common.lib.h (100%) rename {subu-0 => module/subu-0}/1_tmp/subu-mk-0.cli.h (100%) rename {subu-0 => module/subu-0}/1_tmp/subu-rm-0.cli.h (100%) rename {subu-0 => module/subu-0}/1_tmp/subu.lib.h (100%) rename {subu-0 => module/subu-0}/1_tmp/subudb-init.cli.h (100%) rename {subu-0 => module/subu-0}/1_tmp/subudb-number.cli.h (100%) rename {subu-0 => module/subu-0}/1_tmp/subudb-rel-get.cli.h (100%) rename {subu-0 => module/subu-0}/1_tmp/subudb-rel-put.cli.h (100%) rename {subu-0 => module/subu-0}/1_tmp/subudb-rel-rm.cli.h (100%) rename {subu-0 => module/subu-0}/1_tmp/subudb-subus.cli.h (100%) rename {subu-0 => module/subu-0}/1_tmp/subudb.lib.h (100%) rename {subu-0 => module/subu-0}/1_try/split.c (100%) rename {subu-0 => module/subu-0}/1_try/split_arg.c (100%) rename {subu-0 => module/subu-0}/1_try/subudb (100%) rename {subu-0 => module/subu-0}/1_try/voidptr.c (100%) rename {subu-0 => module/subu-0}/common.lib.c (100%) rename {subu-0 => module/subu-0}/db.lib.c (100%) rename {subu-0 => module/subu-0}/subu-bind-all.cli.c (100%) rename {subu-0 => module/subu-0}/subu-bind.cli.c (100%) rename {subu-0 => module/subu-0}/subu-mk-0.cli.c (100%) rename {subu-0 => module/subu-0}/subu-rm-0.cli.c (100%) rename {subu-0 => module/subu-0}/subu.lib.c (100%) rename {subu-0 => module/subu-0}/subudb-init.cli.c (100%) rename {subu-0 => module/subu-0}/subudb-number.cli.c (100%) rename {subu-0 => module/subu-0}/subudb-rel-get.cli.c (100%) rename {subu-0 => module/subu-0}/subudb-rel-put.cli.c (100%) rename {subu-0 => module/subu-0}/subudb-rel-rm.cli.c (100%) rename {subu-0 => module/subu-0}/subudb-subus.cli.c (100%) rename {subu-1 => module/subu-1}/subu-mk.py (100%) rename {tranche => module/tranche}/deprecated/0_makefile (100%) rename {subu-0 => module/tranche/deprecated}/0_makefile-flags (98%) rename {tranche => module/tranche}/doc/todo.txt (100%) rename {tranche => module/tranche}/makefile (100%) rename {tranche => module/tranche}/makefile-flags (68%) rename {tranche => module/tranche}/src/tranche.cli.c (100%) rename {tranche => module/tranche}/src/tranche.lib.c (100%) rename {tranche => module/tranche}/src/tranche.lib.h (100%) rename {tranche => module/tranche}/test/test1.dat (100%) rename {tranche => module/tranche}/test/test1.sh (100%) rename {tranche => module/tranche}/test/test11.dat.expected (100%) rename {tranche => module/tranche}/test/test12.dat.expected (100%) rename {tranche => module/tranche}/test/test13.dat.expected (100%) rename {tranche => module/tranche}/test/test14.dat.expected (100%) rename {tranche => module/tranche}/test/test15.dat.expected (100%) rename {tranche => module/tranche}/test/test1stdout.dat.expected (100%) rename {tranche => module/tranche}/test/test2.c.expected (100%) rename {tranche => module/tranche}/test/test2.h.expected (100%) rename {tranche => module/tranche}/test/test2.trc.c (100%) rename {tranche => module/tranche}/test/tranche (100%) create mode 100644 temp rename {tools => tool}/bin/gitadd (100%) rename {tools => tool}/bin/makeheaders (100%) rename {tools => tool}/bin/setuid_root.sh (100%) rename {tools => tool}/bin/tranche (100%) rename {tools => tool}/doc/makefile.txt (100%) rename {tools => tool}/doc/makeheaders-notes.txt (100%) rename {tools => tool}/doc/makeheaders.html (100%) rename {tools => tool}/lib/bashrc (89%) rename {tools => tool}/lib/dot_emacs (100%) rename {tools => tool}/lib/makefile_cc (99%) rename {tools => tool}/lib/makefile_trc (100%) rename {tools => tool}/src/makeheaders.c (100%) delete mode 100644 tools/lib/makefile_cc.~82b14679df98a141dbf8dac2f51f30d5fc84863b~ diff --git a/makefile b/makefile index ddad312..c7a88ed 100755 --- a/makefile +++ b/makefile @@ -1,11 +1,11 @@ #MAKEABLE=$(shell \ -# find .\ +# find src-*\ # \( -name 'makefile' -o -name 'Makefile' \)\ # -printf "%h\n"\ # | grep -v deprecated | grep -v doc | sort -u | sed ':a;N;$!ba;s/\n/ /g' \ #) -MAKEABLE= da da/test tranche +MAKEABLE= module/da module/da/test module/tranche .PHONY: all info clean dist-clean diff --git a/da/makefile b/module/da/makefile similarity index 100% rename from da/makefile rename to module/da/makefile diff --git a/da/makefile-flags b/module/da/makefile-flags similarity index 79% rename from da/makefile-flags rename to module/da/makefile-flags index d732652..8bb0814 100644 --- a/da/makefile-flags +++ b/module/da/makefile-flags @@ -8,7 +8,7 @@ ECHO= echo # directories used by this makefile, these could all be set to dot for # the simplest source directory structure -#LIDBIR, EXECDIR, INCDIR hold the make results that might later be staged +#LIDBIR, EXECDIR, INCDIR hold the make results that might later be shared #$(PWD) is the directory that make was called from, this is already build in #set to dot to use the same directory as the source code #leave blank to ommit @@ -20,7 +20,7 @@ LIBDIR=lib SRCDIR=src TESTDIR=test TMPDIR=tmp -TOOLSDIR=$(realpath $(PROJECT_SUBU)/tools) +TOOLDIR=$(realpath $(PROJECT_SUBU)/tool) TRYDIR=try # compiler and flags @@ -29,7 +29,7 @@ CFLAGS=-std=gnu11 -fPIC -I. -ggdb -Werror -DDEBUG -DDEBUGDB #CFLAGS=-std=gnu11 -fPIC -I. -Werror LINKFLAGS=-Llib -lda -MAKE=/usr/bin/make --no-print-directory -f $(PROJECT_SUBU)/tools/lib/makefile_cc -#MAKE=/usr/bin/make -f $(PROJECT_SUBU)/tools/lib/makefile_cc +MAKE=/usr/bin/make --no-print-directory -f $(PROJECT_SUBU)/tool/lib/makefile_cc +#MAKE=/usr/bin/make -f $(PROJECT_SUBU)/tool/lib/makefile_cc diff --git a/da/src/da.lib.c b/module/da/src/da.lib.c similarity index 100% rename from da/src/da.lib.c rename to module/da/src/da.lib.c diff --git a/da/src/da.lib.h b/module/da/src/da.lib.h similarity index 100% rename from da/src/da.lib.h rename to module/da/src/da.lib.h diff --git a/da/test/makefile b/module/da/test/makefile similarity index 100% rename from da/test/makefile rename to module/da/test/makefile diff --git a/da/test/makefile-dep b/module/da/test/makefile-dep similarity index 100% rename from da/test/makefile-dep rename to module/da/test/makefile-dep diff --git a/da/test/makefile-flags b/module/da/test/makefile-flags similarity index 79% rename from da/test/makefile-flags rename to module/da/test/makefile-flags index d916748..a8adf4d 100644 --- a/da/test/makefile-flags +++ b/module/da/test/makefile-flags @@ -8,7 +8,7 @@ ECHO= echo # directories used by this makefile, these could all be set to dot for # the simplest source directory structure -#LIDBIR, EXECSDIR, HDIR hold the make results that might later be staged +#LIDBIR, EXECSDIR, HDIR hold the make results that might later be shared #$(PWD) is the directory that make was called from, this is already build in #set to dot to use the same directory as the source code #leave blank to ommit @@ -20,7 +20,7 @@ LIBDIR=. SRCDIR=. TESTDIR= TMPDIR=. -TOOLSDIR=$(realpath $(PROJECT_SUBU)/tools) +TOOLDIR=$(realpath $(PROJECT_SUBU)/tool) TRYDIR= # compiler and flags @@ -29,5 +29,5 @@ CFLAGS=-std=gnu11 -fPIC -I../include -ggdb -Werror -DDEBUG -DDEBUGDB #CFLAGS=-std=gnu11 -fPIC -I../include -Werror LINKFLAGS=-L. -L../lib -ltest -lda -MAKE=/usr/bin/make --no-print-directory -f $(PROJECT_SUBU)/tools/lib/makefile_cc -#MAKE=/usr/bin/make -f $(PROJECT_SUBU)/tools/lib/makefile_cc +MAKE=/usr/bin/make --no-print-directory -f $(PROJECT_SUBU)/tool/lib/makefile_cc +#MAKE=/usr/bin/make -f $(PROJECT_SUBU)/tool/lib/makefile_cc diff --git a/da/test/results b/module/da/test/results similarity index 100% rename from da/test/results rename to module/da/test/results diff --git a/da/test/test.dat b/module/da/test/test.dat similarity index 100% rename from da/test/test.dat rename to module/da/test/test.dat diff --git a/da/test/test_da.cli.c b/module/da/test/test_da.cli.c similarity index 100% rename from da/test/test_da.cli.c rename to module/da/test/test_da.cli.c diff --git a/da/test/test_da.cli.o b/module/da/test/test_da.cli.o similarity index 100% rename from da/test/test_da.cli.o rename to module/da/test/test_da.cli.o diff --git a/da/test/test_da.lib.c b/module/da/test/test_da.lib.c similarity index 100% rename from da/test/test_da.lib.c rename to module/da/test/test_da.lib.c diff --git a/da/test/test_da.lib.h b/module/da/test/test_da.lib.h similarity index 100% rename from da/test/test_da.lib.h rename to module/da/test/test_da.lib.h diff --git a/da/test/test_da.lib.o b/module/da/test/test_da.lib.o similarity index 100% rename from da/test/test_da.lib.o rename to module/da/test/test_da.lib.o diff --git a/db/0_makefile b/module/db/0_makefile similarity index 100% rename from db/0_makefile rename to module/db/0_makefile diff --git a/tranche/deprecated/0_makefile-flags b/module/db/0_makefile-flags similarity index 98% rename from tranche/deprecated/0_makefile-flags rename to module/db/0_makefile-flags index 0da8b61..d4df01f 100644 --- a/tranche/deprecated/0_makefile-flags +++ b/module/db/0_makefile-flags @@ -6,7 +6,7 @@ ECHO= echo # directories used by this makefile, these could all be set to dot for # the simplest source directory structure -#LIDBIR, EXECSDIR, HDIR hold the make results that might later be staged +#LIDBIR, EXECSDIR, HDIR hold the make results that might later be shared #$(PWD) is the directory that make was called from, this is already build in #set to dot to use the same directory as the source code #leave blank to ommit diff --git a/db/1_doc/return-from-transaction.txt b/module/db/1_doc/return-from-transaction.txt similarity index 100% rename from db/1_doc/return-from-transaction.txt rename to module/db/1_doc/return-from-transaction.txt diff --git a/db/dbprintf.lib.c b/module/db/dbprintf.lib.c similarity index 100% rename from db/dbprintf.lib.c rename to module/db/dbprintf.lib.c diff --git a/dispatch/makefile b/module/dispatch/makefile similarity index 100% rename from dispatch/makefile rename to module/dispatch/makefile diff --git a/dispatch/makefile-flags b/module/dispatch/makefile-flags similarity index 100% rename from dispatch/makefile-flags rename to module/dispatch/makefile-flags diff --git a/dispatch/src/dispatch.lib.c b/module/dispatch/src/dispatch.lib.c similarity index 100% rename from dispatch/src/dispatch.lib.c rename to module/dispatch/src/dispatch.lib.c diff --git a/stage/include/da.h b/module/share/include/da.h similarity index 100% rename from stage/include/da.h rename to module/share/include/da.h diff --git a/stage/include/tranche.h b/module/share/include/tranche.h similarity index 100% rename from stage/include/tranche.h rename to module/share/include/tranche.h diff --git a/subu-0/0_makefile b/module/subu-0/0_makefile similarity index 100% rename from subu-0/0_makefile rename to module/subu-0/0_makefile diff --git a/db/0_makefile-flags b/module/subu-0/0_makefile-flags similarity index 98% rename from db/0_makefile-flags rename to module/subu-0/0_makefile-flags index 0da8b61..d4df01f 100644 --- a/db/0_makefile-flags +++ b/module/subu-0/0_makefile-flags @@ -6,7 +6,7 @@ ECHO= echo # directories used by this makefile, these could all be set to dot for # the simplest source directory structure -#LIDBIR, EXECSDIR, HDIR hold the make results that might later be staged +#LIDBIR, EXECSDIR, HDIR hold the make results that might later be shared #$(PWD) is the directory that make was called from, this is already build in #set to dot to use the same directory as the source code #leave blank to ommit diff --git a/subu-0/1_deprecated/dispatch_exec.lib.c b/module/subu-0/1_deprecated/dispatch_exec.lib.c similarity index 100% rename from subu-0/1_deprecated/dispatch_exec.lib.c rename to module/subu-0/1_deprecated/dispatch_exec.lib.c diff --git a/subu-0/1_deprecated/dispatch_f.lib.c b/module/subu-0/1_deprecated/dispatch_f.lib.c similarity index 100% rename from subu-0/1_deprecated/dispatch_f.lib.c rename to module/subu-0/1_deprecated/dispatch_f.lib.c diff --git a/subu-0/1_deprecated/dispatch_useradd.lib.c b/module/subu-0/1_deprecated/dispatch_useradd.lib.c similarity index 100% rename from subu-0/1_deprecated/dispatch_useradd.lib.c rename to module/subu-0/1_deprecated/dispatch_useradd.lib.c diff --git a/subu-0/1_deprecated/subu-rm-0.lib.c b/module/subu-0/1_deprecated/subu-rm-0.lib.c similarity index 100% rename from subu-0/1_deprecated/subu-rm-0.lib.c rename to module/subu-0/1_deprecated/subu-rm-0.lib.c diff --git a/subu-0/1_deprecated/subudb-number-next.cli.c b/module/subu-0/1_deprecated/subudb-number-next.cli.c similarity index 100% rename from subu-0/1_deprecated/subudb-number-next.cli.c rename to module/subu-0/1_deprecated/subudb-number-next.cli.c diff --git a/subu-0/1_doc/to_do.txt b/module/subu-0/1_doc/to_do.txt similarity index 100% rename from subu-0/1_doc/to_do.txt rename to module/subu-0/1_doc/to_do.txt diff --git a/subu-0/1_tests/0_makefile b/module/subu-0/1_tests/0_makefile similarity index 100% rename from subu-0/1_tests/0_makefile rename to module/subu-0/1_tests/0_makefile diff --git a/subu-0/1_tests/0_makefile_flags b/module/subu-0/1_tests/0_makefile_flags similarity index 98% rename from subu-0/1_tests/0_makefile_flags rename to module/subu-0/1_tests/0_makefile_flags index 8818691..bc6bd25 100644 --- a/subu-0/1_tests/0_makefile_flags +++ b/module/subu-0/1_tests/0_makefile_flags @@ -6,7 +6,7 @@ ECHO= echo # directories used by this makefile, these could all be set to dot for # the simplest source directory structure -#LIDBIR, EXECSDIR, HDIR hold the make results that might later be staged +#LIDBIR, EXECSDIR, HDIR hold the make results that might later be shared #$(PWD) is the directory that make was called from, this is already build in #set to dot to use the same directory as the source code #leave blank to ommit diff --git a/subu-0/1_tests/1_tmp/makefile_deps b/module/subu-0/1_tests/1_tmp/makefile_deps similarity index 100% rename from subu-0/1_tests/1_tmp/makefile_deps rename to module/subu-0/1_tests/1_tmp/makefile_deps diff --git a/subu-0/1_tests/da.cli.c b/module/subu-0/1_tests/da.cli.c similarity index 100% rename from subu-0/1_tests/da.cli.c rename to module/subu-0/1_tests/da.cli.c diff --git a/subu-0/1_tests/libtests.a b/module/subu-0/1_tests/libtests.a similarity index 100% rename from subu-0/1_tests/libtests.a rename to module/subu-0/1_tests/libtests.a diff --git a/subu-0/1_tmp/da.lib.h b/module/subu-0/1_tmp/da.lib.h similarity index 100% rename from subu-0/1_tmp/da.lib.h rename to module/subu-0/1_tmp/da.lib.h diff --git a/subu-0/1_tmp/dbprintf.lib.h b/module/subu-0/1_tmp/dbprintf.lib.h similarity index 100% rename from subu-0/1_tmp/dbprintf.lib.h rename to module/subu-0/1_tmp/dbprintf.lib.h diff --git a/subu-0/1_tmp/dispatch.lib.h b/module/subu-0/1_tmp/dispatch.lib.h similarity index 100% rename from subu-0/1_tmp/dispatch.lib.h rename to module/subu-0/1_tmp/dispatch.lib.h diff --git a/subu-0/1_tmp/subu-bind-all.cli.h b/module/subu-0/1_tmp/subu-bind-all.cli.h similarity index 100% rename from subu-0/1_tmp/subu-bind-all.cli.h rename to module/subu-0/1_tmp/subu-bind-all.cli.h diff --git a/subu-0/1_tmp/subu-bind.cli.h b/module/subu-0/1_tmp/subu-bind.cli.h similarity index 100% rename from subu-0/1_tmp/subu-bind.cli.h rename to module/subu-0/1_tmp/subu-bind.cli.h diff --git a/subu-0/1_tmp/subu-common.lib.h b/module/subu-0/1_tmp/subu-common.lib.h similarity index 100% rename from subu-0/1_tmp/subu-common.lib.h rename to module/subu-0/1_tmp/subu-common.lib.h diff --git a/subu-0/1_tmp/subu-mk-0.cli.h b/module/subu-0/1_tmp/subu-mk-0.cli.h similarity index 100% rename from subu-0/1_tmp/subu-mk-0.cli.h rename to module/subu-0/1_tmp/subu-mk-0.cli.h diff --git a/subu-0/1_tmp/subu-rm-0.cli.h b/module/subu-0/1_tmp/subu-rm-0.cli.h similarity index 100% rename from subu-0/1_tmp/subu-rm-0.cli.h rename to module/subu-0/1_tmp/subu-rm-0.cli.h diff --git a/subu-0/1_tmp/subu.lib.h b/module/subu-0/1_tmp/subu.lib.h similarity index 100% rename from subu-0/1_tmp/subu.lib.h rename to module/subu-0/1_tmp/subu.lib.h diff --git a/subu-0/1_tmp/subudb-init.cli.h b/module/subu-0/1_tmp/subudb-init.cli.h similarity index 100% rename from subu-0/1_tmp/subudb-init.cli.h rename to module/subu-0/1_tmp/subudb-init.cli.h diff --git a/subu-0/1_tmp/subudb-number.cli.h b/module/subu-0/1_tmp/subudb-number.cli.h similarity index 100% rename from subu-0/1_tmp/subudb-number.cli.h rename to module/subu-0/1_tmp/subudb-number.cli.h diff --git a/subu-0/1_tmp/subudb-rel-get.cli.h b/module/subu-0/1_tmp/subudb-rel-get.cli.h similarity index 100% rename from subu-0/1_tmp/subudb-rel-get.cli.h rename to module/subu-0/1_tmp/subudb-rel-get.cli.h diff --git a/subu-0/1_tmp/subudb-rel-put.cli.h b/module/subu-0/1_tmp/subudb-rel-put.cli.h similarity index 100% rename from subu-0/1_tmp/subudb-rel-put.cli.h rename to module/subu-0/1_tmp/subudb-rel-put.cli.h diff --git a/subu-0/1_tmp/subudb-rel-rm.cli.h b/module/subu-0/1_tmp/subudb-rel-rm.cli.h similarity index 100% rename from subu-0/1_tmp/subudb-rel-rm.cli.h rename to module/subu-0/1_tmp/subudb-rel-rm.cli.h diff --git a/subu-0/1_tmp/subudb-subus.cli.h b/module/subu-0/1_tmp/subudb-subus.cli.h similarity index 100% rename from subu-0/1_tmp/subudb-subus.cli.h rename to module/subu-0/1_tmp/subudb-subus.cli.h diff --git a/subu-0/1_tmp/subudb.lib.h b/module/subu-0/1_tmp/subudb.lib.h similarity index 100% rename from subu-0/1_tmp/subudb.lib.h rename to module/subu-0/1_tmp/subudb.lib.h diff --git a/subu-0/1_try/split.c b/module/subu-0/1_try/split.c similarity index 100% rename from subu-0/1_try/split.c rename to module/subu-0/1_try/split.c diff --git a/subu-0/1_try/split_arg.c b/module/subu-0/1_try/split_arg.c similarity index 100% rename from subu-0/1_try/split_arg.c rename to module/subu-0/1_try/split_arg.c diff --git a/subu-0/1_try/subudb b/module/subu-0/1_try/subudb similarity index 100% rename from subu-0/1_try/subudb rename to module/subu-0/1_try/subudb diff --git a/subu-0/1_try/voidptr.c b/module/subu-0/1_try/voidptr.c similarity index 100% rename from subu-0/1_try/voidptr.c rename to module/subu-0/1_try/voidptr.c diff --git a/subu-0/common.lib.c b/module/subu-0/common.lib.c similarity index 100% rename from subu-0/common.lib.c rename to module/subu-0/common.lib.c diff --git a/subu-0/db.lib.c b/module/subu-0/db.lib.c similarity index 100% rename from subu-0/db.lib.c rename to module/subu-0/db.lib.c diff --git a/subu-0/subu-bind-all.cli.c b/module/subu-0/subu-bind-all.cli.c similarity index 100% rename from subu-0/subu-bind-all.cli.c rename to module/subu-0/subu-bind-all.cli.c diff --git a/subu-0/subu-bind.cli.c b/module/subu-0/subu-bind.cli.c similarity index 100% rename from subu-0/subu-bind.cli.c rename to module/subu-0/subu-bind.cli.c diff --git a/subu-0/subu-mk-0.cli.c b/module/subu-0/subu-mk-0.cli.c similarity index 100% rename from subu-0/subu-mk-0.cli.c rename to module/subu-0/subu-mk-0.cli.c diff --git a/subu-0/subu-rm-0.cli.c b/module/subu-0/subu-rm-0.cli.c similarity index 100% rename from subu-0/subu-rm-0.cli.c rename to module/subu-0/subu-rm-0.cli.c diff --git a/subu-0/subu.lib.c b/module/subu-0/subu.lib.c similarity index 100% rename from subu-0/subu.lib.c rename to module/subu-0/subu.lib.c diff --git a/subu-0/subudb-init.cli.c b/module/subu-0/subudb-init.cli.c similarity index 100% rename from subu-0/subudb-init.cli.c rename to module/subu-0/subudb-init.cli.c diff --git a/subu-0/subudb-number.cli.c b/module/subu-0/subudb-number.cli.c similarity index 100% rename from subu-0/subudb-number.cli.c rename to module/subu-0/subudb-number.cli.c diff --git a/subu-0/subudb-rel-get.cli.c b/module/subu-0/subudb-rel-get.cli.c similarity index 100% rename from subu-0/subudb-rel-get.cli.c rename to module/subu-0/subudb-rel-get.cli.c diff --git a/subu-0/subudb-rel-put.cli.c b/module/subu-0/subudb-rel-put.cli.c similarity index 100% rename from subu-0/subudb-rel-put.cli.c rename to module/subu-0/subudb-rel-put.cli.c diff --git a/subu-0/subudb-rel-rm.cli.c b/module/subu-0/subudb-rel-rm.cli.c similarity index 100% rename from subu-0/subudb-rel-rm.cli.c rename to module/subu-0/subudb-rel-rm.cli.c diff --git a/subu-0/subudb-subus.cli.c b/module/subu-0/subudb-subus.cli.c similarity index 100% rename from subu-0/subudb-subus.cli.c rename to module/subu-0/subudb-subus.cli.c diff --git a/subu-1/subu-mk.py b/module/subu-1/subu-mk.py similarity index 100% rename from subu-1/subu-mk.py rename to module/subu-1/subu-mk.py diff --git a/tranche/deprecated/0_makefile b/module/tranche/deprecated/0_makefile similarity index 100% rename from tranche/deprecated/0_makefile rename to module/tranche/deprecated/0_makefile diff --git a/subu-0/0_makefile-flags b/module/tranche/deprecated/0_makefile-flags similarity index 98% rename from subu-0/0_makefile-flags rename to module/tranche/deprecated/0_makefile-flags index 0da8b61..d4df01f 100644 --- a/subu-0/0_makefile-flags +++ b/module/tranche/deprecated/0_makefile-flags @@ -6,7 +6,7 @@ ECHO= echo # directories used by this makefile, these could all be set to dot for # the simplest source directory structure -#LIDBIR, EXECSDIR, HDIR hold the make results that might later be staged +#LIDBIR, EXECSDIR, HDIR hold the make results that might later be shared #$(PWD) is the directory that make was called from, this is already build in #set to dot to use the same directory as the source code #leave blank to ommit diff --git a/tranche/doc/todo.txt b/module/tranche/doc/todo.txt similarity index 100% rename from tranche/doc/todo.txt rename to module/tranche/doc/todo.txt diff --git a/tranche/makefile b/module/tranche/makefile similarity index 100% rename from tranche/makefile rename to module/tranche/makefile diff --git a/tranche/makefile-flags b/module/tranche/makefile-flags similarity index 68% rename from tranche/makefile-flags rename to module/tranche/makefile-flags index 68f6296..1aa3d66 100644 --- a/tranche/makefile-flags +++ b/module/tranche/makefile-flags @@ -7,7 +7,7 @@ ECHO= echo # directories used by this makefile, these could all be set to dot for # the simplest source directory structure -#LIDBIR, EXECDIR, INCDIR hold the make results that might later be staged +#LIDBIR, EXECDIR, INCDIR hold the make results that might later be shared #$(PWD) is the directory that make was called from, this is already build in #set to dot to use the same directory as the source code #leave blank to ommit @@ -19,13 +19,13 @@ LIBDIR=lib SRCDIR=src TESTDIR=test TMPDIR=tmp -TOOLSDIR=$(realpath $(PROJECT_SUBU)/tools) +TOOLDIR=$(realpath $(PROJECT_SUBU)/tool) TRYDIR=try C=gcc -CFLAGS=-std=gnu11 -fPIC -I. -I../stage/include -ggdb -Werror -DDEBUG -DDEBUGDB +CFLAGS=-std=gnu11 -fPIC -I. -I../share/include -ggdb -Werror -DDEBUG -DDEBUGDB #CFLAGS=-std=gnu11 -fPIC -I. -Werror -LINKFLAGS=-Llib -L../stage/lib/ -lda -ltranche +LINKFLAGS=-Llib -L../share/lib/ -lda -ltranche -MAKE=/usr/bin/make --no-print-directory -f $(PROJECT_SUBU)/tools/lib/makefile_cc -#MAKE=/usr/bin/make -f $(PROJECT_SUBU)/tools/lib/makefile_cc +MAKE=/usr/bin/make --no-print-directory -f $(PROJECT_SUBU)/tool/lib/makefile_cc +#MAKE=/usr/bin/make -f $(PROJECT_SUBU)/tool/lib/makefile_cc diff --git a/tranche/src/tranche.cli.c b/module/tranche/src/tranche.cli.c similarity index 100% rename from tranche/src/tranche.cli.c rename to module/tranche/src/tranche.cli.c diff --git a/tranche/src/tranche.lib.c b/module/tranche/src/tranche.lib.c similarity index 100% rename from tranche/src/tranche.lib.c rename to module/tranche/src/tranche.lib.c diff --git a/tranche/src/tranche.lib.h b/module/tranche/src/tranche.lib.h similarity index 100% rename from tranche/src/tranche.lib.h rename to module/tranche/src/tranche.lib.h diff --git a/tranche/test/test1.dat b/module/tranche/test/test1.dat similarity index 100% rename from tranche/test/test1.dat rename to module/tranche/test/test1.dat diff --git a/tranche/test/test1.sh b/module/tranche/test/test1.sh similarity index 100% rename from tranche/test/test1.sh rename to module/tranche/test/test1.sh diff --git a/tranche/test/test11.dat.expected b/module/tranche/test/test11.dat.expected similarity index 100% rename from tranche/test/test11.dat.expected rename to module/tranche/test/test11.dat.expected diff --git a/tranche/test/test12.dat.expected b/module/tranche/test/test12.dat.expected similarity index 100% rename from tranche/test/test12.dat.expected rename to module/tranche/test/test12.dat.expected diff --git a/tranche/test/test13.dat.expected b/module/tranche/test/test13.dat.expected similarity index 100% rename from tranche/test/test13.dat.expected rename to module/tranche/test/test13.dat.expected diff --git a/tranche/test/test14.dat.expected b/module/tranche/test/test14.dat.expected similarity index 100% rename from tranche/test/test14.dat.expected rename to module/tranche/test/test14.dat.expected diff --git a/tranche/test/test15.dat.expected b/module/tranche/test/test15.dat.expected similarity index 100% rename from tranche/test/test15.dat.expected rename to module/tranche/test/test15.dat.expected diff --git a/tranche/test/test1stdout.dat.expected b/module/tranche/test/test1stdout.dat.expected similarity index 100% rename from tranche/test/test1stdout.dat.expected rename to module/tranche/test/test1stdout.dat.expected diff --git a/tranche/test/test2.c.expected b/module/tranche/test/test2.c.expected similarity index 100% rename from tranche/test/test2.c.expected rename to module/tranche/test/test2.c.expected diff --git a/tranche/test/test2.h.expected b/module/tranche/test/test2.h.expected similarity index 100% rename from tranche/test/test2.h.expected rename to module/tranche/test/test2.h.expected diff --git a/tranche/test/test2.trc.c b/module/tranche/test/test2.trc.c similarity index 100% rename from tranche/test/test2.trc.c rename to module/tranche/test/test2.trc.c diff --git a/tranche/test/tranche b/module/tranche/test/tranche similarity index 100% rename from tranche/test/tranche rename to module/tranche/test/tranche diff --git a/temp b/temp new file mode 100644 index 0000000..10ac0e2 --- /dev/null +++ b/temp @@ -0,0 +1,23 @@ +./tool/lib/makefile_cc: @echo "TOOLSDIR: " $(TOOLSDIR) +./module/db/0_makefile:SUID_TOOL=$(TOOLSDIR)/bin/setuid_root.sh +./module/db/0_makefile: @echo "SUID_TOOL: " $(SUID_TOOL) +./module/db/0_makefile: @echo "-> $(SUID_TOOL) $(EXECSDIR)/subu-mk-0 $(EXECSDIR)/subu-rm-0 $(EXECSDIR)/subu-bind-all" +./module/db/0_makefile: cat $(SUID_TOOL) +./module/db/0_makefile: sudo $(SUID_TOOL) $(EXECSDIR)/subu-mk-0 $(EXECSDIR)/subu-rm-0 $(EXECSDIR)/subu-bind-all +./module/db/0_makefile-flags:TOOLSDIR=$(realpath $(PROJECT_SUBU)/tools) +./module/subu-0/1_tests/0_makefile_flags:TOOLSDIR=$(realpath $(PROJECT_SUBU)/tools) +./module/subu-0/0_makefile:SUID_TOOL=$(TOOLSDIR)/bin/setuid_root.sh +./module/subu-0/0_makefile: @echo "SUID_TOOL: " $(SUID_TOOL) +./module/subu-0/0_makefile: @echo "-> $(SUID_TOOL) $(EXECSDIR)/subu-mk-0 $(EXECSDIR)/subu-rm-0 $(EXECSDIR)/subu-bind-all" +./module/subu-0/0_makefile: cat $(SUID_TOOL) +./module/subu-0/0_makefile: sudo $(SUID_TOOL) $(EXECSDIR)/subu-mk-0 $(EXECSDIR)/subu-rm-0 $(EXECSDIR)/subu-bind-all +./module/subu-0/0_makefile-flags:TOOLSDIR=$(realpath $(PROJECT_SUBU)/tools) +./module/tranche/deprecated/0_makefile:SUID_TOOL=$(TOOLSDIR)/bin/setuid_root.sh +./module/tranche/deprecated/0_makefile: @echo "SUID_TOOL: " $(SUID_TOOL) +./module/tranche/deprecated/0_makefile: @echo "-> $(SUID_TOOL) $(EXECSDIR)/subu-mk-0 $(EXECSDIR)/subu-rm-0 $(EXECSDIR)/subu-bind-all" +./module/tranche/deprecated/0_makefile: cat $(SUID_TOOL) +./module/tranche/deprecated/0_makefile: sudo $(SUID_TOOL) $(EXECSDIR)/subu-mk-0 $(EXECSDIR)/subu-rm-0 $(EXECSDIR)/subu-bind-all +./module/tranche/deprecated/0_makefile-flags:TOOLSDIR=$(realpath $(PROJECT_SUBU)/tools) +./module/tranche/makefile-flags:TOOLSDIR=$(realpath $(PROJECT_SUBU)/tools) +./module/da/test/makefile-flags:TOOLSDIR=$(realpath $(PROJECT_SUBU)/tools) +./module/da/makefile-flags:TOOLSDIR=$(realpath $(PROJECT_SUBU)/tools) diff --git a/tools/bin/gitadd b/tool/bin/gitadd similarity index 100% rename from tools/bin/gitadd rename to tool/bin/gitadd diff --git a/tools/bin/makeheaders b/tool/bin/makeheaders similarity index 100% rename from tools/bin/makeheaders rename to tool/bin/makeheaders diff --git a/tools/bin/setuid_root.sh b/tool/bin/setuid_root.sh similarity index 100% rename from tools/bin/setuid_root.sh rename to tool/bin/setuid_root.sh diff --git a/tools/bin/tranche b/tool/bin/tranche similarity index 100% rename from tools/bin/tranche rename to tool/bin/tranche diff --git a/tools/doc/makefile.txt b/tool/doc/makefile.txt similarity index 100% rename from tools/doc/makefile.txt rename to tool/doc/makefile.txt diff --git a/tools/doc/makeheaders-notes.txt b/tool/doc/makeheaders-notes.txt similarity index 100% rename from tools/doc/makeheaders-notes.txt rename to tool/doc/makeheaders-notes.txt diff --git a/tools/doc/makeheaders.html b/tool/doc/makeheaders.html similarity index 100% rename from tools/doc/makeheaders.html rename to tool/doc/makeheaders.html diff --git a/tools/lib/bashrc b/tool/lib/bashrc similarity index 89% rename from tools/lib/bashrc rename to tool/lib/bashrc index 79c23ec..b2f3ded 100755 --- a/tools/lib/bashrc +++ b/tool/lib/bashrc @@ -11,7 +11,7 @@ PATH=~/bin:$PATH #temporarily while active in subu code development export PROJECT_SUBU=~/subu -PATH="$PROJECT_SUBU"/tools/bin:$PATH +PATH="$PROJECT_SUBU"/tool/bin:$PATH export PS_FORMAT=user:15,pid,%cpu,%mem,vsz,rss,tty,stat,start,time,command diff --git a/tools/lib/dot_emacs b/tool/lib/dot_emacs similarity index 100% rename from tools/lib/dot_emacs rename to tool/lib/dot_emacs diff --git a/tools/lib/makefile_cc b/tool/lib/makefile_cc similarity index 99% rename from tools/lib/makefile_cc rename to tool/lib/makefile_cc index bcf2475..3cbb5fe 100755 --- a/tools/lib/makefile_cc +++ b/tool/lib/makefile_cc @@ -63,7 +63,7 @@ info: @echo "LIBDIR: " $(LIBDIR) @echo "TESTDIR: " $(TESTDIR) @echo "TMPDIR: " $(TMPDIR) - @echo "TOOLSDIR: " $(TOOLSDIR) + @echo "TOOLDIR: " $(TOOLDIR) @echo "TRYDIR: " $(TRYDIR) @echo "DEPFILE: " $(DEPFILE) @echo "LIBFILE: " $(LIBFILE) diff --git a/tools/lib/makefile_trc b/tool/lib/makefile_trc similarity index 100% rename from tools/lib/makefile_trc rename to tool/lib/makefile_trc diff --git a/tools/src/makeheaders.c b/tool/src/makeheaders.c similarity index 100% rename from tools/src/makeheaders.c rename to tool/src/makeheaders.c diff --git a/tools/lib/makefile_cc.~82b14679df98a141dbf8dac2f51f30d5fc84863b~ b/tools/lib/makefile_cc.~82b14679df98a141dbf8dac2f51f30d5fc84863b~ deleted file mode 100644 index 6de582b..0000000 --- a/tools/lib/makefile_cc.~82b14679df98a141dbf8dac2f51f30d5fc84863b~ +++ /dev/null @@ -1,113 +0,0 @@ - -SHELL=/bin/bash - --include 0_makefile-flags - -DEPSFILE=$(TMPDIR)/makefile_deps - -# a single space literal, for example if you wanted to subsitute commas to -# spaces: $(subst $(space),;,$(string)) we ran into this out of a need to send -# multiple separate command arguments to a shell script from one variable value -blank := -space :=$(blank) $(blank) - -# files used by the compiler -SOURCES_LIB= $(wildcard *.lib.c) -SOURCES_CLI= $(wildcard *.cli.c) -SOURCES= $(SOURCES_LIB) $(SOURCES_CLI) - -HFILES = $(wildcard *.lib.h) $(wildcard *.cli.h) - -OBJECTS_LIB= $(patsubst %.c, %.o, $(SOURCES_LIB)) -OBJECTS_CLI= $(patsubst %.c, %.o, $(SOURCES_CLI)) -OBJECTS= $(OBJECTS_LIB) $(OBJECTS_CLI) - -EXECS= $(sort $(patsubst %.cli.c, %, $(wildcard *.cli.c))) - -all: version deps lib execs - -version: - @echo makefile version 3.0 - @echo "PWD: " $(PWD) - @echo "MAKEFILE_LIST: " $(MAKEFILE_LIST) - @echo "CC: " $(CC) - @echo "CFLAGS: " $(CFLAGS) - @echo "LINKFLAGS: " $(LINKFLAGS) - -info: - @echo "DEPDIR: " $(DEPDIR) - @echo "DOCDIR: " $(DOCDIR) - @echo "EXECSDIR: " $(EXECSDIR) - @echo "INCDIR: " $(INCDIR) - @echo "LIBDIR: " $(LIBDIR) - @echo "TESTDIR: " $(TESTDIR) - @echo "TMPDIR: " $(TMPDIR) - @echo "TOOLSDIR: " $(TOOLSDIR) - @echo "TRYDIR: " $(TRYDIR) - @echo "DEPSFILE: " $(DEPSFILE) - @echo "LIBFILE: " $(LIBFILE) - @echo "SOURCES_LIB: " $(SOURCES_LIB) - @echo "SOURCES_CLI: " $(SOURCES_CLI) - @echo "SOURCES: " $(SOURCES) - @echo "HFILES: " $(HFILES) - @echo "OBJECTS_LIB: " $(OBJECTS_LIB) - @echo "OBJECTS_CLI: " $(OBJECTS_CLI) - @echo "OBJECTS: " $(OBJECTS) - @echo "EXECS: " $(EXECS) - -# should be safe to run this in an already setup or partially setup directory -setup: - if [ ! -e $(DEPRDIR) ]; then mkdir $(DEPRDIR); fi - if [ ! -e $(DOCDIR) ]; then mkdir $(DOCDIR); fi - if [ ! -e $(EXECSDIR) ]; then mkdir $(EXECSDIR); fi - if [ ! -e $(INCDIR) ]; then mkdir $(INCDIR); fi - if [ ! -e $(LIBDIR) ]; then mkdir $(LIBDIR); fi - if [ ! -e $(TESTDIR) ]; then mkdir $(TESTDIR); fi - if [ ! -e $(TMPDIR) ]; then mkdir $(TMPDIR); fi - if [ ! -e $(TRYDIR) ]; then mkdir $(TRYDIR); fi - -deps: - $(CC) $(CFLAGS) -MM $(SOURCES) 1> $(DEPSFILE) - for i in $(EXECS) ; do\ - $(ECHO) >> $(DEPSFILE);\ - $(ECHO) "$(EXECSDIR)/$$i : $$i.cli.o $(LIBDIR)/$(LIBFILE)" >> $(DEPSFILE);\ - $(ECHO) " $(CC) -o $(EXECSDIR)/$$i $$i.cli.o $(LINKFLAGS)" >> $(DEPSFILE);\ - done - -lib: - if [ ! -e $(DEPSFILE) ]; then make deps; fi - make sub_lib - -sub_lib: $(LIBDIR)/$(LIBFILE) - - -execs: $(LIBDIR)/$(LIBFILE) - if [ ! -e $(DEPSFILE) ]; then make deps; fi - make sub_execs - -sub_execs: $(patsubst %, $(EXECSDIR)/%, $(EXECS)) - -stage: - if [ -f $(LIBDIR)/$(LIBFILE) ]; then cp $(LIBDIR)/$(LIBFILE) $(PROJECT_SUBU)/stage/lib; fi - if [ -f $(INCDIR)/$(INCFILE) ]; then cp $(INCDIR)/$(INCFILE) $(PROJECT_SUBU)/stage/include; fi - cp $(EXECSDIR)/* $(PROJECT_SUBU)/stage/bin - -clean: - for i in $(wildcard *~); do mv $$i $(TMPDIR); done - for i in $(wildcard *.lib.o) $(wildcard *.cli.o); do rm $$i; done - for i in $(EXECS); do if [ -e $(EXECSDIR)/$$i ]; then rm $(EXECSDIR)/$$i; fi; done - if [ -f $(LIBDIR)/$(LIBFILE) ]; then rm $(LIBDIR)/$(LIBFILE); fi - if [ -f $(DEPSFILE) ]; then rm $(DEPSFILE); fi - -# -$(LIBDIR)/$(LIBFILE) : $(OBJECTS_LIB) - ar rcs $(LIBDIR)/$(LIBFILE) $(OBJECTS_LIB) - --include $(DEPSFILE) - -# recipe for making object files: -# -%.o : %.c - $(CC) $(CFLAGS) -c $< - - -- 2.20.1