projects
/
apps
/
pfixtools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pfix-srsd: add a -I option
[apps/pfixtools.git]
/
Makefile
diff --git
a/Makefile
b/Makefile
index
7fb3235
..
06ccd1e
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-32,44
+32,25
@@
# see AUTHORS and source files for details #
##############################################################################
# see AUTHORS and source files for details #
##############################################################################
-prefix ?= /usr/local
+PROGDIRS = postlicyd pfix-srsd
+LIBDIRS = common
+SUBDIRS = $(LIBDIRS) $(PROGDIRS)
-PROGRAMS = postlicyd pfix-srsd
-LIBS = common
-SUBDIRS = $(LIBS) $(PROGRAMS)
-
-CLEAN_TARGETS = $(addprefix clean-,$(SUBDIRS))
-DISTCLEAN_TARGETS = $(addprefix distclean-,$(SUBDIRS))
-INSTALL_TARGETS = $(addprefix install-,$(SUBDIRS))
+DOCS = pfixtools.7
# RULES ###################################################################{{{
# RULES ###################################################################{{{
-all: $(SUBDIRS)
-
-clean: $(CLEAN_TARGETS)
-
-distclean: $(DISTCLEAN_TARGETS)
-
-install: all $(INSTALL_TARGETS)
-
-$(PROGRAMS): $(LIBS)
+all clean distclean doc install: %: %-recurse
-
$(SUBDIRS): %
:
- make -C $@ all
+
%-recurse
:
+ @set -e $(foreach dir,$(SUBDIRS),; $(MAKE) -C $(dir) $*)
-$(CLEAN_TARGETS): clean-%:
- make -C $* clean
-
-$(DISTCLEAN_TARGETS): distclean-%:
- make -C $* distclean
-
-$(INSTALL_TARGETS): install-%: % install-dir
- make -C $* install
-
-install-postlicyd: install-postlicyd-tools install-postlicyd-conf
+install-recurse: install-dir
+install: install-postlicyd-tools install-postlicyd-conf
install-dir:
install -d $(DESTDIR)$(prefix)/sbin
install -d $(DESTDIR)$(prefix)/bin
install-dir:
install -d $(DESTDIR)$(prefix)/sbin
install -d $(DESTDIR)$(prefix)/bin
+ install -d $(DESTDIR)$(prefix)/share/doc/pfixtools
install -d $(DESTDIR)/etc/pfixtools
install-postlicyd-tools:
install -d $(DESTDIR)/etc/pfixtools
install-postlicyd-tools:
@@
-81,8
+62,8
@@
install-postlicyd-conf:
install -m 640 example/postlicyd.conf $(DESTDIR)/etc/pfixtools/postlicyd.example.conf
install -m 640 example/postlicyd-rsyncrbl.conf $(DESTDIR)/etc/pfixtools/postlicyd-rsyncrbl.example.conf
install -m 640 example/postlicyd.conf $(DESTDIR)/etc/pfixtools/postlicyd.example.conf
install -m 640 example/postlicyd-rsyncrbl.conf $(DESTDIR)/etc/pfixtools/postlicyd-rsyncrbl.example.conf
-.PHONY: clean distclean install install-dir $(SUBDIRS) $(CLEAN_TARGETS) \
- $(DISTCLEAN_TARGETS) $(INSTALL_TARGETS) install-postlicyd-tools \
- install-postlicyd-conf
+.PHONY: clean distclean install install-% %-recurse
###########################################################################}}}
###########################################################################}}}
+
+include mk/common.mk