diff options
author | P. J. McDermott <pjm@nac.net> | 2012-08-02 05:45:46 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2012-08-02 06:20:52 (EDT) |
commit | c6dbf4726d3cd4a98fe24929a28c78e880b39024 (patch) | |
tree | 8365c9ef219a06f78d25a501c717c5ab65ced04f /src | |
parent | 6b31e57b664970bc6caeef0c840403862b3c7172 (diff) |
Start rewriting build system.
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.in | 53 | ||||
-rw-r--r-- | src/opkbuild.sh | 2 |
2 files changed, 29 insertions, 26 deletions
diff --git a/src/Makefile.in b/src/Makefile.in index bc4a362..22c115c 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -17,58 +17,61 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -SHELL = @shell@ -INSTALL = @install@ -MAKE = @make@ +package_name = @package_name@ +package_version= @package_version@ + +srcdir = @srcdir@ +prefix = @prefix@ +bindir = @bindir@ +libdir = @libdir@ + +sh = @sh@ -SRCDIR = @srcdir@ -PREFIX = @prefix@ -BINDIR = @bindir@ +sed_script = s&@@PACKAGE_NAME@@&$(package_name)&;\ + s&@@PACKAGE_VERSION@@&$(package_version)&;\ + s&@@LIBDIR@@&$(libdir)&;\ + s&@@SH@@&$(sh)&; + +INSTALL = @install@ .SUFFIXES: .SUFFIXES: .sh SRCS = opkbuild.sh \ - oh-checkbuilddeps.sh oh-applypatches.sh oh-copyconfig.sh \ - oh-strip.sh oh-installfiles.sh oh-installdocs.sh \ - oh-gencontrol.sh oh-buildopk.sh oh-parsechangelog.sh + oh-unpacksource.sh \ + oh-applypatches.sh \ + oh-copyconfig.sh \ + oh-gencontrol.sh \ + oh-parsechangelog.sh OBJS = $(SRCS:.sh=) -PACKAGE = @package@ -VERSION = @version@ - -distdir = ../$(PACKAGE)-$(VERSION)/src +distdir = ../$(package_name)-$(package_version)/src distfiles = Makefile.in $(SRCS) -.PHONY: all all: $(OBJS) $(OBJS): @printf ' SED %s\n' '$@' - @sed -f ../sedscript $(SRCDIR)/src/$@.sh > $@ + @sed '$(sed_script)' '$(srcdir)/src/$@.sh' >'$@' -.PHONY: clean clean: @for obj in $(OBJS); do \ printf ' RM src/%s\n' "$${obj}"; \ - rm -f $${obj}; \ + rm -f "$${obj}"; \ done -.PHONY: install install: all @for obj in $(OBJS); do \ printf ' INSTALL src/%s\n' "$${obj}"; \ - $(INSTALL) -D $${obj} "$(DESTDIR)/$(BINDIR)/$${obj}"; \ + $(INSTALL) -D "$${obj}" "$(DESTDIR)/$(bindir)/$${obj}"; \ done -.PHONY: uninstall uninstall: @for obj in $(OBJS); do \ printf ' RM %s\n' "$${obj}"; \ - rm -f "$(DESTDIR)/$(BINDIR)/$${obj}"; \ + rm -f "$(DESTDIR)/$(bindir)/$${obj}"; \ done -.PHONY: distdir -distdir: - @[ -d '$(distdir)' ] || mkdir '$(distdir)' - @cp -pR $(distfiles) $(distdir) +$(distdir): + @mkdir -p '$(distdir)' + @cp -pR $(distfiles) '$(distdir)' diff --git a/src/opkbuild.sh b/src/opkbuild.sh index eac3bef..bcb148e 100644 --- a/src/opkbuild.sh +++ b/src/opkbuild.sh @@ -1,4 +1,4 @@ -#!@@SHELL@@ +#!@@SH@@ # # opkhelper # src/opkbuild |