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