Skip to content

Commit 3cd9766

Browse files
committed
Fix rules to allow for local cleanup in sub-directories
1 parent 6e97dc1 commit 3cd9766

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,11 @@ install-headers: install-include-recursive
7575

7676
install-man: all install-man-recursive
7777

78-
clean: clean-recursive
78+
clean:: clean-recursive
7979
rm -rf .deps includepath CFILES
8080

81+
distclean:: distclean-recursive
82+
8183
bakclean: bakclean-recursive
8284

8385
checkclean: checkclean-recursive
@@ -155,7 +157,7 @@ bindistdir: $(BINDISTFILES)
155157
|| exit 1; \
156158
done
157159

158-
all-recursive clean-recursive bakclean-recursive \
160+
all-recursive clean-recursive distclean-recursive bakclean-recursive \
159161
install-recursive uninstall-recursive install-lib-recursive \
160162
install-include-recursive install-man-recursive uninstall-lib-recursive \
161163
uninstall-include-recursive uninstall-man-recursive:

rules

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ include $(srcdir)/BINFILES
44
include $(srcdir)/SRCFILES
55
include $(srcdir)/EXTRAFILES
66
include $(srcdir)/MISCFILES
7-
-include $(srcdir)/RPCSVCCFILES
8-
-include $(srcdir)/RPCGENCFILES
9-
-include $(srcdir)/RPCINFOCFILES
107

118
mkinstalldirs = $(top_srcdir)/mkinstalldirs
129
MOVEIFCHANGE = $(top_srcdir)/move-if-change
@@ -17,11 +14,13 @@ bakclean:
1714
rm -f *~ *# *.BAK *.bak
1815
rm -f *.orig *.rej
1916

20-
clean:
17+
clean::
2118
rm -f *.o lib*.a *.tmp
2219
rm -f core report nohup.out errlog
2320
rm -rf .deps
2421

22+
distclean:: clean
23+
2524
install: all-here install-include install-lib install-man \
2625
install-recursive
2726

sunrpc/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ endif
3434

3535
dont_install_libs = yes
3636
include $(top_srcdir)/rules $(top_srcdir)/phony
37+
include $(srcdir)/RPCSVCCFILES
38+
include $(srcdir)/RPCGENCFILES
39+
include $(srcdir)/RPCINFOCFILES
3740

3841
# FIXME: Tests still missing.
3942
TESTS = dummy

syscall/Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ include $(top_srcdir)/checkrules
3737
cflags = -O -Wall
3838
type =
3939

40-
# FIXME: adjust rules in toplevel to cleanup .stmp.pars, syscalls.stmp and other generated files
40+
distclean::
41+
$(RM) SRCFILES.traps syscalls.stmp .stmp.pars pars.c pars.h scan.c
42+
43+
clean::
44+
$(RM) gen-syscall
4145

4246
syscalls.stmp: gen-syscall0 syscalls.master
4347
echo "TRAPS=" > SRCFILES.traps

0 commit comments

Comments
 (0)