# | grep -v deprecated | grep -v doc | sort -u | sed ':a;N;$!ba;s/\n/ /g' \
#)
-MAKEABLE= module/da module/da/test module/tranche module/dispatch
+MAKEABLE= module/da module/da/test module/db module/tranche module/dispatch
.PHONY: all info clean dist-clean
-# da/makefile
-
+# da/
SHELL=/bin/bash
MAKE=/usr/bin/make --no-print-directory -f $(PROJECT_SUBU)/tool/lib/makefile-cc
.PHONY: lib
lib:
$(MAKE) $@
- cp src/da.lib.h include/da.h
+ cp $(SRCDIR)/da.lib.h $(INCDIR)/da.h
+
+.PHONY: exec
+exec:
+ $(MAKE) $@
%::
$(MAKE) $@
MODULE=da
+DEPRDIR=deprecated
+DOCDIR=doc
+EXECDIR=exec
+INCDIR=include
+LIBDIR=lib
+SHAREDIR=../share
+SRCDIR=src
+TESTDIR=test
+TMPDIR=tmp
+TOOLDIR=$(realpath $(PROJECT_SUBU)/tool)
+TRYDIR=try
+
+DEPFILE=$(TMPDIR)/makefile-cc.deps
+LIBFILE=$(LIBDIR)/lib$(MODULE).a
+INCFILE=$(INCDIR)/$(MODULE).h
+
# some versions of Linux need a -e option others complain if there is a -e .. and it isn't the binary for echo ..
ECHO= echo
#ECHO= echo -e
-# directories used by this makefile, these could all be set to dot for
-# the simplest source directory structure
-
# compiler and flags
C=gcc
CFLAGS=-std=gnu11 -fPIC -I. -ggdb -Werror -DDEBUG -DDEBUGDB
-include makefile-flags
-.PHONY: all lib exec
-all: version deps lib exec
+.PHONY: all
+all: version
.PHONY: dep
dep:
if [ -e $(DEPFILE) ]; then rm $(DEPFILE); fi
$(MAKE) $@
+.PHONY: lib
lib:
$(MAKE) $@
+.PHONY: exec
exec:
$(MAKE) $@
MODULE=test
+DEPRDIR=deprecated
+DOCDIR=doc
+EXECDIR=exec
+INCDIR=include
+LIBDIR=lib
+SHAREDIR=../share
+SRCDIR=src
+TESTDIR=
+TMPDIR=tmp
+TOOLDIR=$(realpath $(PROJECT_SUBU)/tool)
+TRYDIR=try
+
+DEPFILE=$(TMPDIR)/makefile-cc.deps
+LIBFILE=$(LIBDIR)/lib$(MODULE).a
+INCFILE=$(INCDIR)/$(MODULE).h
+
# some versions of Linux need a -e option others complain if there is a -e .. and it isn't the binary for echo ..
ECHO= echo
#ECHO= echo -e
-# directories used by this makefile, these could all be set to dot for
-# the simplest source directory structure
-TESTDIR=
-
# compiler and flags
C=gcc
CFLAGS=-std=gnu11 -fPIC -I../include -ggdb -Werror -DDEBUG -DDEBUGDB
+++ /dev/null
-#ifndef DB_LIB_H
-#define DB_LIB_H
-
-int dbprintf(const char *format, ...);
-
-#endif
-# da/makefile
-
+# db
SHELL=/bin/bash
MAKE=/usr/bin/make --no-print-directory -f $(PROJECT_SUBU)/tool/lib/makefile-cc
-include makefile-flags
.PHONY: all
-all: version dep lib exec
+all: version
+
+.PHONY: dep
+dep:
+ if [ -e $(DEPFILE) ]; then rm $(DEPFILE); fi
+ $(MAKE) $@
.PHONY: lib
lib:
$(MAKE) $@
- cp src/db.lib.h include/db.h
+ cp $(SRCDIR)/db.lib.h $(INCDIR)/db.h
%::
$(MAKE) $@
MODULE=db
+DEPRDIR=deprecated
+DOCDIR=doc
+EXECDIR=exec
+INCDIR=include
+LIBDIR=lib
+SHAREDIR=../share
+SRCDIR=src
+TESTDIR=test
+TMPDIR=tmp
+TOOLDIR=$(realpath $(PROJECT_SUBU)/tool)
+TRYDIR=try
+
+DEPFILE=$(TMPDIR)/makefile-cc.deps
+LIBFILE=$(LIBDIR)/lib$(MODULE).a
+INCFILE=$(INCDIR)/$(MODULE).h
+
# some versions of Linux need a -e option others complain if there is a -e .. and it isn't the binary for echo ..
ECHO= echo
#ECHO= echo -e
-# directories used by this makefile, these could all be set to dot for
-# the simplest source directory structure
-
# compiler and flags
C=gcc
CFLAGS=-std=gnu11 -fPIC -I. -ggdb -Werror -DDEBUG -DDEBUGDB
--- /dev/null
+# src-dispatch/makefile
+
+SHELL=/bin/bash
+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
+
+-include makefile-flags
+
+
+.PHONY: all
+all: version
+
+.PHONY: info
+info:
+ @echo "TRCDIR: " $(TRCDIR)
+ $(MAKE) $@
+
+.PHONY: setup
+setup:
+ [ ! -e $(TRCDIR) ] && mkdir $(TRCDIR) || true
+ $(MAKE) $@
+
+.PHONY: dep
+dep:
+ if [ -e $(DEPFILE) ]; then rm $(DEPFILE); fi
+ @trcsources=$(wildcard $(TRCDIR)/*.trc.c)$(wildcard $(TRCDIR)/*.trc.cc);\
+ if [ ! -z "$$trcsources" ]; then\
+ trctargets=$$(tranche-target $$trcsources -sep " " -tdir $(SRCDIR) );\
+ $(ECHO) $$trcsources;\
+ tranche-make $$trcsources -tdir $(SRCDIR) -mfile $(DEPFILE);\
+ $(MAKE) $$trctargets;\
+ fi
+ $(MAKE) $@
+
+.PHONY: lib
+lib:
+ $(MAKE) $@
+
+o%::
+ $(MAKE) $@
+
+
+
+
#MAKE=/usr/bin/make -f $(PROJECT_SUBU)/tool/lib/makefile-cc
-include makefile-flags
-DEPFILE=$(TMPDIR)/makefile-cc.deps
+
.PHONY: all
all: version
.PHONY: dep
dep:
if [ -e $(DEPFILE) ]; then rm $(DEPFILE); fi
- trcsources=$(wildcard $(TRCDIR)/*.trc.c)$(wildcard $(TRCDIR)/*.trc.cc);\
- $(ECHO) $$trcsources;\
+ @trcsources=$(wildcard $(TRCDIR)/*.trc.c)$(wildcard $(TRCDIR)/*.trc.cc);\
if [ ! -z "$$trcsources" ]; then\
trctargets=$$(tranche-target $$trcsources -sep " " -tdir $(SRCDIR) );\
- $(ECHO) $$trctargets;\
+ $(ECHO) $$trcsources;\
tranche-make $$trcsources -tdir $(SRCDIR) -mfile $(DEPFILE);\
$(MAKE) $$trctargets;\
fi
MODULE=dispatch
+DEPRDIR=deprecated
+DOCDIR=doc
+EXECDIR=exec
+INCDIR=include
+LIBDIR=lib
+SHAREDIR=../share
+SRCDIR=tmp
+TESTDIR=test
+TMPDIR=tmp
+TOOLDIR=$(realpath $(PROJECT_SUBU)/tool)
+TRCDIR=trc
+TRYDIR=try
+
+DEPFILE=$(TMPDIR)/makefile-trc.deps
+LIBFILE=$(LIBDIR)/lib$(MODULE).a
+INCFILE=$(INCDIR)/$(MODULE).h
+
# some versions of Linux need a -e option others complain if there is a -e .. and it isn't the binary for echo ..
ECHO= echo
#ECHO= echo -e
-# directories used by this makefile, these could all be set to dot for
-# the simplest source directory structure
-
# compiler and flags
C=gcc
-CFLAGS=-std=gnu11 -fPIC -I. -ggdb -Werror -DDEBUG -DDEBUGDB
-#CFLAGS=-std=gnu11 -fPIC -I. -Werror
+CFLAGS=-std=gnu11 -fPIC -I. -I../share/include -ggdb -Werror -DDEBUG -DDEBUGDB
+#CFLAGS=-std=gnu11 -fPIC -I. -I../share/include -Werror
LINKFLAGS=-L1_lib -lda
-TMPDIR=tmp
-SRCDIR=tmp
-TRCDIR=trc
--- /dev/null
+#ifndef DB_LIB_H
+#define DB_LIB_H
+
+int dbprintf(const char *format, ...);
+
+#endif
MODULE=tranche
+DEPRDIR=deprecated
+DOCDIR=doc
+EXECDIR=exec
+INCDIR=include
+LIBDIR=lib
+SHAREDIR=../share
+SRCDIR=src
+TESTDIR=
+TMPDIR=tmp
+TOOLDIR=$(realpath $(PROJECT_SUBU)/tool)
+TRYDIR=try
+
+DEPFILE=$(TMPDIR)/makefile-cc.deps
+LIBFILE=$(LIBDIR)/lib$(MODULE).a
+INCFILE=$(INCDIR)/$(MODULE).h
+
# some versions of Linux need a -e option others complain if there is a -e .. and it isn't the binary for echo ..
ECHO= echo
#ECHO= echo -e
-# directories used by this makefile, these could all be set to dot for
-# the simplest source directory structure
-EXECDIR=exec
-
C=gcc
CFLAGS=-std=gnu11 -fPIC -I. -I../share/include -ggdb -Werror -DDEBUG -DDEBUGDB
-#CFLAGS=-std=gnu11 -fPIC -I. -Werror
+#CFLAGS=-std=gnu11 -fPIC -I. -I../share/include -Werror
LINKFLAGS=-Llib -L../share/lib/ -lda -ltranche
# default directory seteup
#
-
DEPRDIR=deprecated
DOCDIR=doc
EXECDIR=exec
TOOLDIR=$(realpath $(PROJECT_SUBU)/tool)
TRYDIR=try
+DEPFILE=$(TMPDIR)/makefile-cc.deps
+LIBFILE=$(LIBDIR)/lib$(MODULE).a
+INCFILE=$(INCDIR)/$(MODULE).h
+
# a single space literal, for example if you wanted to subsitute commas to
# spaces: $(subst $(space),;,$(string))
-include makefile-flags
-DEPFILE=$(TMPDIR)/makefile-cc.deps
-LIBFILE=$(LIBDIR)/lib$(MODULE).a
-INCFILE=$(INCDIR)/$(MODULE).h
-
-
#--------------------------------------------------------------------------------
# targets
--- /dev/null
+
+
+.PHONY: lib version
+
+version:
+ @echo "version 0.1"
+
+%::
+ @echo $@
+
+
--- /dev/null
+2019-04-02T10:48:22Z
+user@host§~/subu_land/subu/try/phony_general_targets§
+> cat makefile
+
+
+.PHONY: lib version
+
+version:
+ @echo "version 0.1"
+
+%::
+ @echo $@
+
+
+
+2019-04-02T10:48:27Z
+user@host§~/subu_land/subu/try/phony_general_targets§
+> mkdir version lib
+
+2019-04-02T10:48:38Z
+user@host§~/subu_land/subu/try/phony_general_targets§
+> ls
+lib makefile version
+
+2019-04-02T10:48:42Z
+user@host§~/subu_land/subu/try/phony_general_targets§
+> make version
+version 0.1
+
+2019-04-02T10:48:50Z
+user@host§~/subu_land/subu/try/phony_general_targets§
+> make code
+code
+
+2019-04-02T10:48:57Z
+user@host§~/subu_land/subu/try/phony_general_targets§
+> make lib
+make: Nothing to be done for 'lib'.
+
+2019-04-02T10:49:00Z
+user@host§~/subu_land/subu/try/phony_general_targets§
+>