mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
lo.mk, topdir.mk: Add target description
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
e2ef60eef6
commit
678202b105
2 changed files with 18 additions and 5 deletions
11
make/lo.mk
11
make/lo.mk
|
|
@ -8,14 +8,14 @@ LOADABLE_OBJ_HOOK ?= LOADABLE_OBJECT_HOOK
|
||||||
|
|
||||||
include $(MODDIR)/make/defs.mk
|
include $(MODDIR)/make/defs.mk
|
||||||
|
|
||||||
.PRECIOUS: %.cpp
|
.PRECIOUS: %.cpp %.o
|
||||||
LOADABLE_OBJS_BASE = $(patsubst %$(CPP_SUFFIX),%,$(patsubst $(CPP_PREFIX)%,%,$(basename $(notdir $(wildcard $(TOOLS_DIR)/$(CPP_PREFIX)*$(CPP_SUFFIX).h)))))
|
LOADABLE_OBJS_BASE = $(patsubst %$(CPP_SUFFIX),%,$(patsubst $(CPP_PREFIX)%,%,$(basename $(notdir $(wildcard $(TOOLS_DIR)/$(CPP_PREFIX)*$(CPP_SUFFIX).h)))))
|
||||||
LOADABLE_OBJS = $(filter-out $(LOADABLE_OBJ_IGNORE),$(LOADABLE_OBJS_BASE))
|
LOADABLE_OBJS = $(filter-out $(LOADABLE_OBJ_IGNORE),$(LOADABLE_OBJS_BASE))
|
||||||
LOCAL_CPP = $(patsubst %,%.cpp,$(LOADABLE_OBJS))
|
LOADABLE_OBJ_CPP = $(patsubst %,%.cpp,$(LOADABLE_OBJS))
|
||||||
LOADABLE_OBJS_O = $(patsubst %,%.o,$(LOADABLE_OBJS))
|
LOADABLE_OBJS_O = $(patsubst %,%.o,$(LOADABLE_OBJS))
|
||||||
|
|
||||||
OTHER_CPP_IGNORE = $(patsubst %,$(CPP_PREFIX)%.cpp,$(LOADABLE_OBJ_IGNORE))
|
OTHER_CPP_IGNORE = $(patsubst %,$(CPP_PREFIX)%.cpp,$(LOADABLE_OBJ_IGNORE))
|
||||||
OTHER_CPP = $(filter-out $(LOCAL_CPP) $(OTHER_CPP_IGNORE),$(wildcard *.cpp))
|
OTHER_CPP = $(filter-out $(LOADABLE_OBJ_CPP) $(OTHER_CPP_IGNORE),$(wildcard *.cpp))
|
||||||
ifneq ($(OTHER_CPP),)
|
ifneq ($(OTHER_CPP),)
|
||||||
OTHER_O = $(patsubst %.cpp,%.o,$(OTHER_CPP))
|
OTHER_O = $(patsubst %.cpp,%.o,$(OTHER_CPP))
|
||||||
OTHER_LIB = liblocal.a
|
OTHER_LIB = liblocal.a
|
||||||
|
|
@ -41,8 +41,8 @@ clean.generated:
|
||||||
clean.lo: profclean clean.generated
|
clean.lo: profclean clean.generated
|
||||||
rm -f $(wildcard *.o *.so *.done *.dll $(OTHER_LIB))
|
rm -f $(wildcard *.o *.so *.done *.dll $(OTHER_LIB))
|
||||||
|
|
||||||
$(SO_PREFIX)%.so $(SO_PREFIX)%.dll: %.o $(OTHER_LIB)
|
$(SO_PREFIX)%.so $(SO_PREFIX)%.dll: %.o $(CPP_PREFIX)%.o $(OTHER_LIB)
|
||||||
$(CPP) $< -L. $(OTHER_LIB_LDFLAGS) -shared $(BUILD_LDFLAGS) -o $@
|
$(CPP) $^ -L. $(OTHER_LIB_LDFLAGS) -shared $(BUILD_LDFLAGS) -o $@
|
||||||
|
|
||||||
%.cpp: $(TOOLS_DIR)/$(CPP_PREFIX)%$(CPP_SUFFIX).h
|
%.cpp: $(TOOLS_DIR)/$(CPP_PREFIX)%$(CPP_SUFFIX).h
|
||||||
echo "#include \"$<\"" > $@.tmp
|
echo "#include \"$<\"" > $@.tmp
|
||||||
|
|
@ -63,3 +63,4 @@ $(BUILD_LIBDIR)/%.dll: %.dll
|
||||||
|
|
||||||
include $(MODDIR)/make/rules.mk
|
include $(MODDIR)/make/rules.mk
|
||||||
include $(MODDIR)/make/depend.mk
|
include $(MODDIR)/make/depend.mk
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,8 @@ config:
|
||||||
SUBDIRS ?= $(wildcard inst/pre make scripts contrib tools src include lib bin \
|
SUBDIRS ?= $(wildcard inst/pre make scripts contrib tools src include lib bin \
|
||||||
util plugins conf config cfg images doc test inst/post)
|
util plugins conf config cfg images doc test inst/post)
|
||||||
|
|
||||||
|
PROJECT_DESCR = $(TOPDIR)/doc/share/project.txt
|
||||||
|
|
||||||
ifneq ($(wildcard $(TOPDIR)/make/defs.mk),)
|
ifneq ($(wildcard $(TOPDIR)/make/defs.mk),)
|
||||||
include $(TOPDIR)/make/defs.mk
|
include $(TOPDIR)/make/defs.mk
|
||||||
endif
|
endif
|
||||||
|
|
@ -89,6 +91,10 @@ git-init:
|
||||||
exit 1 ;\
|
exit 1 ;\
|
||||||
fi
|
fi
|
||||||
git init
|
git init
|
||||||
|
if [ -e $(PROJECT_DESCR) ]; then \
|
||||||
|
touch $(PROJECT_DESCR) ;\
|
||||||
|
make description ;\
|
||||||
|
fi
|
||||||
|
|
||||||
git-init-from-cvs: git-init
|
git-init-from-cvs: git-init
|
||||||
list-cvs-files.sh -f | xargs git add
|
list-cvs-files.sh -f | xargs git add
|
||||||
|
|
@ -119,3 +125,9 @@ git-jannet-init: git-import git-clone-to-remote
|
||||||
projects-%:
|
projects-%:
|
||||||
python $(MOD_SCRIPT_DIR)/build.py $* $(PROJECT)
|
python $(MOD_SCRIPT_DIR)/build.py $* $(PROJECT)
|
||||||
|
|
||||||
|
$(TOPDIR)/.git/description: $(PROJECT_DESCR)
|
||||||
|
$(MOD_SCRIPT_DIR)/ini-section.sh summary $< | tee $@.tmp
|
||||||
|
mv $@.tmp $@
|
||||||
|
|
||||||
|
description: $(TOPDIR)/.git/description
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue