[hackers] [slstatus] Move components into dedicated subdirectory || Laslo Hunhold

From: <git_AT_suckless.org>
Date: Sun, 24 Sep 2017 17:21:29 +0200 (CEST)

commit 7246dc4381c6c95454672a5c1aff65a02d6d3747
Author: Laslo Hunhold <dev_AT_frign.de>
AuthorDate: Sun Sep 24 15:33:01 2017 +0200
Commit: Aaron Marcher <me_AT_drkhsh.at>
CommitDate: Sun Sep 24 17:20:27 2017 +0200

    Move components into dedicated subdirectory
    
    This brings us a lot more tidiness.

diff --git a/Makefile b/Makefile
index 1a90431..00c35c4 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -6,25 +6,25 @@ include config.mk
 
 REQ = util
 COM =\
- battery\
- cpu\
- datetime\
- disk\
- entropy\
- hostname\
- ip\
- kernel_release\
- keyboard_indicators\
- load_avg\
- num_files\
- ram\
- run_command\
- swap\
- temperature\
- uptime\
- user\
- volume\
- wifi
+ components/battery\
+ components/cpu\
+ components/datetime\
+ components/disk\
+ components/entropy\
+ components/hostname\
+ components/ip\
+ components/kernel_release\
+ components/keyboard_indicators\
+ components/load_avg\
+ components/num_files\
+ components/ram\
+ components/run_command\
+ components/swap\
+ components/temperature\
+ components/uptime\
+ components/user\
+ components/volume\
+ components/wifi
 
 all: slstatus
 
_AT_@ -39,14 +39,14 @@ config.h:
         $(CC) -o $_AT_ $(LDFLAGS) $< $(COM:=.o) $(REQ:=.o) $(LDLIBS)
 
 .c.o:
- $(CC) -c $(CPPFLAGS) $(CFLAGS) $<
+ $(CC) -o $_AT_ -c $(CPPFLAGS) $(CFLAGS) $<
 
 clean:
         rm -f slstatus slstatus.o $(COM:=.o) $(REQ:=.o)
 
 dist:
         rm -rf "slstatus-$(VERSION)"
- mkdir -p "slstatus-$(VERSION)"
+ mkdir -p "slstatus-$(VERSION)/components"
         cp -R LICENSE Makefile README config.mk config.def.h \
               arg.h slstatus.c $(COM:=.c) $(REQ:=.c) $(REQ:=.h) \
               slstatus.1 "slstatus-$(VERSION)"
diff --git a/battery.c b/components/battery.c
similarity index 98%
rename from battery.c
rename to components/battery.c
index 0cea55c..f384aab 100644
--- a/battery.c
+++ b/components/battery.c
_AT_@ -3,7 +3,7 @@
 #include <stdio.h>
 #include <string.h>
 
-#include "util.h"
+#include "../util.h"
 
 const char *
 battery_perc(const char *bat)
diff --git a/cpu.c b/components/cpu.c
similarity index 98%
rename from cpu.c
rename to components/cpu.c
index b4b7ef1..4a4a80b 100644
--- a/cpu.c
+++ b/components/cpu.c
_AT_@ -2,7 +2,7 @@
 #include <stdio.h>
 #include <string.h>
 
-#include "util.h"
+#include "../util.h"
 
 const char *
 cpu_freq(void)
diff --git a/datetime.c b/components/datetime.c
similarity index 91%
rename from datetime.c
rename to components/datetime.c
index 98510e3..0816923 100644
--- a/datetime.c
+++ b/components/datetime.c
_AT_@ -1,7 +1,7 @@
 /* See LICENSE file for copyright and license details. */
 #include <time.h>
 
-#include "util.h"
+#include "../util.h"
 
 const char *
 datetime(const char *fmt)
diff --git a/disk.c b/components/disk.c
similarity index 98%
rename from disk.c
rename to components/disk.c
index 51cdaaa..90a8e0b 100644
--- a/disk.c
+++ b/components/disk.c
_AT_@ -3,7 +3,7 @@
 #include <stdio.h>
 #include <sys/statvfs.h>
 
-#include "util.h"
+#include "../util.h"
 
 const char *
 disk_free(const char *mnt)
diff --git a/entropy.c b/components/entropy.c
similarity index 91%
rename from entropy.c
rename to components/entropy.c
index 211022a..0d3564e 100644
--- a/entropy.c
+++ b/components/entropy.c
_AT_@ -1,7 +1,7 @@
 /* See LICENSE file for copyright and license details. */
 #include <stdio.h>
 
-#include "util.h"
+#include "../util.h"
 
 const char *
 entropy(void)
diff --git a/hostname.c b/components/hostname.c
similarity index 91%
rename from hostname.c
rename to components/hostname.c
index 0ad1f3b..aed77a6 100644
--- a/hostname.c
+++ b/components/hostname.c
_AT_@ -2,7 +2,7 @@
 #include <err.h>
 #include <unistd.h>
 
-#include "util.h"
+#include "../util.h"
 
 const char *
 hostname(void)
diff --git a/ip.c b/components/ip.c
similarity index 98%
rename from ip.c
rename to components/ip.c
index a042c79..f98b2ed 100644
--- a/ip.c
+++ b/components/ip.c
_AT_@ -5,7 +5,7 @@
 #include <stdio.h>
 #include <string.h>
 
-#include "util.h"
+#include "../util.h"
 
 const char *
 ipv4(const char *iface)
diff --git a/kernel_release.c b/components/kernel_release.c
similarity index 92%
rename from kernel_release.c
rename to components/kernel_release.c
index abe0acd..f539b6a 100644
--- a/kernel_release.c
+++ b/components/kernel_release.c
_AT_@ -2,7 +2,7 @@
 #include <sys/utsname.h>
 #include <stdio.h>
 
-#include "util.h"
+#include "../util.h"
 
 const char *
 kernel_release(void)
diff --git a/keyboard_indicators.c b/components/keyboard_indicators.c
similarity index 95%
rename from keyboard_indicators.c
rename to components/keyboard_indicators.c
index 13e8648..b7713b6 100644
--- a/keyboard_indicators.c
+++ b/components/keyboard_indicators.c
_AT_@ -2,7 +2,7 @@
 #include <err.h>
 #include <X11/Xlib.h>
 
-#include "util.h"
+#include "../util.h"
 
 const char *
 keyboard_indicators(void)
diff --git a/load_avg.c b/components/load_avg.c
similarity index 93%
rename from load_avg.c
rename to components/load_avg.c
index ad22ae4..d6f6bd4 100644
--- a/load_avg.c
+++ b/components/load_avg.c
_AT_@ -2,7 +2,7 @@
 #include <err.h>
 #include <stdlib.h>
 
-#include "util.h"
+#include "../util.h"
 
 const char *
 load_avg(const char *fmt)
diff --git a/num_files.c b/components/num_files.c
similarity index 96%
rename from num_files.c
rename to components/num_files.c
index 778b8b9..a8a3894 100644
--- a/num_files.c
+++ b/components/num_files.c
_AT_@ -4,7 +4,7 @@
 #include <stdio.h>
 #include <string.h>
 
-#include "util.h"
+#include "../util.h"
 
 const char *
 num_files(const char *dir)
diff --git a/ram.c b/components/ram.c
similarity index 98%
rename from ram.c
rename to components/ram.c
index def27aa..f696039 100644
--- a/ram.c
+++ b/components/ram.c
_AT_@ -1,7 +1,7 @@
 /* See LICENSE file for copyright and license details. */
 #include <stdio.h>
 
-#include "util.h"
+#include "../util.h"
 
 const char *
 ram_free(void)
diff --git a/run_command.c b/components/run_command.c
similarity index 95%
rename from run_command.c
rename to components/run_command.c
index 7aa6c4f..99f54ea 100644
--- a/run_command.c
+++ b/components/run_command.c
_AT_@ -3,7 +3,7 @@
 #include <stdio.h>
 #include <string.h>
 
-#include "util.h"
+#include "../util.h"
 
 const char *
 run_command(const char *cmd)
diff --git a/swap.c b/components/swap.c
similarity index 99%
rename from swap.c
rename to components/swap.c
index 93111c5..e4eec64 100644
--- a/swap.c
+++ b/components/swap.c
_AT_@ -3,7 +3,7 @@
 #include <stdio.h>
 #include <string.h>
 
-#include "util.h"
+#include "../util.h"
 
 const char *
 swap_free(void)
diff --git a/temperature.c b/components/temperature.c
similarity index 91%
rename from temperature.c
rename to components/temperature.c
index 2c78ced..bbd4daf 100644
--- a/temperature.c
+++ b/components/temperature.c
_AT_@ -1,7 +1,7 @@
 /* See LICENSE file for copyright and license details. */
 #include <stdio.h>
 
-#include "util.h"
+#include "../util.h"
 
 const char *
 temp(const char *file)
diff --git a/uptime.c b/components/uptime.c
similarity index 92%
rename from uptime.c
rename to components/uptime.c
index 827381b..b455182 100644
--- a/uptime.c
+++ b/components/uptime.c
_AT_@ -1,7 +1,7 @@
 /* See LICENSE file for copyright and license details. */
 #include <sys/sysinfo.h>
 
-#include "util.h"
+#include "../util.h"
 
 const char *
 uptime(void)
diff --git a/user.c b/components/user.c
similarity index 95%
rename from user.c
rename to components/user.c
index 851acb4..8dcb86a 100644
--- a/user.c
+++ b/components/user.c
_AT_@ -4,7 +4,7 @@
 #include <sys/types.h>
 #include <unistd.h>
 
-#include "util.h"
+#include "../util.h"
 
 const char *
 gid(void)
diff --git a/volume.c b/components/volume.c
similarity index 97%
rename from volume.c
rename to components/volume.c
index 0074754..f5aa18d 100644
--- a/volume.c
+++ b/components/volume.c
_AT_@ -7,7 +7,7 @@
 #include <string.h>
 #include <unistd.h>
 
-#include "util.h"
+#include "../util.h"
 
 const char *
 vol_perc(const char *card)
diff --git a/wifi.c b/components/wifi.c
similarity index 98%
rename from wifi.c
rename to components/wifi.c
index 41ae4c6..30b57ab 100644
--- a/wifi.c
+++ b/components/wifi.c
_AT_@ -9,7 +9,7 @@
 #include <sys/ioctl.h>
 #include <unistd.h>
 
-#include "util.h"
+#include "../util.h"
 
 const char *
 wifi_perc(const char *iface)
Received on Sun Sep 24 2017 - 17:21:29 CEST

This archive was generated by hypermail 2.3.0 : Sun Sep 24 2017 - 17:24:23 CEST