summaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am110
1 files changed, 39 insertions, 71 deletions
diff --git a/Makefile.am b/Makefile.am
index 83c0127..f8cdfa8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -18,81 +18,48 @@
# along with the ProteanOS Development Kit. If not, see
# <http://www.gnu.org/licenses/>.
-include $(top_srcdir)/src/local.mk
-include $(top_srcdir)/lib/local.mk
-include $(top_srcdir)/lib/cmd/local.mk
-include $(top_srcdir)/lib/profile/local.mk
-include $(top_srcdir)/lib/package/local.mk
-include $(top_srcdir)/man/local.mk
-include $(top_srcdir)/locale/local.mk
-include $(top_srcdir)/tests/local.mk
-
MANUAL = ProteanOS Development Kit Manual
+TEXTDOMAIN = $$(printf '%s\n' '$(PACKAGE)' | sed -e 's|-|_|g')
+
+SUFFIXES = .sh .sho .ms .1in .1 .8in .8
+LINK = '$(srcdir)/tools/shld.sh' -I '$(SH)' -o $@ config.sh
+
+bin_PROGRAMS = prokit
+
+prokit_SOURCES =
+prokit_SHPPFLAGS = \
+ -DPKGDATADIR="$(pkgdatadir)" \
+ -DLOCALEDIR="$(localedir)" \
+ -DPKGLOCALSTATEDIR="$(pkglocalstatedir)" \
+ -DTEXTDOMAIN="$(TEXTDOMAIN)"
+prokit_LDADD = $(prokit_SOURCES:.sh=.sho)
+
+locale_MESSAGES = $(locale_sources:.sh=.ms)
-bin_SCRIPTS = $(bin_sources:.sh=)
-pkgdata_SCRIPTS = $(pkgdata_sources:.sh=.sm)
-pkgdatacmd_SCRIPTS = $(pkgdatacmd_sources:.sh=.sm)
-pkgdataprofile_SCRIPTS = $(pkgdataprofile_sources:.sh=.sm)
-pkgdatapackage_SCRIPTS = $(pkgdatapackage_sources:.sh=.sm)
man1_MANS = $(man1_sources:.1in=.1)
man8_MANS = $(man8_sources:.8in=.8)
-locale_MESSAGES = $(locale_sources:.sh=.ms)
+do_subst = sed \
+ -e 's|[@]PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \
+ -e 's|[@]PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g' \
+ -e 's|[@]MANUAL[@]|$(MANUAL)|g'
+
noinst_DATA = $(locale_MESSAGES) .builddirstamp
CLEANFILES = \
- $(bin_SCRIPTS) \
- $(pkgdata_SCRIPTS) \
- $(pkgdatacmd_SCRIPTS) \
- $(pkgdataprofile_SCRIPTS) \
- $(pkgdatapackage_SCRIPTS) \
+ $(locale_MESSAGES) \
$(man1_MANS) \
$(man8_MANS) \
- $(locale_MESSAGES) \
.builddirstamp
-pkgdatacmddir = $(pkgdatadir)/cmd
-pkgdataprofiledir = $(pkgdatadir)/profile
-pkgdatapackagedir = $(pkgdatadir)/package
uninstall_dirs = \
'$(DESTDIR)$(pkglocalstatedir)/mount' \
- '$(DESTDIR)$(pkglocalstatedir)' \
- '$(DESTDIR)$(pkgdatapackagedir)' \
- '$(DESTDIR)$(pkgdataprofiledir)' \
- '$(DESTDIR)$(pkgdatacmddir)' \
- '$(DESTDIR)$(pkgdatadir)'
-sources = \
- $(bin_sources) \
- $(pkgdata_sources) \
- $(pkgdatacmd_sources) \
- $(pkgdataprofile_sources) \
- $(pkgdatapackage_sources) \
- $(man1_sources) \
- $(man8_sources) \
- $(locale_sources) \
- $(TESTS) \
- tests/common.sh \
- tests/parse_control.common.sh
+ '$(DESTDIR)$(pkglocalstatedir)'
EXTRA_DIST = \
autogen.sh \
- $(sources) \
- scripts/announce-release.sh
-
-SUFFIXES = .sh .sm .1in .1 .8in .8 .ms
-
-cmds = $$(printf '%s ' $(pkgdatacmd_SCRIPTS) | \
- sed -e 's|[^ ]*/\([^ ]*\)\.sm |\1 |g')
-profiles = $$(printf '%s ' $(pkgdataprofile_SCRIPTS) | \
- sed -e 's|[^ ]*/\([^ ]*\)\.sm |\1 |g')
-textdomain = $$(printf '%s\n' '$(PACKAGE)' | sed -e 's|-|_|g')
-do_subst = sed \
- -e 's|[@]PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \
- -e 's|[@]PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g' \
- -e 's|[@]MANUAL[@]|$(MANUAL)|g' \
- -e 's|[@]SH[@]|$(SH)|g' \
- -e 's|[@]pkgdatadir[@]|$(pkgdatadir)|g' \
- -e 's|[@]localedir[@]|$(localedir)|g' \
- -e 's|[@]pkglocalstatedir[@]|$(pkglocalstatedir)|g' \
- -e "s|[@]cmds[@]|$(cmds)|g" \
- -e "s|[@]profiles[@]|$(profiles)|g" \
- -e "s|[@]textdomain[@]|$(textdomain)|g"
+ $(locale_sources) \
+ $(man1_sources) \
+ $(man8_sources) \
+ scripts/announce-release.sh \
+ tools/shpp.sh \
+ tools/shld.sh
AM_TESTS_ENVIRONMENT = srcdir=$(top_srcdir) COLOR_TEST_LOGS=$(COLOR_TEST_LOGS)
@@ -114,7 +81,7 @@ todo:
printf '\n'; \
printf 'Code comments:\n'; \
printf '==============\n\n'; \
- for f in $(sources); do \
+ for f in $$(printf '%s\n' $(SOURCES) | sort -u); do \
printed=false; \
sed '=' "$(top_srcdir)/$${f}" | sed 'N; s/\n/ ./' | sed -n \
'$(todo_script)' | while read -r lineno line; do \
@@ -213,14 +180,14 @@ release:
'$(srcdir)/scripts/announce-release.sh' \
$(PACKAGE) $(VERSION) '$(PACKAGE_NAME)'
-.sh:
+.sh.sho:
$(AM_V_GEN)$(MKDIR_P) "$$(dirname $@)"
- $(AM_V_at)$(do_subst) $< >$@
- $(AM_V_at)chmod a+x $@
+ $(AM_V_at)$(SH) -n $<
+ $(AM_V_at)'$(srcdir)/tools/shpp.sh' $(prokit_SHPPFLAGS) $< $@
-.sh.sm:
+.sh.ms:
$(AM_V_GEN)$(MKDIR_P) "$$(dirname $@)"
- $(AM_V_at)$(do_subst) $< >$@
+ $(AM_V_at)cp $< $@
.1in.1:
$(AM_V_GEN)$(MKDIR_P) "$$(dirname $@)"
@@ -230,6 +197,7 @@ release:
$(AM_V_GEN)$(MKDIR_P) "$$(dirname $@)"
$(AM_V_at)$(do_subst) $< >$@
-.sh.ms:
- $(AM_V_GEN)$(MKDIR_P) "$$(dirname $@)"
- $(AM_V_at)cp $< $@
+include $(top_srcdir)/src/local.mk
+include $(top_srcdir)/locale/local.mk
+include $(top_srcdir)/man/local.mk
+include $(top_srcdir)/tests/local.mk