Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Get a devDuck
Rubber duck debugging has never been so cute! Get your favorite coding language devDuckBuy Now
Search - "makefile"
Month #1 at CS University. We write C on the terminal, with nano. No vi no ide no highlighting. Neither makefile is allowed. Professors don't know what git is.
I am pissed off.32
'Twas the night before deployment and all through Hipchat
Not an intern was stirring, or a CSM, at that,
The feature design was approved with care,
The business case and user feedback were there.
The sales team was home watching the game in their beds,
Making "Presidents Club" danced in their heads,
The CEO mused over valuation cap,
And how the competition could take a dirt nap.
When in pager duty there arose such a clatter
The night devs logged in to see what was the matter.
Away to the server logs they flew in a flash
To see what had made the primary DB crash.
The pristine backups in the freshly pushed cloud
Gave joy and relief to the now-anxious crowd.
When what, on the CDN status page should appear,
But holly-red downtime and a DDoS severe.
With little fanfare and at speeds none could detect,
In toddy-wreathed glow appeared the Senior Architect!
In mere milliseconds the commands they came,
Were whistled, and shouted, and called out by name:
"Now Traceroute, now Nmap, now Dig, now loopback Localhost!
On Makefile, on Linker, on Tar, on avocado toast!
To the bottom of the Btree, to the root CA,
Now compile! Compile! And restore away!!"
As JS frameworks of the day away fly ,
When the zeitgeist forgets them in the race to the sky,
So up to the network backbone they flew,
The Architect on her PDP-10, with her Dynabook too!
And then in a twinkling, the emergency team
Saw the DDoS reverse, and the bits surged downstream
Packets, like snowflakes, flashed before our wint'ry eyes,
At 1024 GB/s, a wonderland of surprise!
Her eyes, how they twinkled! Her shell scripts-- concise!
Her bytecode so polished it ran on any device!
Her soldering iron swung freely from her hip,
From a hot whiskey toddy she enjoyed a long sip.
She spoke not a word but went straight to her work,
And synced the prod DB where the tables went berserk.
And laying her spanner aside of her nose,
And giving a nod, to obscurity she rose!
She sprang to her PDP, to her mainboard gave a knock,
Rebooted the magnets and refreshed the clock.
She exclaimed as she vanished, giving us her last jabs,
"Remember to always use spaces, not tabs!"12
The goal of one of my CS assignments was to learn about makefile, and during the last minute - literally while I was waiting for the professor to come over - I was just making everything presentable and getting rid of noise. I figured putting rm -r *.* in clean would be a good way to get rid of all the debug output.
To be fair, my project folder was indeed pretty clean afterwards.7
Makefiles are SO much cooler than I thought before
$< = the first dependency file
$^ = all the dependency files
$@ = the build target
AND if I try to build something who's dependencies don't exist, it'll automatically try to build them!4
Short story for the one interessed in the image: when we change idea we change the whole idea. And it is likely to happen very often. Sometimes twice a day, every day, for a week.
I am hopeless:
I am an IT university student, i know how to program and how to search for a fucking manual, but i am dealing with eletronics and PCB...
I have to make the firmware for a board (atmel things) and it have to talk via spi with some other devices (it is slave of one, and master for all the others(i will use two spi channels)), this should be easy...
I am have no senior to ask to, all i have is google and i found problems in every thing i try to do, every - fucking - single - one!!!! I know that the solution is always of the "you have to plug it in" type, but
NEITHER GOOGLE IS BEING OF HELP!
Let me explain this morning pain:
i can't add libraries in atmel studio, something wrong with the asf wizard, i have only found a tutorial that says what buttons press to solve my problem... I DO NOT HAVE THIS BUTTONS!!!
And the library i wanted to add is the one to make the board talk with the computer on his COM port... (And have some debug message...)
And the wizard gives problem because i created the project using an online atmel tool...
YES, i tried to create a project with asf and then add the files given by the online tool.... THEY DO NOT COMPILE, I SHOULD HAVE TO MESS WITH A 400 LINES LONG MAKEFILE, that is anything but human readable...
I haven't even look for anything spi related this morning
I am even forced to use windows, because every question in the forums, or every noobbish tutorial is based on it...
And then i find the tutorial with the perfect title, holy shit this is the thing i truly need!!!!! It says how to open a file. And then stops. WHAT ABOUT THE THING YOU WERE TALKING ABOUT IN THE TITLE??????
This project is the upgrade of a glue-pump based on an atmega328 (arduino uno processor), that is currently being produced and sold by our "company" .... .... That is composed by me and the boss.
He is a very nice and and smart person, he tries to give me ideas for the solution, if i cannot find out how to do something we can even change a lot of specifics of the project (the image shows our idea-change) and every board has some weeks of mornings like the one described above (i work only in the morning).
I am learning a very lot of things...
But the fact that every thins i try fails is destroying me, what would you do in my place?
Ps. Lot lf love for the ones who made it until the end <36
DevRant says I need 10 points to make an avatar.
What if I have a makefile with a target avatar? Can't I
>> make avatar
I can't take a (C++) project seriously if it is using Visual Studio's build system instead of autotools, CMake or even just a Makefile.8
Are there more people here who use Makefiles as a façade for complicated commands? For example, 'make dev.up' executes a long docker-compose command and 'make dev.expose.secrets' activates ansible-vault with some variables. It makes doing stuff easier and makes it so that developers with less shell experience can quickly get going instead of having to use long boring commands.
Each time I try to look up what the actual purpose of a makefile is I get a long list of explanatioms talking about building C programs etc. But it never talks about using it to just put shell commands in one big file with subtargets 🤔
So, my question, any of you guys use a makefile to facilitate a facade too?3
Disadvantages of coding after midnight... Was modifying a makefile for an assignment when suddenly:
$ make clean
> rm -f com/package1/*.class
> rm -f com/package2/*.java
My kind of Makefile:
make it.run: docker-compose up
make it.stop: docker-compose down
make it.clear: docker logs cont_1
make it.test: npm run test
make it.deploy: ansible-playbook site.yml
Share your own useful terminal aliases here:
- grm=git rebase origin master
- gforbm=git fetch origin && git rebase origin master
- vm=vim Makefile
- idea=vim ~/repos/ideas/README.md (where I store all my programming ideas)15
tabs vs spaces
i hate it when i cant find where i used spaces instead of tabs. just a simple mistake and it doesnt work
me: *codes makefile in codenvy*
terminal: *** missing separator. Stop.
me: *rewrites code exactly the same way in Notepad++*
me: *copy paste code to codenvy*
terminal: *compiles whole project*
wow. just wow.7
When I first started reading about Angular 4 I must admit I was a bit excited. It seemed like it fit the company enterprise requirements. The improvements it offered on paper looked quite good for our use case. HOWEVER... After writing Angular 4 for two weeks I'm seriously doubting I made the right decision. Testing is a dependency hell and there are two ways to build and structure your application. The webpack way and the SystemJS way. The grunt way and the angular-cli way. For fuck sake Google. And the documentation is somewhat half supporting one thing, half supporting another. So when you're using angular-cli with webpack, you're pretty much screwed when we're talking about documentation. It has now taken me almost 50 hours to write a pretty basic Angular app, made it compliant with our staging environment and writing a Makefile for it, since I haven't been able to find any same way to provide custom arguments when building it with the angular-cli --aot option. So fuck you Google. Luckily I've found a way to modularize it so much that I'll be able to reuse the core in the future. So I guess I got that thing going for me, which is nice... -.-' *sigh*
This is embarrassing, but the first days of learning about AngularJS I had to implement functionality about a new component of the WebApp I was building.
I did a good templating, I build the component along with its controller and services, I verified there wasn’t any memory leak and that everything was in an isolated scope. Yet nothing at all appeared on the app. It took me more than 30 minutes until I realized...
I didn’t put the source code on the index.html file 😅
For people who know more about compiled languages such as C or Java... that’s like not putting your source code file in the makefile. 😅
I felt literally like the dumbest person in the planet at that moment. 😀🔫1
The most badass IDE out there IMO.
Because: valgrind, clang, GCC, gdb, autocomplete, runs faster than Sonic, custom makefile support.
Fuck Code::Blocks, this is da real shit!
Edit: Heard about it in a Valve presentation about programming on Linux, so far enjoying using it.3
Just found my first little game I wrote in c++ and opengl(like 5yrs ago). Need to rename over 300 file names, class names and for each class their members names and function names now because ewww how can you call vars in programming like that. Porting it to Linux now. Library linking is working yet. I remember how awful it was to do that shit in vs. In Linux its ez. Also wrote a makefile because vs always compiled my whole project every time I ran it (for whatever reason).
I think that's what I'm going to be doing as a side project this week.2
So for the past one month I'm working on an enhancement in a product coded in C++ and shell script, running on RHEL. After toiling away for almost 10 hours/day for a month, the enhacement is ready. Coded, tested, documented. Ready to ship.
The client is supposed to recieve the update as a drop. 1 day before the drop is scheduled to be released to Quality Control, I fire an overnight build on the build machine, update the change request ticket, update other related tickets, inform QC of the drop to be released tomorrow. On the D-day, I package the drop using the company's painfully arduous method. Everything is ready by the evening, and the drop is good to go.
At 7pm (one hour before the drop is to be released), Jack fucking Jack-o-lantern (one of the top most exec in the company) tells me that the default value of the parameter introduced in the enhancement, needs to be changed from 86400 to 1500. HALF AN HOUR BEFORE THE DROP IS TO BE RELAEASED!
Now here I am, changing the value in over 25 files, followed by firing an overnight build, followed by sanity testing, change specific testing, followed by drop packaging, followed by inform QC that the drop will be delayed.
All because fucking jack-o-lantern wanted to change the fucking default value.
GOOD FOR YOU FUCKING JACK.2
Started fixing one file in one repo, build, doesn't build, go into other repo fix just one file there, but first I need to make myself a toolchain, making of toolchain fails because it depends on some dirty fix in the file I was fixing, refactor and clean that to a proper state, fuck yeah toolchain builds, source toolchain run make now, breaks with undefined reference, no time to debug plus fuck this automake, remove it, make a makefile, builds fuck yeah, shit now unittest are failing because why not, refactored that makefile as well, everything compiles, automate the test fully so that they are ran on the target out of make just because I'm a nice guy, fuck yeah everything works, commit this repo, commit other repo, review time, one of the guys gave up, the other one did it properly, found some shit there, fix that, done, merge, triggers CI fucking pass
All of this was done in 3h, Talk about efficiency
I wanted that Makefile to avoid stripping binaries after building them, but there was no clear option for that. I only found this:
STRIP = strip
That tells where to find the executable that does the stripping. I changed it to a no-op executable, like "true".
So now I have
STRIP = true
to disable stripping.11
### Functions ###
range = $(if $(filter $1,$(lastword $3)),$3,$(call range,$1,$2,$3 $(words $3)))
make_range = $(foreach i,$(call range,$1),$(call range,$2))
equal = $(if $(filter-out $1,$2),,$1)
### Variables ###
limit := 101
numbers := $(wordlist 2,$(limit),$(call range,$(limit)))
threes := $(wordlist 2,$(limit),$(call make_range,$(limit),2))
fives := $(wordlist 2,$(limit),$(call make_range,$(limit),4))
fizzbuzz := $(foreach v,$(numbers),\
$(if $(and $(call equal,0,$(word $(v),$(threes))),$(call equal,0,$(word $(v),$(fives)))),FizzBuzz,\
$(if $(call equal,0,$(word $(v),$(threes))),Fizz,\
$(if $(call equal,0,$(word $(v),$(fives))),Buzz,$(v)))))
### Target ###
all: ; $(info $(fizzbuzz))1
If Make / Makefile was a person, (s)he would be 42+ years old, still going great guns!!
Make was developed by Stuart Feldman in 1977 as a Bell Labs summer intern.2
so recently i have been through memory management hell. maybe i should rethink about pointers and stuff.
long story short: i have done a calendar app using SDL2 and the program is written in C++. when rendering textures using fonts i referenced null pointers to the font.
i will implement events in the future and if you have any suggestions or some advice leave it in the comments, the feedback helps me a lot!
anyways you might give it a try (i am sorry about the makefile not working, i built the app on windows and needed to link against the folder where sdl is located): https://github.com/zetef/calviewer3
I'm playing with a Z80 SBC, and I was trying to run the old Star Trek game on it. I had a C source file, and used a makefile to try to compile it. It failed due to various library issues, but I just checked the folder (I had done this earlier today) and there's an EXE of the Star Trek game sitting there. I don't know how I compiled it for Windows. I didn't use any CC or GCC commands. I'm just confused.
The code I am supposed to refactor only builds if mounted on/as drive s:\.
Sure worked for the previous dev.
First thing to do: new makefile. And git init.
How do you do java style oop with classes and inheritance and all that in c++?
Do I really have to make a header and a source file for each class?
And while we are on it: are there any sources of "famous" games written in cpp?8
Today, I decided to learn build a c++ project using cmake. Since I've never done a big project in C++ I have no experience with these stuff.
Couple of hours for researching and trying to understand how that thing works, how to specify things, this and that. Wrote a small program for testing.
Everything was fine. Makefile was generated and program was worked.
Then.... Somehow, sublime text started to give me error messages like, 'the header file you included is not found.' I hit the makefile again, the built was successfull... I know that, need to add -I to compiler flag so that it can find the files. But in sublime text constantly refuses my 'possible' solutions.
Even ycm in vim does this. They expected me to write includes like '../thispkcg/include/header.h'
Where did i go wrong ..............
Btw it works like a charm in cLion I don't know why..2
When you realize you are blocked ........
A simulation I am working on stopped working due to some linking errors again. I looked it up online and followed some suggestions. Deleting the project from work space and reimporting it. I also created a new workspace and compared binary files with another similar class. The makefile seems to be detecting it. It just doesn’t agree with he file syntax although it’s correct. Oh no ....
Me: “You gotta be kidding! I just want to code .....!”1
Trying to compile GCC from scratch
Makefile:555 *** missing separator. stop
Line 555 in the make file reads
@echo "cleaning :)"
@rm -rf $(GPATH)/bin
the "oh crap":
can anyone recommend a nice c++ ide on linux?
I've tried eclipse, but it's a bit bulky and I don't like it's makefile set up.
I do like geany, but I would like autocomplete on it :P9
I accidentally removed an object file from the linker phase of a library we use, by messing with a variable in the Makefile. This meant that the library was completely unusable when loaded into a binary.
All of the tests in the library's build process still passed, though.
Q: I'm using make as a simple task runner. `make build` instead of a longer build command etc. It sucks that I can't simply pass some params like `make build dev`, instead I have to pass them as variables: `make build tag=dev`.
Can you recommend a standard, cross-platform (Linux, OS X) tool for this?9
MPLABX, eclipse and netbeans are biggest pieces of shit software in the world, fucken a I can’t stand this slowness, over bloat, locking up, and the unable to resolve bullshit,
(Porting a suppliers project and build script over to a simple makefile, and so the project can open and build in sublime or vim rather these other bullshit IDES9
Nooooo!!! Fuck me, i'm a fucking idiot. I just fat fingered my keyboard while editing my Makefile. Accidentally made the clean "rm *"...
Lost a couple of hours of progress :'(3
Anyone else have nightmares about building other people's c/c++ codebases from source? *napalm, helicopters, gunfire, screaming civilians etc*1
What's the most sensible way to build and use 32/64-bit libraries with MSYS on Windows? Specifically, I am wondering about zlib and libpng along with SDL2.
I know there are pre-built versions available, but I am inevitably going to need to build other libraries in future.
I'm expecting things to go into /usr/local (which they do), but I'd like to have separate builds for 32-bit and 64-bit. I know I can put things into "lib32" or "lib64" using ./configure options pretty easily, but DLLs (e.g. SDL) seem to end up in "bin" so I assume I should create a "bin32" and "bin64" for those?
Then there's the issue of e.g. libpng not being able to find zlib's headers when using its MSYS makefile... Should I be editing these makefiles? It looks as though I should (things are commented-out etc.) but when I want to update to a newer version, I'll need to modify the makefile again.
It probably sounds like a really silly set of questions but I've always found that building and installing libraries on Windows feels really clumsy and I just want to make sure I'm not making a really messy dev environment.