objs := $(addprefix $(B)/, $(addsuffix .o, $(units)))
ifeq ($(findstring clean, $(MAKECMDGOALS)),)
-ifeq ($(findstring README, $(MAKECMDGOALS)),)
-include $(deps)
-include $(B)/config.mak
endif
-endif
+
+M4 += \
+ -D "AUTHOR=$(AUTHOR)" \
+ -D "COPYRIGHT_YEAR=$(COPYRIGHT_YEAR)" \
+ -D "PACKAGE=$(PACKAGE)" \
+ -D "SLOGAN=$(SLOGAN)" \
+ -D "EMAIL=$(EMAIL)" \
+ -D "URL=$(URL)" \
+ -D "CLONE_URL=$(CLONE_URL)" \
+ -D "GITWEB_URL=$(GITWEB_URL)" \
+ -D "HOME_URL=$(HOME_URL)" \
+ -D "LICENSE=$(LICENSE)" \
+ -D "LICENSE_URL=$(LICENSE_URL)" \
+ defs.m4
XCPPFLAGS :=
XCPPFLAGS += -I$(B)
./config.status -q
test -f config.h && touch config.h
-define DESCRIPTION1 :=
- $(PACKAGE) is a lightweight container implementation for Linux.
- It consists of a single program which reads a single configuration
- file that describes all containers. $(PACKAGE) was written with
- performance and simplicity in mind, and is designed for trusted
- in-house web application hosting.
-endef
-
-define DESCRIPTION2 :=
- Like other container frameworks, $(PACKAGE) employs Linux namespaces
- for isolation and cgroup controllers to limit the resource utilization
- of the containers. Networking is implemented through bridging and
- virtual ethernet device pairs. There is built-in support for the cpu,
- memory, I/O and device controllers. Further customization is possible
- via startup hooks. For example, the startup hook could activate
- additional cgroup controllers, make the container enter a different
- namespace, and mount additional file systems.
-endef
-
-define DESCRIPTION3 :=
- The micoforia program supports a couple of subcommands. Besides
- the start subcommand which starts one or more containers, there are
- subcommands for listing, killing or rebooting containers.
-endef
-
-# dependency on config.mak is because the command below depends on $(M4)
$(B)/index.html $(B)/micoforia.suite: $(B)/%: %.m4 Makefile $(B)/config.mak
$(call SAY, M4 $<)
- $(M4) -D "AUTHOR=$(AUTHOR)" -D "COPYRIGHT_YEAR=$(COPYRIGHT_YEAR)" \
- -D "PACKAGE=$(PACKAGE)" \
- -D "SLOGAN=$(SLOGAN)" \
- -D "EMAIL=$(EMAIL)" \
- -D "URL=$(URL)" \
- -D "CLONE_URL=$(CLONE_URL)" \
- -D "GITWEB_URL=$(GITWEB_URL)" \
- -D "HOME_URL=$(HOME_URL)" \
- -D "LICENSE=$(LICENSE)" \
- -D "LICENSE_URL=$(LICENSE_URL)" \
- -D "DESCRIPTION1=$(DESCRIPTION1)" \
- -D "DESCRIPTION2=$(DESCRIPTION2)" \
- -D "DESCRIPTION3=$(DESCRIPTION3)" $< > $@
+ $(M4) $< > $@
$(B)/%.lsg.c: $(B)/%.suite
$(call SAY, LSGC $<)
$(LOPSUBGEN) --gen-c --output-dir $(B) < $<
maintainer-clean:
git clean -dfqx > /dev/null 2>&1
-define README :=
-$(PACKAGE) - $(SLOGAN)
-
-$(DESCRIPTION1)
-
-$(DESCRIPTION2)
-
-$(DESCRIPTION3)
-
-Resources
-~~~~~~~~~
-| web page: $(URL)
-| git clone URL: $(CLONE_URL)
-| gitweb: $(GITWEB_URL)
-| author's home page: $(HOME_URL)
-| Send feedback to: $(AUTHOR) <$(EMAIL)>
-
-License
-~~~~~~~
-Open source, licensed under the $(LICENSE).
-
-Documentation
-~~~~~~~~~~~~~
-See micoforia.suite.m4. Or build the man page with \"make\" and run
-\"man -l micoforia.8\".
-
-Dependencies
-~~~~~~~~~~~~
-This package requires m4, autoconf, gnu make, gcc or clang, and
-lopsub. The configure script checks if all dependencies are installed
-and prints a meaningful error message if one of them is missing.
-
-Building
-~~~~~~~~
-Run \"make\" to build the package with the default settings. Run
-\"./configure -h\" to list configuration options.
-
-Installation
-~~~~~~~~~~~~
-Run \"sudo make install\" to install to /usr/local. To install to
-/somewhere/else, run \"./configure --prefix /somewhere/else && make\"
-first.
-endef
-
-README:
- @printf '%s\n' "$(README)"
+README: README.m4 Makefile $(B)/config.mak
+ @$(M4) $<
.PRECIOUS: $(B)/%.lsg.c $(B)/%.lsg.h $(B)/%.8
.PHONY: all clean install distclean maintainer-clean README
--- /dev/null
+dnl Run "make README" to see the below with variables expanded
+PACKAGE() - SLOGAN()
+
+DESCRIPTION1()
+
+DESCRIPTION2()
+
+DESCRIPTION3()
+
+Resources
+~~~~~~~~~
+| web page: URL()
+| git clone CLONE_URL()
+| gitweb: GITWEB_URL()
+| author's home page: HOME_URL()
+| Send feedback to: AUTHOR() <EMAIL()>
+
+License
+~~~~~~~
+Open source, licensed under the LICENSE().
+
+Documentation
+~~~~~~~~~~~~~
+See micoforia.suite.m4. Or build the man page with \"make\" and run
+\"man -l micoforia.8\".
+
+Dependencies
+~~~~~~~~~~~~
+This package requires m4, autoconf, gnu make, gcc or clang, and
+lopsub. The configure script checks if all dependencies are installed
+and prints a meaningful error message if one of them is missing.
+
+Building
+~~~~~~~~
+Run \"make\" to build the package with the default settings. Run
+\"./configure -h\" to list configuration options.
+
+Installation
+~~~~~~~~~~~~
+Run \"sudo make install\" to install to /usr/local. To install to
+/somewhere/else, run \"./configure --prefix /somewhere/else && make\"
+first.
--- /dev/null
+divert(-1)
+changequote(`«', `»')
+define(«DESCRIPTION1», «dnl
+PACKAGE() is a lightweight container implementation for Linux.
+It consists of a single program which reads a single configuration
+file that describes all containers. PACKAGE() was written with
+performance and simplicity in mind, and is designed for trusted
+in-house web application hosting.»)
+
+define(«DESCRIPTION2», «dnl
+Like other container frameworks, PACKAGE() employs Linux namespaces
+for isolation and cgroup controllers to limit the resource utilization
+of the containers. Networking is implemented through bridging and
+virtual ethernet device pairs. There is built-in support for the cpu,
+memory, I/O and device controllers. Further customization is possible
+via startup hooks. For example, the startup hook could activate
+additional cgroup controllers, make the container enter a different
+namespace, and mount additional file systems.»)
+
+define(«DESCRIPTION3», «dnl
+The PACKAGE() program supports a couple of subcommands. Besides
+the start subcommand which starts one or more containers, there are
+subcommands for listing, killing or rebooting containers.»)
+
+divert(0)dnl