The documentation of gnu make recommends to have targets called
mostlyclean, clean, distclean and maintainer-clean while we have clean,
clean2, distclean and maintainer clean.
This patch adds mostlyclean and removes clean2. The former target
removes the executables and all object files, clean additionally
removes the whole build directory and distclean removes, on top of
that, all files created by autoconf. Finally, maintainer-clean removes
the tarball and the files created by doxygen and global.
tarball_delete := $(addprefix $(tarball_pfx)/, web .gitignore)
tarball := $(tarball_pfx).tar.bz2
tarball_delete := $(addprefix $(tarball_pfx)/, web .gitignore)
tarball := $(tarball_pfx).tar.bz2
-.PHONY: all clean clean2 distclean maintainer-clean install man tarball
+.PHONY: all mostlyclean clean distclean maintainer-clean install man tarball
all: $(prefixed_executables) $(man_pages)
man: $(man_pages)
tarball: $(tarball)
all: $(prefixed_executables) $(man_pages)
man: $(man_pages)
tarball: $(tarball)
@[ -z "$(Q)" ] || echo 'LD $@'
$(Q) $(CC) $^ -o $@ $(LDFLAGS)
@[ -z "$(Q)" ] || echo 'LD $@'
$(Q) $(CC) $^ -o $@ $(LDFLAGS)
-clean:
- @[ -z "$(Q)" ] || echo 'CLEAN'
+mostlyclean:
+ @[ -z "$(Q)" ] || echo 'MOSTLYCLEAN'
$(Q) rm -f para_*
$(Q) rm -rf $(object_dir)
$(Q) rm -f para_*
$(Q) rm -rf $(object_dir)
-
-clean2: clean
- @[ -z "$(Q)" ] || echo 'CLEAN2'
+clean: mostlyclean
+ @[ -z "$(Q)" ] || echo 'CLEAN'
-distclean: clean2 test-clean
@[ -z "$(Q)" ] || echo 'DISTCLEAN'
$(Q) rm -f Makefile autoscan.log config.status config.log
@[ -z "$(Q)" ] || echo 'DISTCLEAN'
$(Q) rm -f Makefile autoscan.log config.status config.log
- $(Q) rm -f GPATH GRTAGS GSYMS GTAGS
-
+ $(Q) rm -f config.h configure config.h.in
maintainer-clean: distclean
@[ -z "$(Q)" ] || echo 'MAINTAINER-CLEAN'
maintainer-clean: distclean
@[ -z "$(Q)" ] || echo 'MAINTAINER-CLEAN'
- $(Q) rm -f *.tar.bz2 config.h configure config.h.in
+ $(Q) rm -f *.tar.bz2
+ $(Q) rm -f GPATH GRTAGS GSYMS GTAGS
install: all man
$(MKDIR_P) $(bindir) $(mandir)
install: all man
$(MKDIR_P) $(bindir) $(mandir)
echo configuring...
./configure $@ > /dev/null
echo compiling...
echo configuring...
./configure $@ > /dev/null
echo compiling...
-make clean2 > /dev/null 2>&1
+make clean > /dev/null 2>&1