From c6dbf4726d3cd4a98fe24929a28c78e880b39024 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Thu, 02 Aug 2012 05:45:46 -0400 Subject: Start rewriting build system. --- (limited to 'src') 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 . -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 -- cgit v0.9.1