Re: [hackers] [slstatus] Simplify Makefile

2017-09-18 Thread Quentin Rameau
> Dear Laslo, dear Quentin,

Hi Aaron,

> > why not just the following? Thanks for bringing the topic up; for
> > some reason I had in mind that it was necessary to list the
> > dependencies explicitly.  
> 
> I will merge this patch as it has the required dependency on
> slstatus.o and it is generally simpler.
> Thank you very much!

I think you missed some of the points of the patch...

My patched fixed the dependencies on the slstatus object,
there's no need to have all objects depend on util.h,
there's no need to override the inference rule .o:,
the dist target is missing some files.

It's not about apparent “simplicity”, it's about correctness.
Do the right thing!

-- Quentin



Re: [hackers] [slstatus] Simplify Makefile

2017-09-18 Thread Aaron Marcher

Dear Laslo, dear Quentin,


why not just the following? Thanks for bringing the topic up; for some
reason I had in mind that it was necessary to list the dependencies
explicitly.


I will merge this patch as it has the required dependency on slstatus.o 
and it is generally simpler.

Thank you very much!

Regards,
Aaron

--
Web: https://drkhsh.at/ or http://drkhsh5rv6pnahas.onion/
Gopher: gopher://drkhsh.at or gopher://drkhsh5rv6pnahas.onion
GPG: 0x09e71697435bf54b
Fingerprint: 57D2 5F2C 9402 A6BD FEF9 B3B6 09E7 1697 435B F54B



Re: [hackers] [slstatus] Simplify Makefile

2017-09-17 Thread Laslo Hunhold
On Sun, 17 Sep 2017 23:02:43 +0200
Quentin Rameau  wrote:

Dear Quentin,

> 

why not just the following? Thanks for bringing the topic up; for some
reason I had in mind that it was necessary to list the dependencies
explicitly.

With best regards

Laslo Hunhold

-- 
Laslo Hunhold 
>From f645ddc6b207b578e4782ff9f854268fdd81b75d Mon Sep 17 00:00:00 2001
From: Laslo Hunhold 
Date: Sun, 17 Sep 2017 23:48:11 +0200
Subject: [PATCH] Simplify Makefile

---
 Makefile | 21 +
 1 file changed, 1 insertion(+), 20 deletions(-)

diff --git a/Makefile b/Makefile
index d690612..14855ac 100644
--- a/Makefile
+++ b/Makefile
@@ -31,26 +31,7 @@ all: slstatus
 
 slstatus: slstatus.o $(COM:=.o) $(REQ:=.o)
 slstatus.o: slstatus.c slstatus.h $(HDR) $(REQ:=.h)
-
-battery.o: battery.c config.mk $(HDR) $(REQ:=.h)
-cpu.o: cpu.c config.mk $(HDR) $(REQ:=.h)
-datetime.o: datetime.c config.mk $(HDR) $(REQ:=.h)
-disk.o: disk.c config.mk $(HDR) $(REQ:=.h)
-entropy.o: entropy.c config.mk $(HDR) $(REQ:=.h)
-hostname.o: hostname.c config.mk $(HDR) $(REQ:=.h)
-ip.o: ip.c config.mk $(HDR) $(REQ:=.h)
-kernel_release.o: kernel_release.c config.mk $(HDR) $(REQ:=.h)
-keyboard_indicators.o: keyboard_indicators.c config.mk $(HDR) $(REQ:=.h)
-load_avg.o: load_avg.c config.mk $(HDR) $(REQ:=.h)
-num_files.o: num_files.c config.mk $(HDR) $(REQ:=.h)
-ram.o: ram.c config.mk $(HDR) $(REQ:=.h)
-run_command.o: run_command.c config.mk $(HDR) $(REQ:=.h)
-swap.o: swap.c config.mk $(HDR) $(REQ:=.h)
-temperature.o: temperature.c config.mk $(HDR) $(REQ:=.h)
-uptime.o: uptime.c config.mk $(HDR) $(REQ:=.h)
-user.o: user.c config.mk $(HDR) $(REQ:=.h)
-volume.o: volume.c config.mk $(HDR) $(REQ:=.h)
-wifi.o: wifi.c config.mk $(HDR) $(REQ:=.h)
+$(COM:=.o): config.mk $(HDR) $(REQ:=.h)
 
 .o:
 	$(CC) -o $@ $(LDFLAGS) $< $(COM:=.o) $(REQ:=.o) $(LDLIBS)
-- 
2.14.1



Re: [hackers] [slstatus] Simplify Makefile

2017-09-17 Thread Quentin Rameau
On Sun, 17 Sep 2017 22:29:42 +0100
Matthew Parnell  wrote:

> Hi Quentin,

Hi Matthew,

> I like this simplification a lot, I believe it covers the dependency
> resolution that Laslo pointed out earlier today; and yet cleans things
> up nicely.
> I'd very much like to see this merged.

I've just sent an updated patch to cover more precisely which object
depends on which header, should be better now.

Thanks!

-- Quentin



Re: [hackers] [slstatus] Simplify Makefile

2017-09-17 Thread Matthew Parnell
Hi Quentin,

I like this simplification a lot, I believe it covers the dependency
resolution that Laslo pointed out earlier today; and yet cleans things
up nicely.
I'd very much like to see this merged.

Cheers,

-- 
Matthew Parnell
m...@parnmatt.co.uk