summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 10 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 9662463..0b7b8f3 100644
--- a/Makefile
+++ b/Makefile
@@ -42,7 +42,6 @@ commit : distclean
%/Makefile.in : Makefile.in %/; cp $< $@
distclean-mods = $(addprefix distclean-,$(mods))
-#.PHONY : distclean $(distclean-mods)
distclean : $(distclean-mods)
distclean-% : % %/
$(RM) -r $<-build/
@@ -56,11 +55,16 @@ complete-% : %/
find $< -type d -exec cp Makefile.in '{}' \;
%-build : %/; $(MKDIR) $@
-%-build/Makefile : %-build complete-%
- cd $<; ../$(patsubst %-build,%/,$<)/configure $(CONFIG)
+%-build/Makefile : Makefiles-% ; :
+Makefiles-% : %-build complete-%
+ if [ ! -e "$</Makefile" ]; then \
+ cd $<; \
+ ../$(patsubst %-build,%/,$<)/configure $(CONFIG); \
+ fi
$(MAKE) -C $< Makefiles
-build-% : %-build %-build/Makefile; $(MAKE) -C $<
-install-% : %-build %-build/Makefile; $(MAKE) -C $< install
-clean-% : %-build %-build/Makefile; $(MAKE) -C $< clean
+build-% : %-build %-build/Makefile; $(MAKE) -C $<
+install-% : %-build %-build/Makefile; $(MAKE) -C $< install
+uninstall-% : %-build %-build/Makefile; $(MAKE) -C $< uninstall
+clean-% : %-build %-build/Makefile; $(MAKE) -C $< clean