diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-06-01 16:09:26 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-06-01 16:09:26 -0400 |
commit | a83e19dbaf62bcb33fb74f7e9c8a1fbce2c2af8f (patch) | |
tree | ecf736dfe9615a3b5192b98ec38891347bd5c456 | |
parent | 0cf26b9dfdc5c3f84856d1d9bd3e69ea2e410192 (diff) |
tidy
-rw-r--r-- | am-pat-rules.mk | 11 | ||||
-rw-r--r-- | am-tools.mk | 6 | ||||
-rw-r--r-- | build-aux/Makefile.each.tail/20-systemd.mk | 14 | ||||
-rw-r--r-- | build-aux/Makefile.once.head/20-systemd.mk | 10 | ||||
-rw-r--r-- | config.mk.in | 2 | ||||
-rw-r--r-- | src/libbasic/Makefile | 8 |
6 files changed, 29 insertions, 22 deletions
diff --git a/am-pat-rules.mk b/am-pat-rules.mk deleted file mode 100644 index 14ec302ae4..0000000000 --- a/am-pat-rules.mk +++ /dev/null @@ -1,11 +0,0 @@ -$(outdir)/%.o: $(srcdir)/%.c | $(outdir)/.deps - $(AM_V_CC)$(COMPILE) -c -o $@ $< - -$(outdir)/%.lo: $(srcdir)/%.c | $(outdir)/.deps - $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< - -$(outdir)/.deps: - $(AM_V_at)$(MKDIR_P) $@ - -$(outdir)/%.la: - $(AM_V_CCLD)$(LINK) $(filter-out .var%,$^) diff --git a/am-tools.mk b/am-tools.mk deleted file mode 100644 index 35fe16482b..0000000000 --- a/am-tools.mk +++ /dev/null @@ -1,6 +0,0 @@ -CCLD = $(CC) -AM_CPPFLAGS += -MT $@ -MD -MP -MF $(@D)/$(DEPDIR)/$(basename $(@F)).P$(patsubst .%,%,$(suffix $(@F))) - -COMPILE = $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(ALL_LIBTOOLFLAGS) --mode=compile $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(ALL_LIBTOOLFLAGS) --mode=link $(CCLD) $(ALL_CFLAGS) $(ALL_LDFLAGS) -o $@ diff --git a/build-aux/Makefile.each.tail/20-systemd.mk b/build-aux/Makefile.each.tail/20-systemd.mk index 89a87397c5..8f2f612273 100644 --- a/build-aux/Makefile.each.tail/20-systemd.mk +++ b/build-aux/Makefile.each.tail/20-systemd.mk @@ -1,3 +1,15 @@ -include $(outdir)/$(DEPDIR)/*.P* + std.clean_files += *.o *.lo .deps/ .libs/ -include $(topsrcdir)/am-pat-rules.mk + +$(outdir)/%.o: $(srcdir)/%.c | $(outdir)/.deps + $(AM_V_CC)$(COMPILE) -c -o $@ $< + +$(outdir)/%.lo: $(srcdir)/%.c | $(outdir)/.deps + $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< + +$(outdir)/.deps: + $(AM_V_at)$(MKDIR_P) $@ + +$(outdir)/%.la: + $(AM_V_CCLD)$(LINK) $(filter-out .var%,$^) diff --git a/build-aux/Makefile.once.head/20-systemd.mk b/build-aux/Makefile.once.head/20-systemd.mk index 4728cc6bd2..4fd092c3b4 100644 --- a/build-aux/Makefile.once.head/20-systemd.mk +++ b/build-aux/Makefile.once.head/20-systemd.mk @@ -30,6 +30,16 @@ export GCC_COLORS SUBDIRS = . po +OUR_CPPFLAGS += -MT $@ -MD -MP -MF $(@D)/$(DEPDIR)/$(basename $(@F)).P$(patsubst .%,%,$(suffix $(@F))) + +ALL_CFLAGS = $(OUR_CFLAGS) $(AM_CFLAGS/$(@D)) $(CFLAGS) +ALL_CPPFLAGS = $(OUR_CPPFLAGS) $(AM_CPPFLAGS/$(@D)) $(CPPFLAGS) +ALL_LDFLAGS = $(OUR_LDFLAGS) $(AM_LDFLAGS/$(@D)) $(LDFLAGS) + +COMPILE = $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(ALL_LIBTOOLFLAGS) --mode=compile $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(ALL_LIBTOOLFLAGS) --mode=link $(CCLD) $(ALL_CFLAGS) $(ALL_LDFLAGS) -o $@ + # remove targets if the command fails .DELETE_ON_ERROR: diff --git a/config.mk.in b/config.mk.in index 6b25f373a8..4f19139e75 100644 --- a/config.mk.in +++ b/config.mk.in @@ -33,6 +33,8 @@ topsrcdir = $(if $(value am_path),$(call am_path,$(abs_topsrcdir)),$(abs_topsrcd include $(topsrcdir)/gnustandards.mk include $(topsrcdir)/autoconf.mk +CCLD = $(CC) + OUR_CPPFLAGS = @OUR_CPPFLAGS@ OUR_CFLAGS = @OUR_CFLAGS@ OUR_LDFLAGS = @OUR_LDFLAGS@ diff --git a/src/libbasic/Makefile b/src/libbasic/Makefile index 66941a468f..264b4298bc 100644 --- a/src/libbasic/Makefile +++ b/src/libbasic/Makefile @@ -234,21 +234,21 @@ $(outdir)/cap-list.lo: $(outdir)/cap-from-name.h $(outdir)/cap-to-name.h $(outdir)/errno-list.lo: $(outdir)/errno-from-name.h $(outdir)/errno-to-name.h $(outdir)/errno-list.txt: - $(AM_V_GEN)$(CPP) $(AM_CPPFLAGS) -dM -include errno.h - </dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }' >$@ + $(AM_V_GEN)$(CPP) $(ALL_CPPFLAGS) -dM -include errno.h - </dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }' >$@ $(outdir)/errno-to-name.h: $(outdir)/errno-list.txt $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} !/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@ $(outdir)/af-list.txt: - $(AM_V_GEN)$(CPP) $(AM_CPPFLAGS) -dM -include sys/socket.h - </dev/null | grep -v AF_UNSPEC | grep -v AF_MAX | $(AWK) '/^#define[ \t]+AF_[^ \t]+[ \t]+PF_[^ \t]/ { print $$2; }' >$@ + $(AM_V_GEN)$(CPP) $(ALL_CPPFLAGS) -dM -include sys/socket.h - </dev/null | grep -v AF_UNSPEC | grep -v AF_MAX | $(AWK) '/^#define[ \t]+AF_[^ \t]+[ \t]+PF_[^ \t]/ { print $$2; }' >$@ $(outdir)/af-to-name.h: $(outdir)/af-list.txt $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const af_names[] = { "} !/AF_FILE/ && !/AF_ROUTE/ && !/AF_LOCAL/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@ $(outdir)/arphrd-list.txt: - $(AM_V_GEN)$(CPP) $(AM_CPPFLAGS) -dM -include net/if_arp.h - </dev/null | $(AWK) '/^#define[ \t]+ARPHRD_[^ \t]+[ \t]+[^ \t]/ { print $$2; }' | sed -e 's/ARPHRD_//' >$@ + $(AM_V_GEN)$(CPP) $(ALL_CPPFLAGS) -dM -include net/if_arp.h - </dev/null | $(AWK) '/^#define[ \t]+ARPHRD_[^ \t]+[ \t]+[^ \t]/ { print $$2; }' | sed -e 's/ARPHRD_//' >$@ $(outdir)/arphrd-to-name.h: $(outdir)/arphrd-list.txt $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const arphrd_names[] = { "} !/CISCO/ { printf "[ARPHRD_%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@ @@ -258,7 +258,7 @@ $(outdir)/arphrd-from-name.gperf: $(outdir)/arphrd-list.txt $(outdir)/cap-list.txt: - $(AM_V_GEN)$(CPP) $(AM_CPPFLAGS) -dM -include linux/capability.h -include missing.h - </dev/null | $(AWK) '/^#define[ \t]+CAP_[A-Z_]+[ \t]+/ { print $$2; }' | grep -v CAP_LAST_CAP >$@ + $(AM_V_GEN)$(CPP) $(ALL_CPPFLAGS) -dM -include linux/capability.h -include missing.h - </dev/null | $(AWK) '/^#define[ \t]+CAP_[A-Z_]+[ \t]+/ { print $$2; }' | grep -v CAP_LAST_CAP >$@ $(outdir)/cap-to-name.h: $(outdir)/cap-list.txt $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const capability_names[] = { "} { printf "[%s] = \"%s\",\n", $$1, tolower($$1) } END{print "};"}' <$< >$@ |