Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add $ make install, so generation, and format README for GitHub #16

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

alichtman
Copy link

@alichtman alichtman commented Sep 6, 2023

Follow up on #15

@andikleen
Copy link
Owner

Thanks. prefix should also be used for the manual page install, not just bindir Then everything can be moved with prefix.

@alichtman alichtman changed the title Add $ make install, clean up generated files on macOS, and format README for GitHub Add $ make install, so generation, and format README for GitHub Sep 16, 2023
```
lz4json on  master [!] via 💎 v2.5.1 took 33ms
04:29:42 AM ➜ make
cc -g -O2 -Wall    lz4jsoncat.c  -I/usr/local/Cellar/lz4/1.9.4/include -L/usr/local/Cellar/lz4/1.9.4/lib -llz4 -o lz4jsoncat
cc -g -O2 -Wall -fPIC -shared -g -o liblz4json.so lz4jsoncat.c -I/usr/local/Cellar/lz4/1.9.4/include -L/usr/local/Cellar/lz4/1.9.4/lib -llz4

lz4json on  master [!?] via 💎 v2.5.1 took 907ms
04:29:48 AM ➜ nm -g -C --defined-only liblz4json.so
0000000000003b80 T _decompress_jsonlz4_file
0000000000003d40 T _main
```
@alichtman alichtman changed the title Add $ make install, so generation, and format README for GitHub WIP: Add $ make install, so generation, and format README for GitHub Sep 16, 2023
@alichtman
Copy link
Author

A few more changes are needed to get the so file into a usable state, but I won't have time to write it tonight.

@alichtman alichtman changed the title WIP: Add $ make install, so generation, and format README for GitHub Add $ make install, so generation, and format README for GitHub Sep 17, 2023
@alichtman
Copy link
Author

alichtman commented Sep 17, 2023

I ended up implementing what I needed this library for in Python instead of using the .so I was generating.

If you'd like to merge this, please go ahead. I likely won't be working on it any further.

From the tip of this branch:

# Testing lz4jsoncat works as expected

lz4json on  master [$] via 💎 v2.5.1 took 147ms 
11:22:58 PM ➜ make clean && make lz4jsoncat && ./lz4jsoncat '/Users/alichtman/Library/Application Support/Firefox/Profiles/gp1611vt.default-1524903360130/sessionstore-backups/recovery.jsonlz4' | head -c 200
cc -g -O2 -Wall    lz4jsoncat.c  -I/usr/local/Cellar/lz4/1.9.4/include -L/usr/local/Cellar/lz4/1.9.4/lib -llz4 -o lz4jsoncat
{"version":["sessionrestore",1],"windows":[{"tabs":[{"entries":[{"url":"https://www.insta360.com/support/supportcourse?post_id=17067&locale=en-us","title":"ReFrame Plugin Tutorial","cacheKey":0,"ID":2


# Testing `make all` works as expected

lz4json on  master [$?] via 💎 v2.5.1 
11:23:41 PM ✗ make clean && make all                                                                                                                                                                           
cc -g -O2 -Wall    lz4jsoncat.c  -I/usr/local/Cellar/lz4/1.9.4/include -L/usr/local/Cellar/lz4/1.9.4/lib -llz4 -o lz4jsoncat
cc -g -O2 -Wall -fPIC -shared -g -o liblz4json.so lz4jsoncat.c -I/usr/local/Cellar/lz4/1.9.4/include -L/usr/local/Cellar/lz4/1.9.4/lib -llz4

lz4json on  master [$?] via 💎 v2.5.1 took 1s 
11:23:49 PM ➜ ll                                                                                                                                 
drwxr-xr-x alichtman staff 512 B  Sat Sep 16 23:22:58 2023  .git
drwxr-xr-x alichtman staff  96 B  Sat Sep 16 23:23:49 2023  liblz4json.so.dSYM
drwxr-xr-x alichtman staff  96 B  Sat Sep 16 23:23:49 2023  lz4jsoncat.dSYM
.rw-r--r-- alichtman staff 6.0 KB Sat Sep 16 04:23:45 2023  .DS_Store
.rwxr-xr-x alichtman staff  34 KB Sat Sep 16 23:23:49 2023  liblz4json.so
.rwxr-xr-x alichtman staff  34 KB Sat Sep 16 23:23:49 2023  lz4jsoncat
.rw-r--r-- alichtman staff 387 B  Sun Aug 27 21:30:37 2023  lz4jsoncat.1
.rw-r--r-- alichtman staff 2.8 KB Sat Sep 16 23:22:58 2023  lz4jsoncat.c
.rw-r--r-- alichtman staff 886 B  Sat Sep 16 04:29:39 2023  Makefile
.rw-r--r-- alichtman staff 1.1 KB Sat Sep 16 01:37:42 2023  README.md


# make install / uninstall works correctly

lz4json on  master [$?] via 💎 v2.5.1 took 49ms 
11:23:52 PM ➜ sudo make install                                                                                                                                                                                    
mkdir -p /usr/local/bin/ /usr/local/man/
cp lz4jsoncat.1 /usr/local/man/
cp lz4jsoncat /usr/local/bin/
mv liblz4json.so /usr/local/lib/


lz4json on  master [$?] via 💎 v2.5.1 took 112ms 
11:24:33 PM ➜ sudo make uninstall   
rm /usr/local/bin/lz4jsoncat /usr/local/man/lz4jsoncat.1 /usr/local/lib/liblz4json.so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants