2009-10-18 09:17:26 +00:00
|
|
|
include vars.mk
|
|
|
|
|
2010-01-16 01:11:44 +00:00
|
|
|
BINS = xbps-src
|
|
|
|
SUBDIRS = etc common libexec helpers triggers shutils
|
2009-10-18 09:17:26 +00:00
|
|
|
|
|
|
|
.PHONY: all
|
|
|
|
all:
|
2010-01-16 01:11:44 +00:00
|
|
|
for bin in $(BINS); do \
|
|
|
|
sed -e "s|@@XBPS_INSTALL_PREFIX@@|$(PREFIX)|g" \
|
|
|
|
-e "s|@@XBPS_INSTALL_ETCDIR@@|$(ETCDIR)|g" \
|
|
|
|
-e "s|@@XBPS_INSTALL_SHAREDIR@@|$(SHAREDIR)|g" \
|
|
|
|
-e "s|@@XBPS_INSTALL_SBINDIR@@|$(SBINDIR)|g" \
|
2010-04-26 12:15:49 +00:00
|
|
|
-e "s|@@XBPS_INSTALL_LIBEXECDIR@@|$(LIBEXECDIR)|g" \
|
2010-01-16 01:11:44 +00:00
|
|
|
$$bin.sh.in > $$bin; \
|
|
|
|
done
|
|
|
|
for dir in $(SUBDIRS); do \
|
|
|
|
$(MAKE) -C $$dir || exit 1; \
|
2009-10-18 09:17:26 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
2010-01-16 01:11:44 +00:00
|
|
|
-rm -f $(BINS)
|
|
|
|
for dir in $(SUBDIRS); do \
|
2009-11-22 07:31:44 +00:00
|
|
|
$(MAKE) -C $$dir clean || exit 1; \
|
2009-10-18 09:17:26 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
.PHONY: install
|
|
|
|
install: all
|
|
|
|
install -d $(SBINDIR)
|
2010-01-16 01:11:44 +00:00
|
|
|
for bin in $(BINS); do \
|
|
|
|
install -m 755 $$bin $(SBINDIR); \
|
|
|
|
done
|
|
|
|
for dir in $(SUBDIRS); do \
|
2009-11-22 07:31:44 +00:00
|
|
|
$(MAKE) -C $$dir install || exit 1; \
|
2009-10-18 09:17:26 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
.PHONY: uninstall
|
|
|
|
uninstall:
|
2010-01-16 01:11:44 +00:00
|
|
|
for bin in $(BINS); do \
|
|
|
|
rm -f $(SBINDIR)/$$bin; \
|
|
|
|
done
|
|
|
|
for dir in $(SUBDIRS); do \
|
2009-11-22 07:31:44 +00:00
|
|
|
$(MAKE) -C $$dir uninstall || exit 1; \
|
2009-10-18 09:17:26 +00:00
|
|
|
done
|