1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-16 23:45:30 +00:00

Implicit recursiveness and clean rule

All objects defining $(OBJS) will get them and *.a deleted during
make clean.

The all, clean and install rules now implicitly imply their -recursive
counterparts - those will just do nothing in case of $(SUBDIRS) not
defined, so that's ok.
This commit is contained in:
Petr Baudis 2005-09-15 23:28:56 +02:00
parent 6aea3df7ac
commit 833770a5f7
10 changed files with 20 additions and 27 deletions

View File

@ -8,11 +8,7 @@ path_to_top = ..
SUBDIRS = doc po src
all: all-recursive
clean: clean-recursive
clean:
rm -rf features.log
install: install-recursive
-include Makefile.lib

View File

@ -103,3 +103,11 @@ LIBS = @LIBS@
INCLUDES = -I$(top_builddir) -I$(top_srcdir)/src
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS)
### This is here because Makefile.config is usually the first thing
### we get and sometimes the all rule can be implicit, yet we want
### it always as the default one. So this should make sure it always
### comes first.
all:

View File

@ -58,6 +58,11 @@ endif
%.a:
$(call cmd,archive)
ifdef $(OBJS)
clean:
rm -f $(OBJS) *.a
endif
# Recursion:
@ -68,5 +73,9 @@ all-recursive install-recursive clean-recursive:
$(call ncmd,recmake) || exit 1; \
done
all: all-recursive
install: install-recursive
clean: clean-recursive
# vim:syntax=make

3
src/cache/Makefile vendored
View File

@ -5,7 +5,4 @@ OBJS = cache.o dialogs.o
all: libcache.a
libcache.a: $(OBJS)
clean:
rm -f *.o *.a
-include ../../Makefile.lib

View File

@ -5,7 +5,4 @@ OBJS = cmdline.o conf.o dialogs.o home.o kbdbind.o options.o opttypes.o timer.o
all: libconfig.a
libconfig.a: $(OBJS)
clean:
rm -f *.o *.a
-include ../../Makefile.lib

View File

@ -2,13 +2,11 @@
INCLUDES += $(SPIDERMONKEY_CFLAGS)
SUBDIRS = spidermonkey
SM_OBJS = document.o form.o location.o navigator.o unibar.o window.o
OBJS = ecmascript.o spidermonkey.o $(foreach obj,$(SM_OBJS),spidermonkey/$(obj))
all: all-recursive libecmascript.a
all: libecmascript.a
libecmascript.a: $(OBJS)
clean:
rm -f *.o *.a
-include ../../Makefile.lib

View File

@ -6,7 +6,4 @@ OBJS = document.o form.o location.o navigator.o unibar.o window.o
all: $(OBJS)
clean:
rm -f *.o *.a
-include ../../../Makefile.lib

View File

@ -5,7 +5,4 @@ OBJS = formhist.o dialogs.o
all: libformhist.a
libformhist.a: $(OBJS)
clean:
rm -f *.o *.a
-include ../../Makefile.lib

View File

@ -5,7 +5,4 @@ OBJS = globhist.o dialogs.o
all: libglobhist.a
libglobhist.a: $(OBJS)
clean:
rm -f *.o *.a
-include ../../Makefile.lib

View File

@ -5,7 +5,4 @@ OBJS = download.o history.o location.o session.o task.o
all: libsession.a
libsession.a: $(OBJS)
clean:
rm -f *.o *.a
-include ../../Makefile.lib