diff options
author | Alexey Neyman <stilor@att.net> | 2018-04-11 04:27:07 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-11 04:27:07 (GMT) |
commit | ffc638142d8bb5d70204047a7bd3bdd34b127d85 (patch) | |
tree | 317cf27c6163d608a3df30e15eecc540c7020ef4 /Makefile.am | |
parent | 7c3422675909ea8b117f94a26170af06a265477e (diff) | |
parent | c4608f07f7e06a58d48d74b64296be663a94c604 (diff) |
Merge pull request #937 from stilor/build-autotoolize
Autotoolize crosstool-ng
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..5ee3682 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,77 @@ +## Process this file with automake to produce Makefile.in +## vim: set noet : + +include verbatim-data.mk + +SUBDIRS = kconfig + +bin_SCRIPTS = ct-ng +CLEANFILES = ct-ng bash-completion/ct-ng docs/ct-ng.1 +EXTRA_DIST = bootstrap ct-ng.in bash-completion/ct-ng.in docs/ct-ng.1.in maintainer + +if INSTALL_BASH_COMPLETION +compdir = @BASH_COMPLETION_DIR@ +comp_SCRIPTS = bash-completion/ct-ng +endif + +man1_MANS = docs/ct-ng.1 + +# paths.sh generated by configure +nobase_dist_pkgdata_DATA = $(verbatim_data) paths.sh + +# ct-ng, as renamed by the installation +ctng_progname = `echo ct-ng | sed '$(transform)'` + +USER_MANUAL_FILES = \ + docs/manual/1_Introduction.md \ + docs/manual/2_Installation.md \ + docs/manual/3_Configuration.md \ + docs/manual/4_Building.md \ + docs/manual/5_Toolchain_Usage.md \ + docs/manual/6_Toolchain_Types.md \ + docs/manual/7_Contributing.md \ + docs/manual/8_Internals.md \ + docs/manual/9_Toolchain_Construction.md \ + docs/manual/A_Credits.md \ + docs/manual/B_Known_issues.md \ + docs/manual/C_Setup_OS.md \ + docs/manual/D_Tutorials_features.md + +if INSTALL_USER_MANUAL +doc_DATA = $(USER_MANUAL_FILES) +else +doc_DATA = docs/MANUAL_ONLINE +endif + +do_subst = ( @SED@ \ + -e 's,[@]docdir[@],$(docdir),g' \ + -e 's,[@]pkgdatadir[@],$(pkgdatadir),g' \ + -e 's,[@]pkglibexecdir[@],$(pkglibexecdir),g' \ + -e 's,[@]progname[@],'$(ctng_progname)',g' \ + | $(SHELL) config.status --file=- ) + +ct-ng: ct-ng.in Makefile + $(AM_V_GEN)$(do_subst) < $< >$@-t && chmod a-w,a+x $@-t && mv -f $@-t $@ + +docs/ct-ng.1: docs/ct-ng.1.in Makefile + $(AM_V_GEN)$(MKDIR_P) docs && $(do_subst) < $< >$@-t && mv -f $@-t $@ + +bash-completion/ct-ng: bash-completion/ct-ng.in Makefile + $(AM_V_GEN)$(MKDIR_P) bash-completion && $(do_subst) < $< >$@-t && mv -f $@-t $@ + +# automake doesn't offer an option to compress manpages, do it after installation +# Also, lintian is picky about execute-bit on the scripts +install-data-hook: + rm -f $(DESTDIR)$(man1dir)/$(ctng_progname).1.gz + gzip -9 $(DESTDIR)$(man1dir)/$(ctng_progname).1 + chmod +x $(DESTDIR)$(pkgdatadir)/scripts/config.guess + chmod +x $(DESTDIR)$(pkgdatadir)/scripts/config.sub +if INSTALL_BASH_COMPLETION + chmod -x $(DESTDIR)$(compdir)/$(ctng_progname) +endif + +uninstall-hook: + rm -f $(DESTDIR)$(man1dir)/$(ctng_progname).1.gz + +dist-hook: maintainer/download-docs.sh + $< $(top_distdir) $(USER_MANUAL_FILES) |