# inside modules or libs) (andrei)
# 2009-10-01 added support for automatically installing extra utils,
# scripts and cfg files (andrei)
+# 2010-03-04 don't overwrite already installed .cfgs, save the .cfg as
+# .sample in this case (andrei)
#
#
# temporary def (visible only in the module, not exported)
DEFS += -DMOD_NAME='"$(MOD_NAME)"'
+
+ifeq (,$(findstring -DSER_MOD_INTERFACE, $(DEFS)))
+ MODIFACE=-DOPENSER_MOD_INTERFACE
+else
+ MODIFACE=-DSER_MOD_INTERFACE
+endif
+
+
ifneq ($(makefile_defs_included),1)
$(error "the local makefile does not include Makefile.defs!")
endif
@for r in $(MOD_INSTALL_CFGS) ; do \
if [ -n "$$r" ]; then \
if [ -f "$$r" ]; then \
+ n=`basename "$$r"` ; \
$(call try_err, $(INSTALL_TOUCH) \
- $(cfg_prefix)/$(cfg_dir)/`basename "$$r"` ); \
+ "$(cfg_prefix)/$(cfg_dir)/$$n.sample" ); \
$(call try_err,\
- $(INSTALL_CFG) "$$r" $(cfg_prefix)/$(cfg_dir) ); \
+ $(INSTALL_CFG) "$$r" \
+ "$(cfg_prefix)/$(cfg_dir)/$$n.sample"); \
+ if [ -z "${skip_cfg_install}" -a \
+ ! -f "$(cfg_prefix)/$(cfg_dir)$$n" ]; then \
+ mv -f $(cfg_prefix)/$(cfg_dir)$$n.sample \
+ $(cfg_prefix)/$(cfg_dir)$$n; \
+ fi ; \
else \
echo "ERROR: $$r not found" ; \
if [ ${err_fail} = 1 ] ; then \
ifneq (,$(wildcard doc/Makefile))
#doc/Makefile present => we can generate README
-README: doc/*.xml
+README: doc/*.xml ../../docbook/entities.xml
$(MAKE) -C doc $(MOD_NAME).txt
mv doc/$(MOD_NAME).txt $@
endif
+
+printmiface:
+ @echo -n $(MODIFACE)
+
endif # ifeq($(makefile_defs),1)
include $(COREPATH)/Makefile.cfg