summaryrefslogtreecommitdiffstats
path: root/src/Makefile.in
diff options
context:
space:
mode:
authorP. 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)
commitc6dbf4726d3cd4a98fe24929a28c78e880b39024 (patch)
tree8365c9ef219a06f78d25a501c717c5ab65ced04f /src/Makefile.in
parent6b31e57b664970bc6caeef0c840403862b3c7172 (diff)
Start rewriting build system.
Diffstat (limited to 'src/Makefile.in')
-rw-r--r--src/Makefile.in53
1 files changed, 28 insertions, 25 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)'